Open pouwelskb opened 3 years ago
ReprEx:
require(foreign)
require(MASS)
library("clubSandwich")
dat <- read.dta("https://stats.idre.ucla.edu/stat/data/ologit.dta")
head(dat)
dat <- read.dta("https://stats.idre.ucla.edu/stat/data/ologit.dta")
## fit ordered logit model and store results 'm'
m <- polr(apply ~ pared + public + gpa, data = dat, Hess=TRUE)
clubSandwich::vcovCR(m, cluster = dat$public, type = "CR0")
I have build an ordered logistic regression model with MASS::polr and would like to get clustered standard errors for the marginal predictions. However this throws the following error, suggesting that MASS::polr is currently not supported:
> Error in split.default(resid, cluster): first argument must be a vector