[R-sig-ME] random effect variance per treatment group in lmer
Alan Cobo-Lewis
alanc at umit.maine.edu
Thu Jul 12 00:47:40 CEST 2007
From: "Afshartous, David" <afshart at exchange.sba.miami.edu>
Subject: Re: [R-sig-ME]
"Afshartous, David" <afshart at exchange.sba.miami.edu> wrote:
>(although it seem nonsensical to want such a covariance)
Dave,
Doug Bates' lmer formulas offer an elegant notation for constraining covariances to zero.
You won't have a covariance parameter if you use
( 0 + as.numeric(drug=="D") | Patient ) + ( 0 + as.numeric(drug=="P") | Patient )
which is why you'd want to use two terms instead of combining them as
( 0 + as.numeric(drug=="D") + as.numeric(drug=="P") | Patient )
because this second version would give you the silly covariace parameter (which unsurprisingly would always have the value 0, even though it would burn a degree of freedom)
alan
--
Alan B. Cobo-Lewis, Ph.D. (207) 581-3840 tel
Department of Psychology (207) 581-6128 fax
University of Maine
Orono, ME 04469-5742 alanc at maine.edu
http://www.umaine.edu/visualperception
More information about the R-sig-mixed-models
mailing list