[R-sig-ME] Variance-covariance matrix for normalized residuals in lme
Wiener, Matthew
matthew_wiener at merck.com
Tue Nov 25 20:09:01 CET 2008
Thanks for your reply. I played around with the getVarCov.lme function
for a little while. The code indicates that you can only have a single
level of random effect, and I pass that test with a random effect for
subject only. However, my correlation structure on the residuals
depends on two levels - correlations occur within subject and date.
The two levels there seem to cause a problem, as the
corMatrix(obj$modelStruct$varStruct) has names that indicate subject and
day, while we try to take levels of them by subject only.
It does look as though the calculations should still work, and at any
rate now I can find some of these things.
Regards,
Matt
-----Original Message-----
From: Kingsford Jones [mailto:kingsfordjones at gmail.com]
Sent: Thursday, November 13, 2008 12:52 PM
To: Wiener, Matthew; r-sig-mixed-models at r-project.org
Subject: Re: [R-sig-ME] Variance-covariance matrix for normalized
residuals in lme
On Thu, Nov 13, 2008 at 7:29 AM, Wiener, Matthew
<matthew_wiener at merck.com> wrote:
> All -
>
> We are fitting an lme model with several fixed effects, a single
random
> effect, and an AR1 structure on the residuals. To assess the model we
> examine the residuals. The predicted vs. residual plots look fine
using
> raw residuals or Pearson residuals (leaving aside serial
correlations).
> However, the normalized residuals - which should account for the AR1
> structure - have a very strange feature. For large predicted values,
> they show HUGE residuals - residuals an order of magnitude larger than
> the predicted values themselves.
>
> Working to figure out what was going on, we constructed the
> variance-covariance matrix of the residuals based on the parameter
> estimates, and calculated the normalization matrix independently.
When
> we multiplied that matrix by the vector of residuals, we ended up with
> normalized residuals that looked fine - there were no extremely large
> normalized residuals.
>
> We would like to compare our hand-computed variance-covariance matrix
to
> the one used by lme, but we have not been able to figure out how to
> extract that matrix. In lme4, we would use VarCorr, but in lme4, as
far
> as we can tell, we can't have the AR1 correlation structure, which is
> very important in our problem.
>
> Is there some way to get at that matrix?
Does nlme::getVarCov return what you're looking for?
> And has anyone else had the
> normalized residuals blow up in this way?
>
I don't recall ever seeing this, but a guess is high leverage points
(e.g. some outlying large values in the column space of the X matrix).
hth,
Kingsford Jones
> Thanks,
>
> Matt Wiener, Shubhankar Ray, Vladimir Svetnik
> Notice: This e-mail message, together with any
attachme...{{dropped:15}}
>
> _______________________________________________
> R-sig-mixed-models at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
Notice: This e-mail message, together with any attachme...{{dropped:12}}
More information about the R-sig-mixed-models
mailing list