[R] Mixed model question.

Rolf Turner r.turner at auckland.ac.nz
Tue Jul 29 01:15:26 CEST 2008


Thanks for the response.  I ***think*** I'm making a bit of  
progress ....

On 29/07/2008, at 10:14 AM, Douglas Bates wrote:

> On Sun, Jul 27, 2008 at 9:06 PM, Rolf Turner  
> <r.turner at auckland.ac.nz> wrote:

	<snip>

>> What I *don't* understand is the correlation structure of the  
>> estimates
>> produced by lmer(), which is:
>>
>> Correlation of Fixed Effects:
>>        (Intr) tstnm2 tstnm3 tstnm4 tstnm5
>> tstnum2 -0.434
>> tstnum3 -0.434  0.500
>> tstnum4 -0.434  0.500  0.500
>> tstnum5 -0.434  0.500  0.500  0.500
>> tstnum6 -0.434  0.500  0.500  0.500  0.500
>>
>> So apparently the way I called lmer() places substantial constraints
>> on the covariance structure.
>
> That's the correlation matrix of the fixed-effects parameters.  You
> should have separately gotten estimates of the variance-covariance of
> the random effects, which you coyly did not show us :-).  Because you
> are allowing only a simple, scalar random effect per student there
> will be an estimate of the variance of this random effect and an
> estimate of the residual variance.

	Far be from me to be coy!  The thing is, I'm floundering
	in the dark, not really understanding what I'm doing.

	Here is the bit of the output of summary() that I didn't show:

    Data: schooldat
   AIC  BIC logLik MLdeviance REMLdeviance
  4470 4507  -2228       4435         4456
Random effects:
  Groups   Name        Variance Std.Dev.
  stdnt    (Intercept) 1.41915  1.19128
  Residual             0.85903  0.92684
number of obs: 1440, groups: stdnt, 240

>> How can I (is there any way that I can)
>> tell lmer() to fit the most general possible covariance structure?
>
> It sounds like you want a model formula of
>
> lmer(y ~ tstnum + (0 + tstnum|stdnt), data=schooldat)
>
> but that model will have 21 variance-covariance terms to estimate (22
> if you count the residual variance but that one gets profiled out of
> the optimization).  I would not be surprised if the estimated
> variance-covariance matrix for the random effects turns out to be
> singular.

	Tried that; got a warning message:

Warning message:
In .local(x, ..., value) : nlminb returned message false convergence (8)

I need to mess around with the output produced and see if I can fit
it into my mental structures.  I think I'm converging on comprehension
of the foregoing syntax, but.

>> If anyone wishes to experiment with the real data set (it's a bit
>> too big to post here) I can make it available to them via email.
>
> Generally I would jump at the chance but not with my "To Do" list in
> its current, sadly over-committed, state.

	Pity, but perfectly understandable.  Any other takers? :-)

	Thanks again.

		cheers,

			Rolf


######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}



More information about the R-help mailing list