I have estimated an ordered logistic regression with the vglm function of the VGAM package in R.
Here is a minimalistic example of what I did:
library(VGAM)
cdata <- data.frame(y = ordered(as.factor(rep(1:3, 1000))),
x1 = rnorm(3000,50,1),
x2 = rbinom(3000, 1, 0.4),
group = sort(rep(1:100,10)))
orderedlogit <- vglm(y ~ x1 + x2, cumulative(parallel = FALSE), cdata)
Now I would like to estimate cluster robust standard errors for the groups defined by the group variable.
I have tried the package lmtest in combination with sandwich since it is compatible with polr as described in this post, but for vglm it gives the following error:
Error in UseMethod("estfun") : no applicable method for 'estfun' applied to an object of class "c('vglm', 'vlm', 'vlmsmall')"
Does anyone know how to get cluster robust standard errors for a vglm object?