[R] lmer (multinomial response variable ~ fixed + (1|random), family='"multinomial" ???)

Ben Bolker bbolker at gmail.com
Fri May 31 02:38:38 CEST 2013


Maggie Wisniewska <maggie.wisniewska <at> gmail.com> writes:

> 
> Hello,
> I am trying to run glmm  to test the effect of the three fixed effects [AGE
> (weaned vs. unweaned claf), LOCATION (zoo vs. park), MOTher's social status
> (matriarch vs. nonmatriarch)] and one random effect [ID (12 different
> calves of whom I have multiple but unbalanced observations)] on the a
> multinomial response variable [DIST (distance from mom at less than 2
> meters,between 2-5 meters and at more than 5 meters).  Is the *family =
> binomial* argument in my code incorrect for my data?  If it is incorrect,
> is there a way to test this model with *multinomial response variable*?
>
OConnell.glmm1<-lmer(DIST~AGE+LOC+MOT+(1|ID),data=OConnell,family=binomial(link
> = "logit")
> 


  This would probably be better asked on the specialized
r-sig-mixed-models at r-project.org mailing list.

  It looks like you really want to fit an ordinal model
(i.e. your categories are naturally ordered, as opposed to
a case where your responses were unordered, e.g.
"chocolate", "strawberry", "vanilla", "maple walnut").

  The 'ordinal' package will allow you to fit these kinds
of models.


PS (somewhat tangential)

  As far as I know the only mixed model package available for R that can
handle multinomial models in a simple way  is the MCMCglmm package.
Multinomial models are relatively easy to code as variations on binomial
models:

http://en.wikipedia.org/wiki/Generalized_linear_model#Multinomial_regression
http://www.math.ntnu.no/inla/r-inla.org/papers/multinomial-poisson.pdf
(the latter is provided by the INLA web site, another mixed model package)

but this won't help if you just want a quick "black-box" solution.



More information about the R-help mailing list