1

I'm trying to get clustered standard errors on an ordered logit regression using the POLR function from MASS. The regression has about 2,900 fixed effects, (U.S. counties and years.)

When I run the regression without the fixed effects, I'm able to use the vcovCL function from sandwich with no problems, (using the procedure outlined in this answer.) However, when I include the fixed effects, I get this error:

Error in xmat %*% x$coefficients : non-conformable arguments

I would post the data, but the data set is quite large and the regression takes about 2 days to run with all the fixed effects.

Has anyone come across a similar problem and have you come up with a solution?

EDIT: Following what @ben-bolker commented below, I tried the regression with a random sample of 1,000 lines. It appears that some of the fixed effects produce a square matrix throwing the following errors:

   1: glm.fit: fitted probabilities numerically 0 or 1 occurred 
   2: design appears to be rank-deficient, so dropping some coefs

When I try using the vcovCL function to cluster the standard errors, I get the same "non-conformable arguments" error. So I suspect that since some coefficients are NA's, the matrix vcovCL is a different size from the POLR object and that's what's causing the error.

Is there a way to excise these missing fixed-effects? I won't be displaying them in the regression output anyhow.

ModalBro
  • 544
  • 5
  • 25
  • can you reproduce the problem with a smaller data set, i.e. some fixed effects but only a few (and not very many observations)? – Ben Bolker Jan 12 '20 at 01:27
  • Good idea. I sampled 1000 rows and am finding the same problem. Would it help if I posted the truncated data? – ModalBro Jan 12 '20 at 06:07
  • @ModalBro, did you ever find a solution? I'm currently running into this issue in a very similar context (ordered logit, many fixed effects). – Julian Feb 01 '22 at 21:50

0 Answers0