[R] lmer (or lme) with heteroscedasticity

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Tue Jun 30 10:20:18 CEST 2009


Dear Daryl,

1) use pdDiag to get indepedent random effects.
lme(Y ~ disease, random = list(radiologist = pdDiag(~disease)), weight =
varGroup(~disease))

2) lmer can't handle variance structures like nlme can. I believe it is
on Douglas Bates to do list. But rather at the bottom of it.

HTH,

Thierry

PS The R-SIG-Mixed models is a more appropriate list for this kind of
questions.


------------------------------------------------------------------------
----
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometrics,
methodology and quality assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium
tel. + 32 54/436 185
Thierry.Onkelinx at inbo.be
www.inbo.be

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to
say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of
data.
~ John Tukey

-----Oorspronkelijk bericht-----
Van: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
Namens Daryl Morris
Verzonden: dinsdag 30 juni 2009 8:17
Aan: r-help at r-project.org
Onderwerp: [R] lmer (or lme) with heteroscedasticity

Hello,

I'm trying to fit a mixed-effects model with a single binary predictor
(case/control status in my case), a random intercept (e.g. dependent on
radiologist) and also a random slope (a per-radiologist difference
between cases and controls).

I know how to do that, but what I don't know how to do is both of (1)
allowing the variance to be different for cases and controls (2) forcing
the random effects to be independent

By "both", I mean:
(1) Using lme (from nlme library) I know how to use varGroup as
described in Pinheiro & Bates chapter 5, but in that library, I don't
know how to force the random effects to be independent.
(2) Using lmer (from lme4 library) I can force the random effects to be
independent (using a description published by Bates in the R magazine in
2005) but I don't know how to allow the variance to depend on group.

To be clear, the model I wan to fit is:

Y_{ij} ~ beta_0 + beta_1*disease_{ij} + b_i 0 + b_i1*disease_{ij} +
error_{ij} where b_i0 and b_i1 are independent Normal where error_{ij} =
Normal(0, sd_case) if disease_{ij}= 1 error_{ij} = Normal(0, sd_control)
if disease_{ij}= 2 i is an indicator of radiologist... a single
radiologist does multiple cases and multiple controls.

Thanks, Daryl

______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer 
en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is
door een geldig ondertekend document. The views expressed in  this message 
and any annex are purely those of the writer and may not be regarded as stating 
an official position of INBO, as long as the message is not confirmed by a duly 
signed document.




More information about the R-help mailing list