[R-sig-ME] Random effects in multinomial regression in R?

Doran, Harold HDor@n @end|ng |rom @|r@org
Fri Mar 22 23:23:45 CET 2019

This article describes the issue, but in the context of linear models. The underlying issue remains even within the GLMM, however.


My software, METRICS, implements variations of the EiV model described, but again, only for linear models


From: Souheyla GHEBGHOUB <souheyla.ghebghoub using gmail.com<mailto:souheyla.ghebghoub using gmail.com>>
Date: Friday, March 22, 2019 at 4:39 PM
To: AIR <hdoran using air.org<mailto:hdoran using air.org>>
Cc: Ren� <bimonosom using gmail.com<mailto:bimonosom using gmail.com>>, "r-sig-mixed-models using r-project.org<mailto:r-sig-mixed-models using r-project.org>" <r-sig-mixed-models using r-project.org<mailto:r-sig-mixed-models using r-project.org>>
Subject: Re: [R-sig-ME] Random effects in multinomial regression in R?

Dear Doran,

Could you explain more this point to me, please?

Thank you,

On Fri, 22 Mar 2019, 21:19 Doran, Harold, <HDoran using air.org<mailto:HDoran using air.org>> wrote:
Yes, but conditioning on the pre-test means you are using a variable
measured with error and the estimates you obtain and now inconsistent, and
that�s a pretty big sin.

On 3/22/19, 3:49 PM, "Souheyla GHEBGHOUB" <souheyla.ghebghoub using gmail.com<mailto:souheyla.ghebghoub using gmail.com>>

>Dear  Ren�,
>Thank you for your feedback to me. You are right, dropping the pretest
>covariate if I predict change definitely makes sense to me! But the fact
>that i need to control for the starting levels of participants makes it
>obligatory for me to chose the second way, which is predicting posttest
>instead of change to have pretest scores controlled for.
>You also chose (1+group | word) , which is new to me. Does it intend to
>assume the effect of group to vary across words, which is something
>applicable to my data, right?
>I will discuss all this with my supervisor, and may reply here again in
>days if you do not mind.
>Thank you very much
>University of York
>On Fri, 22 Mar 2019 at 13:42, Ren� <bimonosom using gmail.com<mailto:bimonosom using gmail.com>> wrote:
>> Hi Souheyla,
>> it seems to me that you will run into problems with your coding of
>> (gain, no gain and decline) because the 'change' is by
>> definition/calculation depending on the predictor pretest.
>> See, according to your coding scheme:
>> Change = decline can only occur if pretest=1 (not by pretest=0).
>> Change = gain can only occur if pretest = 0 (not by pretest=1)
>> Change = No Gain can occur if pretest= 1 or 0
>> In other words:
>> If pretest = 1 then the possible outcomes can be decline or no gain
>> If pretest = 0 then the possible outcomes can be gain or no gain
>> And if the model result shows you then that the pre-test is
>> related to p(change-outcome), I guess there is no surprise in it, is it?
>> So the first solution to this would be simply kicking the pre-test
>> predictor out of the model completely, and predict:
>> mod1 <- brm(Change ~ Group + (1|Subject) + (1+Group|Word),...)
>> (Btw.: actually the first Hierarchical Bayes Model question I see on the
>> mixed-effects mailing list :))
>> Attempt for a further clarification on which random slopes would reflect
>> the model's design:
>> If you have a within-subjects design, by-subject random slopes are
>> possible for the within-subject variable (e.g. if there are two sets of
>> words/lists [e.g. abstract vs. concrete words] for each participant, and
>> you test whether there is a performance-difference between these
>> word-lists, then you can implement by-subject random slopes for words,
>> because each participant has seen both sets.) If each participant has
>> only one list (i.e. between subjects design) by subject random slopes
>> words are not appropriate, because there is no 'slope' by participant
>> by definition, having a slope requires at least two observations...).
>> is always a good rule of thumb without thinking about it too heavily :)
>> Ans as you see: you can define a random slope for words:
>> because each word has been presented in each group (i.e. there can be a
>> slope for each word). And intuitively speaking the Treatment-effect can
>> vary depending on the stimuli you use, and the slope makes sense. (You
>> see in this example that the treatment effect can also vary by subjects,
>> but in fact, this subject effect variation IS EQUAL to the effect you
>> to test, and having by subject group random slopes would eliminate the
>> fixed effect...)
>> Anyway, there is a second possibility to define your model, depending on
>> how you want to interpret it. In the previous model you can say
>> about the type-of-change likelihoods depending on the treatment group.
>> you could implement the model as binomial as well (i.e. logistic
>> mod2 <- brm(posttest ~ pretest*Group + (1|Subject) + (1+Group|Word),...)
>> And what you would expect here would be an interaction between pre-test
>> and Group. For instance; if pretest=0 & treatment 1 then posttest larger
>> than with pretest=0 & treatment 2; but not when pretest=1 (because this
>> a plausible no gain situation). And so on...
>> (And in this model there are no also no further random slopes hidden in
>> your design :))
>> Hope this helps.
>> Best, Ren�
>> Am Do., 21. M�rz 2019 um 14:01 Uhr schrieb Souheyla GHEBGHOUB <
>> souheyla.ghebghoub using gmail.com<mailto:souheyla.ghebghoub using gmail.com>>:
>>> Dear Philip,
>>> I understand , here is the structure of my data in case it could help.
>>> I have 3 groups of participants (control, treatment1, treatment2). Each
>>> group was tested twice, once before treatment (pretest) and once after
>>> treatment (posttest).
>>> In each test, they were tested on knowledge of 28 words, scores are
>>> dichotomous (0 = unknown , 1 = known). Tests are the same.
>>> I calculated change from pretest to posttest :
>>> if pretest 0 and posttest 0 = no gain
>>> if pretest 1 and posttest 1 = no gain
>>> if pretest 0 and posttest 1 = gain
>>> if pretest 1 and posttest 0 = decline
>>> So I ended up with a dependent variable called Change with 3 levels
>>> (no_gain, gain, decline) and I tried to predict it using Group and
>>> as covariates using multinomial logit model. mod0 <- brm(Change ~
>>> +
>>> Group) I would like to add random effects for subjects but don't know
>>> what's the best form when Time factor is absent.
>>> I hope other statisticians who read this could help
>>> Thank you
>>> Souheyla
>>>         [[alternative HTML version deleted]]
>>> _______________________________________________
>>> R-sig-mixed-models using r-project.org<mailto:R-sig-mixed-models using r-project.org> mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>       [[alternative HTML version deleted]]
>R-sig-mixed-models using r-project.org<mailto:R-sig-mixed-models using r-project.org> mailing list

	[[alternative HTML version deleted]]

More information about the R-sig-mixed-models mailing list