Paul Johnson
2007-May-08 02:03 UTC
[R] ordered logistic regression with random effects. Howto?
I'd like to estimate an ordinal logistic regression with a random effect for a grouping variable. I do not find a pre-packaged algorithm for this. I've found methods glmmML (package: glmmML) and lmer (package: lme4) both work fine with dichotomous dependent variables. I'd like a model similar to polr (package: MASS) or lrm (package: Design) that allows random effects. I was thinking there might be a trick that might allow me to use a program written for a dichotomous dependent variable with a mixed effect to estimate such a model. The proportional odds logistic regression is often written as a sequence of dichotomous comparisons. But it seems to me that, if it would work, then somebody would have proposed it already. I've found some commentary about methods of fitting ordinal logistic regression with other procedures, however, and I would like to ask for your advice and experience with this. In this article, Ching-Fan Sheu, "Fitting mixed-effects models for repeated ordinal outcomes with the NLMIXED procedure" Behavior Research Methods, Instruments, & Computers, 2002, 34(2): 151-157. the other gives an approach that works in SAS's NLMIXED procedure. In this approach, one explicitly writes down the probability that each level will be achieved (using the linear predictor and constants for each level). I THINK I could find a way to translate this approach into a model that can be fitted with either nlme or lmer. Has someone done it? What other strategies for fitting mixed ordinal models are there in R? Finally, a definitional question. Is a multi-category logistic regression (either ordered or not) a member of the glm family? I had thought the answer is no, mainly because glm and other R functions for glms never mention multi-category qualitative dependent variables and also because the distribution does not seem to fall into the exponential family. However, some textbooks do include the multicategory models in the GLM treatment. -- Paul E. Johnson Professor, Political Science 1541 Lilac Lane, Room 504 University of Kansas
Dave Atkins
2007-May-08 04:07 UTC
[R] ordered logistic regression with random effects. Howto?
Paul-- I think the options are pretty limited for mixed-effects ordinal regression; it might be worth taking a look at Laura Thompson's R/Splus companion to Alan Agresti's text on categorical data analysis: https://home.comcast.net/~lthompson221/Splusdiscrete2.pdf She discusses some options for both GEE and random-effects approaches, though for the ordinal mixed-effects regression, I believe she writes out the likelihood function and passes it to optim() (ie, no canned functions). Hope that helps. cheers, Dave -- Dave Atkins, PhD Assistant Professor in Clinical Psychology Fuller Graduate School of Psychology Email: datkins at fuller.edu Paul wrote: I'd like to estimate an ordinal logistic regression with a random effect for a grouping variable. I do not find a pre-packaged algorithm for this. I've found methods glmmML (package: glmmML) and lmer (package: lme4) both work fine with dichotomous dependent variables. I'd like a model similar to polr (package: MASS) or lrm (package: Design) that allows random effects. I was thinking there might be a trick that might allow me to use a program written for a dichotomous dependent variable with a mixed effect to estimate such a model. The proportional odds logistic regression is often written as a sequence of dichotomous comparisons. But it seems to me that, if it would work, then somebody would have proposed it already. I've found some commentary about methods of fitting ordinal logistic regression with other procedures, however, and I would like to ask for your advice and experience with this. In this article, Ching-Fan Sheu, "Fitting mixed-effects models for repeated ordinal outcomes with the NLMIXED procedure" Behavior Research Methods, Instruments, & Computers, 2002, 34(2): 151-157. the other gives an approach that works in SAS's NLMIXED procedure. In this approach, one explicitly writes down the probability that each level will be achieved (using the linear predictor and constants for each level). I THINK I could find a way to translate this approach into a model that can be fitted with either nlme or lmer. Has someone done it? What other strategies for fitting mixed ordinal models are there in R? Finally, a definitional question. Is a multi-category logistic regression (either ordered or not) a member of the glm family? I had thought the answer is no, mainly because glm and other R functions for glms never mention multi-category qualitative dependent variables and also because the distribution does not seem to fall into the exponential family. However, some textbooks do include the multicategory models in the GLM treatment. -- Paul E. Johnson Professor, Political Science 1541 Lilac Lane, Room 504 University of Kansas
Prof Brian Ripley
2007-May-08 05:45 UTC
[R] ordered logistic regression with random effects. Howto?
On the definitional question, some texts do indeed consider multi-category logistic regression as a glm. But the original definition by Nelder does not. I've never seen polr considered to be a glm (but it way well have been done). Adding random effects is a whole different ball game: you need to integrate over the random effects to find a likelihood. That integration is tricky, and I am not sure we yet have reliable software for it in the binary ('dichotomous dependent variable') case: SAS's NLMIXED certainly is not reliable. I've had students run real problems through a variety of software, and get quite different results. (It is possible that the shape of the likelihood is a problem but it is not the only one.) MCMC approaches to that integration are an alternative not mentioned below. On Mon, 7 May 2007, Paul Johnson wrote:> I'd like to estimate an ordinal logistic regression with a random > effect for a grouping variable. I do not find a pre-packaged > algorithm for this. I've found methods glmmML (package: glmmML) and > lmer (package: lme4) both work fine with dichotomous dependent > variables. I'd like a model similar to polr (package: MASS) or lrm > (package: Design) that allows random effects. > > I was thinking there might be a trick that might allow me to use a > program written for a dichotomous dependent variable with a mixed > effect to estimate such a model. The proportional odds logistic > regression is often written as a sequence of dichotomous comparisons. > But it seems to me that, if it would work, then somebody would have > proposed it already.You need to combine all the binary comparisons to get the likelihood, and the models have parameters in common.> I've found some commentary about methods of fitting ordinal logistic > regression with other procedures, however, and I would like to ask for > your advice and experience with this. In this article, > > Ching-Fan Sheu, "Fitting mixed-effects models for repeated ordinal > outcomes with the NLMIXED procedure" Behavior Research Methods, > Instruments, & Computers, 2002, 34(2): 151-157. > > the other gives an approach that works in SAS's NLMIXED procedure. In > this approach, one explicitly writes down the probability that each > level will be achieved (using the linear predictor and constants for > each level). I THINK I could find a way to translate this approach > into a model that can be fitted with either nlme or lmer. Has someone > done it? > > What other strategies for fitting mixed ordinal models are there in R? > > Finally, a definitional question. Is a multi-category logistic > regression (either ordered or not) a member of the glm family? I had > thought the answer is no, mainly because glm and other R functions for > glms never mention multi-category qualitative dependent variables and > also because the distribution does not seem to fall into the > exponential family. However, some textbooks do include the > multicategory models in the GLM treatment. > > >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Cody_Hamilton at Edwards.com
2007-May-08 17:03 UTC
[R] ordered logistic regression with random effects. Howto?
Paul, I believe the model you describe below can be fitted in GENMOD and GLIMMIX in SAS. Alternatively, as Brian Ripley suggests, you could use MCMC. BUGS has a nice example of a multinomial logit model in the second example manual. While this example considers only fixed effects, it's not difficult to extend the model to include a random effect (see the 'Seeds' example in the first example manual). Regards, -Cody "Paul Johnson" <pauljohn32 at gmail .com> To Sent by: r-help at stat.math.ethz.ch r-help-bounces at st cc at.math.ethz.ch Subject [R] ordered logistic regression 05/07/2007 07:03 with random effects. Howto? PM I'd like to estimate an ordinal logistic regression with a random effect for a grouping variable. I do not find a pre-packaged algorithm for this. I've found methods glmmML (package: glmmML) and lmer (package: lme4) both work fine with dichotomous dependent variables. I'd like a model similar to polr (package: MASS) or lrm (package: Design) that allows random effects. I was thinking there might be a trick that might allow me to use a program written for a dichotomous dependent variable with a mixed effect to estimate such a model. The proportional odds logistic regression is often written as a sequence of dichotomous comparisons. But it seems to me that, if it would work, then somebody would have proposed it already. I've found some commentary about methods of fitting ordinal logistic regression with other procedures, however, and I would like to ask for your advice and experience with this. In this article, Ching-Fan Sheu, "Fitting mixed-effects models for repeated ordinal outcomes with the NLMIXED procedure" Behavior Research Methods, Instruments, & Computers, 2002, 34(2): 151-157. the other gives an approach that works in SAS's NLMIXED procedure. In this approach, one explicitly writes down the probability that each level will be achieved (using the linear predictor and constants for each level). I THINK I could find a way to translate this approach into a model that can be fitted with either nlme or lmer. Has someone done it? What other strategies for fitting mixed ordinal models are there in R? Finally, a definitional question. Is a multi-category logistic regression (either ordered or not) a member of the glm family? I had thought the answer is no, mainly because glm and other R functions for glms never mention multi-category qualitative dependent variables and also because the distribution does not seem to fall into the exponential family. However, some textbooks do include the multicategory models in the GLM treatment. -- Paul E. Johnson Professor, Political Science 1541 Lilac Lane, Room 504 University of Kansas ______________________________________________ R-help at stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Possibly Parallel Threads
- glm - prediction of a factor with several levels
- ordered logistic regression - cdplot and polr
- Location of polr function
- How to understand output from R's polr function (ordered logistic regression)?
- Package 'MASS' (polr): Error in svd(X) : infinite or missing values in 'x'