[R-sig-ME] Random slopes for categorical variables

Timothy MacKenzie |@w|@wt @end|ng |rom gm@||@com
Wed Oct 6 05:44:25 CEST 2021


My point is when we use (0 + CAT | ID) we get the pure coef. for each
level of CAT not any contrast. So, here we simply, I think, get the
difference in pure coef. of each level of CAT across levels of ID.

On Tue, Oct 5, 2021 at 10:39 PM Timothy MacKenzie <fswfswt using gmail.com> wrote:
>
> Sure, what if CAT has 2 levels, given R's default dummy coding, what
> is the difference between (1 + CAT | ID) and (0 + CAT | ID), then?
>
> On Tue, Oct 5, 2021 at 10:23 PM Phillip Alday <me using phillipalday.com> wrote:
> >
> > Yes.
> >
> > Well, to be more precise 0 + CAT and 1 + CAT estimate different
> > contrasts and so the correlation you're estimating correspond to
> > whatever contrast comes out.
> >
> > Same deal for 1 + CAT with sum vs treatment vs. Helmert coding.
> >
> > On 5/10/21 10:20 pm, Timothy MacKenzie wrote:
> > > Hello All,
> > >
> > > I had a basic question. For continuous variables (X) killing the
> > > intercept in the random part kills the correlation between random
> > > effects (intercepts and slopes):
> > >
> > > (0 + X | ID)
> > >
> > > But for categorical variables (CAT) killing the intercept actually
> > > allows for all levels of CAT (including the reference level) to be
> > > correlated that is:
> > >
> > > (0 + CAT | ID) estimates more correlations than (CAT | ID)
> > >
> > > Am I correct?
> > >
> > > Thanks,
> > > Tim M
> > >
> > > _______________________________________________
> > > R-sig-mixed-models using r-project.org mailing list
> > > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> > >



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