[S] Summary: lme and HLM

bliese@wrair-emh1.army.mil
20 Feb 98 09:31:00 EST


Yesterday I posted a message asking about the similarites between HLM
and lme. I received a number of responses from S-PLUS users who
requested that I post the answer to my questions.

First and foremost, my thanks to Jose' Pinheiro for supplying the
answers to my questions. I've included his message after my re-
analyses using his input.

A quick overview of Jose's response translated back into HLM lingo is
that what I needed to do was specify my level 1 variable (TSIG) in
the random statement. Where I went wrong was to include my level 2
variables (GTSIG, GVCOH and GVCOH:TSIG) in my random statement. Once
Jose pointed out my error, it made a lot of sense that it should be
modeled that way.

Below are my hypotheses and tests of my hypotheses using the correct
random statement. As one can see, the HLM and lme results are almost
identical. For a refresher, I restate the situation...

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:

COMPID TSIG HOS GVCOH GTSIG
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, cluster=~COMPID)

The parameter estimate for GTSIG is -.17 with a z ratio of -2.04. 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
verticalcohesion in the group is related to an individual's psychological
hostility:

mod3<-lme(HOS~TSIG+GTSIG+GVCOH, random=~TSIG, cluster=~COMPID)

The parameter estimate for GVCOH is -.36 with a z ratio of -3.60. In
HLM the estimate is -.36 with a t(46) of -3.59. In lme, the parameter
estimate for GTSIG is no longer significant -0.08 with a z ratio of
-0.92. In HLM the corresponding values are -0.08 and and -.92 as well.

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

mod4<-lme(HOS~TSIG+GTSIG+GVCOH+TSIG:GVCOH,random=~TSIG, cluster=~COMPID)

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

As for my questions about group-mean centering (subtracting the group's
mean score from the individual score), I found that when I group mean
centered TSIG, the HLM and lme results were not as similar as above.
However, I no longer encountered the error messages that I had received
earlier.

Jose's response is included below:

Paul Bliese
Walter Reed Army Institute of Research
Washington DC 20307
bliese@wrair-emh1.army.mil

____________________________________________________________________________
I am one of the developers of the lme code, together with Doug
Bates. I don't have any experience with HLM, so I will just be able to
address part of your questions and guess the rest.

> 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,
> cluster=~COMPID)
>
> 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.

>From the first few rows of your data frame, it seems that GTSIG is
constant for each company. If that's indeed the case, it will be
totally confounded with the random intercept term that you are
including in the model. That is, when you write random = ~TSIG+GTSIG,
you are implicitly declaring three random effects in lme: the
intercept, the TSIG effect, and the GTSIG effect. If indeed the
intercept and the GTSIG random effects are confounded, you are
overparametrizing your model and the solution you are obtaining
corresponds to a "rank deficient" model. Is GTSIG always constant for
each company?

I am also not sure how HLM defines the covariance matrix of the
random effects. In lme, by default you will get a general covariance
matrix, which in the case of your second model will correspond to 3
variances and 3 covariances.

> 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:
>
> mod3<-lme(HOS~TSIG+GTSIG+GVCOH,
> random=~TSIG+GTSIG+GVCOH, cluster=~COMPID)

It also seems that GVCOH is constant for each company, making the
previous problem even worse (if that's in fact the case). You now
have only two "real" random effects in the model, but are defining 4
random effects (three of them totally confounded). If I am guessing
right, I am surprised that you even got lme to converge for such an
ill-conditioned model.

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

Same comments as in 2 and 3, but even worse parametrization problems,
as the TSIG:GVCOH random effects is completely confounded with the
TSIG random effect.

> 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?

I am not quite sure what you mean by group-mean centered, but I am
assuming you remove the company means from each observation(?) In
this case, you will be removing differences across companies and
given that your model is badly overparametrized (provided my initial
guesses are right), you are "pushing the estimation problem over the
edge" and causing the optimization algorithm to crash. The problem,
in this case, is not the group centering, but the fact that the random
effects for two of your terms are confounded with the intercept.

When you specify the model in HLM, do you declare all terms as random?
How many variance and covariance estimates do you get? Are the
variables GVCOH and GTSIG really constant for each company?

It seems to me that the correct way to analyze these data is to set
random = ~TSIG and to add the other variables as fixed effects without
changing the random effects specification.

Best,
--Jose' Pinheiro

-----------------------------------------------------------------------------
Jose' Pinheiro
Bell Laboratories jcp@research.bell-labs.com
600 Mountain Avenue, Room 2C-258 office: (908) 582-2390
Murray Hill, NJ 07974 fax: (908) 582-3340
-----------------------------------------------------------------------------

-----------------------------------------------------------------------
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