# Re: [R] Newbie HLM with lme4 questions

From: 宋时歌 <shigesong_at_gmail.com>
Date: Thu, 14 Feb 2008 00:01:00 +0800

Hi,

I suggest you take a look at the mixed model materials in Zelig, which has both a structural form and a reduced form model specification for multilevel model. The structural form specification is what you need.

Shige

On Feb 13, 2008 11:53 PM, Ista Zahn <istazahn_at_gmail.com> wrote:

> Dear R listers,
> I know I'm breaking the rules by asking a "homework" related question--
> I hope you'll forgive me. I am a social psychology graduate student,
> and the only one in my department who uses R. I successfully completed
> my multiple regression and structural equation modeling courses using
> R (John Fox's car and sem packages were a big help, as was his book).
> Now I am taking a hierarchical linear modeling course, and am hoping
> that I can use R for this also. I've searched the list archives, and
> consulted the one-line version of Pinheiro and Bates (available
> through my library), but I'm having a great deal of difficulty
> translating what I'm learning in class into lmer syntax. Specifically,
> the instructor is using HLM 6.0. In this program, one specifies the
> level one and level two models explicitly, and I'm having trouble
> understanding what the equivalent of this is in lmer. Most of the
> examples we cover in class are change models, i.e., we working with
> longitudinal data.
>
> Specific questions:
>
> in HLM 6.0, we build the following model;
>
> Y = P0 + P1*(CONFLICT) + P2*(TIMEYRS) + E
> Level-2 Model
> P0 = B00 + B01*(H0MCITOT) + R0
> P1 = B10 + B11*(H0MCITOT) + R1
> P2 = B20 + B21*(H0MCITOT) + R2
>
> Can someone explain to me how to represent this in lmer syntax? I've
> tried e.g.,
>
> lmer(MAT ~ 1 + CONFLICT + TIMEYRS + (1 + CONFLICT +
> + TIMEYRS | H0MCITOT))
>

> But I don't get the same result.
>
> More generally: Should I be using the lme4 package, the nlme package,
> or something else entirely? Is there any documentation for the lme4
> package that is geared more towards novice users?

>
> offer.
>
> --Ista
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

[[alternative HTML version deleted]]

R-help_at_r-project.org mailing list
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. Received on Wed 13 Feb 2008 - 16:11:57 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 13 Feb 2008 - 16:30:13 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.