[R-sig-ME] Testing for significant intercept-slope correlation in nlme
Kevin Hallgren
khallg at unm.edu
Thu Aug 9 19:20:18 CEST 2012
Hi R-SIG,
I'm working on a study that is predicting daily urges to drink alcohol
based on daily marital satisfaction. My model has daily observations
nested within participants, and includes random intercepts (i.e.,
individuals may vary in how many urges they experience) and random
slopes for marital satisfaction (i.e., individuals may vary in how
much their marital satisfaction predicts their urges to drink).
I want to test whether the random intercept-slope correlation is
statistically significant using a chi-square test with nested model
comparison, but I'm having trouble specifying the random effects to do
this.
I can create a model with only random slopes and compare that against
a model with random intercepts, random slopes, and intercept-slope
correlation, but doing a nested model comparison combines the
significance test of the random slope effect and the slope-intercept
correlation into one test of significance. Ideally, I would like to
test the significance of the slope variance and the intercept-slope
correlation separately.
Using nlme (which I selected over lme4 because it allows for temporal
autocorrelation effects), I can specify
random=~1|IDNUM, #Random intercepts
random=~1 + PREV_URGE_CTRD|IDNUM, #Random intercepts, slopes, and
intercept-slope correlation
But I cannot figure out how to specify random intercepts and slopes
but NO intercept-slope correlation, e.g.,
random= ~(1|IDNUM) + (0 + PREV_URGE_CTRD|IDNUM), #produces an error message
1. Does anyone know how to specify random intercepts and random
slopes but suppress the intercept-slope correlation using nlme? I'd
like to stick with the nlme package if possible.
2. If that is not possible, does anyone know of a good way (or
references) to test the significance of the slopes and the
significance of the intercept-slope correlation when a nested model
comparison changes both of those random effects simultaneously?
An example of the full model (which includes other fixed effects not
described above) is here:
m1 = lme(NEXT_MAR ~ PREV_MAR + SESSNUM + TXCOND + TXCOND*SESSNUM +
PREV_URGE_CTRD + PREV_URGE_PERSON_MEAN + PREV_URGE_CTRD*TXCOND +
TXCOND*PREV_URGE_CTRD*SESSNUM+ PREV_URGE_PERSON_MEAN*TXCOND +
PREV_URGE_PERSON_MEAN*SESSNUM + TXCOND*PREV_URGE_PERSON_MEAN*SESSNUM,
random=~1|IDNUM,
data=d,
na.action=na.omit,
correlation=corAR1(0, form = ~SESSION_DAY|IDNUM),
method="ML")
Thanks!
Kevin
More information about the R-sig-mixed-models
mailing list