# [R] Newbie HLM with lme4 questions

From: Ista Zahn <istazahn_at_gmail.com>
Date: Wed, 13 Feb 2008 10:53:47 -0500

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?

--Ista

[[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:07:25 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 - 18:30:14 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.