3
$\begingroup$

From the question regarding stats formula to use with mixed ordinal data: Do the residual plot and QQ plot look normal?,

It seems like mixed ordinal logistic regression would be appropriate for my data which has random factor and DV which is ordinal.

Hence I installed 'ordinal' package in R and run:

mm1 <- clmm (response ~ group*gender + (1|jumper),data=data1.frame)

Normally when I run linear mixed model, I will use lsmeans to see all pair contrasts; however when I run lsmeans for this formula, it turns out that:

pairwise~group*gender, adjust="tukey")
Error in recover.data.default(object, data = NULL) : 
  Can't handle an object of class “clmm”
Objects of the following classes are supported:
“coxme”, “coxph”, “gls”, “lm”, “lme”, “mer”, “merMod”, “mlm”, “polr”, “survreg”
Error in ref.grid(object = list(coefficients = c(-2.3566803623731, -0.659824357890563,  : 
  Possible remedy: Supply the data used in the 'data' argument

What should I do to run pairwise comparison?

PS: actually my DV is a 9-scale and I'm not sure if I can still use linear mixed model as I assumed that 9-scale is interval in the first place. At the moment, I'm not sure which one is better suit my data between linear mixed model and mixed ordinal logistic regression. However, the latter does not allow me to run lsmeans so I have problem with cannot see all pair contrasts.

$\endgroup$

1 Answer 1

4
$\begingroup$

just install the latest version of lsmeans. It has quite a bit of support for the ordinal package, including a choice of several modes for the results: e.g., linear.predictor and cum.prob modes for detailed predictions at each of the thresholds, prob for probabilities of each class, and latent (the default) for predictions of the underlying latent variable. You might want to update ordinal too, just to make sure everything's working together as it should.

PS -- Also in newer versions, you can do ? models to find documentation on what models are supported and any options available for them.

$\endgroup$
5
  • $\begingroup$ Great!! after reinstalling lsmeans and ordinal packages, I can do pairwise comparison, superb!! Could I ask you another question about interpretation? As actually my DV is interval but I have to convert it to ordinal to run clmm. I'm not sure if the interpretation is still similar to LMM, i.e. linear relationship as at the moment, the DV is categorical, rather than interval. $\endgroup$ Dec 18, 2014 at 7:33
  • $\begingroup$ Maybe I should convert my DV into order.factor instead of just factor? $\endgroup$ Dec 18, 2014 at 9:35
  • 1
    $\begingroup$ With 9 levels, it's kind of a toss up. If you do use ordinal, then the response should be an ordered factor. But the analysis and interpretation would be simpler using it as quantitative and fitting a model using lmer in the lme4 package. If you have responses piling up at one end or the other of your 9-point scale, that'd be another reason to use an ordinal-response model. $\endgroup$
    – Russ Lenth
    Dec 18, 2014 at 14:01
  • $\begingroup$ There are a lot of problems with the concept of least squares means even in the ordinary linear model case. When least squares is not even being used (as in the case of ordinal regression) I worry about this even more. $\endgroup$ May 11, 2017 at 11:13
  • $\begingroup$ The term "least squares" in there is unfortunate. They are just predictions, or averages of predictions. A better term is "predicted marginal means." Prediction isn't controversial at all, AFAIK. Averaging them together may be, of course, but framed in those terms, one can evaluate if it makes sense. In any case, it hasn't all that much to do with least squares. $\endgroup$
    – Russ Lenth
    May 11, 2017 at 13:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.