[R-lang] How to use mixed-effects models on multinomial data

Andy Fugard andy.fugard at sbg.ac.at
Tue May 5 00:20:54 PDT 2009


Linda Mortensen wrote:
> 
> I'm trying to run a logistic regression on ordered multinomial data.
> - The dependent variable is number of correct items with accuracy
> ranging from 0 to 5. I want to use a mixed-effects model, but am
> unsure about how to use this model to fit multinomial data. Can you
> help?

Dear Linda,

The most common package used by psycholinguists, lme4, doesn't fit such 
models, but apparently you can fit them using glmmADMB.  (I don't yet 
know how.)

Anyway, venture to:

   http://otter-rsch.com/admbre/examples/glmmadmb/glmmADMB.html

and follow the instructions for download.  This example should work when 
all is installed properly:

--8<----------------------------------------------------------------------

require(glmmADMB)

M0 = glmm.admb(y~Base*trt+Visit,random=~Visit,
                    group="subject",data=epil2,family="nbinom")
M1 = glmm.admb(y~Base*trt+Age+Visit,random=~Visit,
                    group="subject",data=epil2,family="nbinom")
anova(M0,M1)

---------------------------------------------------------------------->8--

There's a message board on which you can request help.

If you're at home in an MCMCed up Bayesian framework you could also try 
MCMCglmm.

--8<----------------------------------------------------------------------

install.packages("MCMCglmm", dep=T)
require(MCMCglmm)
vignette("Tutorial", "MCMCglmm")

---------------------------------------------------------------------->8--

Cheers,

Andy

-- 
Andy Fugard, Post-doc, ESF LogICCC (LcpR) project
Fachbereich Psychologie, Universitaet Salzburg
   Hellbrunnerstr. 34, 5020 Salzburg, Austria
+43 (0)680 2199 346  http://figuraleffect.googlepages.com



More information about the R-lang mailing list