Skip to content
Prev 239 / 20628 Next

random effect variance per treatment group in lmer

From: "Afshartous, David" <afshart at exchange.sba.miami.edu>
Subject: Re: [R-sig-ME]
"Afshartous, David" <afshart at exchange.sba.miami.edu> wrote:
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
Message-ID: <fc.004c4d193172ebbb3b9aca00d002bdd4.3172eee8@umit.maine.edu>
In-Reply-To: <mailman.199.1184187515.2070.r-sig-mixed-models@r-project.org>