[S] lme and HLM

19 Feb 98 09:46:00 EST

I apologize up front for what may turn out to be rather elementary
questions regarding lme. I'm a social psychologist who was introduced to
S-PLUS by a cousin who is a biostatistician, and though I enjoy using
S-PLUS, I sometimes struggle while trying to cross professional domains.

My questions refer to using lme to do random coefficient model analyses
that I would typically approach using HLM (Bryk & Raudenbush, 1992).
I would like to stick with lme to avoid having to export data into HLM.

Consider a data set collected from deployed Army troops in Haiti. In
this data set I am trying to model predictors of individual's
psychological hostility. The data is from 2042 respondents from 49 Army
Companies. I have three variables that I believe will predict
psychological hostility: (1) An individual's report of task significance
(TSIG), (2) whether the respondent is in a group that as a whole reports
high task significance(GTSIG), and finally (3) the vertical cohesion
i.e., leadership quality) in the group (GVCOH). Note that GTSIG and
GVCOH are company averages.

The data frame looks like this:

2 3.000000 3.0 2.882576 3.541667
2 4.000000 0.4 2.882576 3.541667
2 2.666667 2.2 2.882576 3.541667
2 4.000000 0.0 2.882576 3.541667
3 4.333333 0.4 2.948403 3.468468
3 3.000000 0.0 2.948403 3.468468
3 4.000000 0.0 2.948403 3.468468

To test my theoretical interests I run this series of models:

First to test whether an individual's self reports of task significance
are related to his or her psychological hostility:

mod1<-lme(HOS~TSIG, random=~TSIG,cluster=~COMPID)

The parameter estimate for TSIG is -.30 with a z ratio of -10.22. In
HLM the estimate is -.30 and the t(48) is -10.21.

Second, to test whether the contextual effect of the average level of task
significance in the group is related to an individual's psychological hostility:

mod2<-lme(HOS~TSIG+GTSIG, random=~TSIG+GTSIG,

The parameter estimate for GTSIG is -.29 with a z ratio of -4.17. In
HLM the estimate is -0.17 with a t(47) of -2.04.

Third, to test whether the contextual effect of the average level of vertical
cohesion in the group is related to an individual's psychological hostility:

random=~TSIG+GTSIG+GVCOH, cluster=~COMPID)

The parameter estimate for GVCOH is -.41 with a z ratio of -3.89. In
HLM the estimate is -.36 with a t(46) of -3.59.

Finally, to test whether the levels of vertical cohesion within the groups
moderate the relationship between individual reports of task significance
and psychological hostility.


The parameter estimate for the interaction is .27 with a z-ratio of 3.46.
In HLM the estimate is .25 with a t(47) of 2.56.

My questions for the S-PLUS gurus are as follows:

1. Am I using lme correctly to test these hypotheses? I'm probably
displaying my ignorance, but I've been a little puzzled by the random
command in reading up on lme. On theoretical grounds, I would consider
all the variables to be random effects.

2. Should I consider these (mostly) minor differences between HLM and lme
to be a function of differences in the estimation algorythms?

3. In HLM the independent variable TSIG was group-mean centered. In lme
it was not. I reran the lme equations using the group-mean centered
independent variable (the scale command in S-PLUS provides an easy way to
group-mean center variables) thinking that this might make the results more
comparable. While I have not shown the results of those analyses, they
were not pretty. They did not match the results from HLM, and in a number
of cases lme did not return an answer and gave me the message
"Error in .C("lme_loglik",: QR decomposition returned impossible result".
Why does lme baulk when I enter in a group-mean centered variable?

Paul Bliese
Walter Reed Army Institute of Research
Washington DC 20307

This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news