lme4 - Mixed Model question

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

lme4 - Mixed Model question

Axel Urbiz
Dear List,

I’d appreciate any guidance on the following.

I’m using a mixed effects logistic regression model, to allow coefficients to vary by a group variable. However, my case is not typical in the sense that I need to specify a different set of covariates for each level of the group variable. Say I have 3 covariates {x1, x2, x3} and 2 groups {g1, g2}. I want to specify a model for g1 that only depends on x1 and x2, and a model for g2 that only depends on x2 and x3.

Is this possible with lme4?

Thanks,
Axel.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: lme4 - Mixed Model question

R help mailing list-2
Dear Axel,

A few quick remarks.

1) This question is more suitable for r-sig-mixed-models.
2) A mixed model needs much more than two groups. If you have only a few
groups, consider a glm with group interactions.
3) Setting the value of a covariate to zero for a set of observations has
the same effect as setting its coefficient to zero for that set of
observations.

Best regards,

ir. Thierry Onkelinx
Statisticus / Statistician

Vlaamse Overheid / Government of Flanders
INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND
FOREST
Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assurance
[hidden email]
Havenlaan 88 bus 73, 1000 Brussel
www.inbo.be

///////////////////////////////////////////////////////////////////////////////////////////
To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey
///////////////////////////////////////////////////////////////////////////////////////////

<https://www.inbo.be>


Op ma 13 jul. 2020 om 16:00 schreef Axel Urbiz <[hidden email]>:

> Dear List,
>
> I’d appreciate any guidance on the following.
>
> I’m using a mixed effects logistic regression model, to allow coefficients
> to vary by a group variable. However, my case is not typical in the sense
> that I need to specify a different set of covariates for each level of the
> group variable. Say I have 3 covariates {x1, x2, x3} and 2 groups {g1, g2}.
> I want to specify a model for g1 that only depends on x1 and x2, and a
> model for g2 that only depends on x2 and x3.
>
> Is this possible with lme4?
>
> Thanks,
> Axel.
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.