[R-sig-ME] How to compare two coefficent estimates in a multilevel model?

Thierry Onkelinx thierry.onkelinx at inbo.be
Mon Jan 29 09:40:34 CET 2018


Dear Blazej,

Your question is not clear to me. What is the hypothesis that you want
to test? H_0: \gamma_{01} = \gamma_{02} ?

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
thierry.onkelinx op inbo.be
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
///////////////////////////////////////////////////////////////////////////////////////////




2018-01-28 17:43 GMT+01:00 Blazej Mrozinski <blazej.mrozinski op gmail.com>:
> Greetings,
>
> Could anyone help me in answering the following question:
>
> How can I compare two coefficient estimates from a lme4 or nlme model?
>
> In HLM7 (software I'm more familiar with) such comparisons are evaluated
> with χ2 tests. I can't find out what function in lme4, nlme or just base
> can do the same.
>
> An imaginary example I'm working with, is a modified sleepstudy dataset -
> with two score variables added at level 2. The model being tested is this:
>
> Level1:
> Reaction=β0+r
>
> Level2:
> β0=γ00+γ01(score1)+γ02(score2)+u0j
>
> I'm looking for a χ2 comparing both level 2 coefficients (or 3+ if there
> are more of them)
>
> Here is my modified dataset:
>
> library(lme4)
>
> set.seed(123)
> score1=NULL
> score2=NULLfor(i in 1:18) {
>       x1 = rep(sample(1:5, size = 1), 10)
>       score1 = c(score1, x1)
>       x2 = rep(sample(1:5, size = 1), 10)
>       score2 = c(score2, x2)}
>
> sleepstudy$score1 <- score1
> sleepstudy$score2 <- score2
>
> model <-lmer(Reaction ~ score1 + score2 + (1|Subject), data=sleepstudy)
>
> Best regards,
> Blazej Mrozinski
>
> ps. this question was posted on CrossValidated:
> https://stats.stackexchange.com/questions/325302/how-to-compare-two-coefficent-estimates-in-a-multilevel-model
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models op 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