Skip to content
Prev 244 / 20628 Next

random effect variance per treatment group in lmer

Hmm, could it be a word-wrap issue? I just verified that the code works on R 2.5 with lme4 and lattice packages installed. See http://www.umaine.edu/visualperception/lme4het

The model I posted assumes that the subj-to-subj variability in baseline score has higher variability in the "D" condition than in the "P" condition. You are correct that there's no random effect for drug. I don't think you *want* there to be a
random effect for drug, since drug doesn't have levels sampled from some population (it's properly a fixed effect). Instead, the code I posted has the random effect of Patient with a higher variability in one level of drug than in the other level of
drug.

If you're looking some the drug to have a different time course for some patients than for other patients I think that'd be a random effect of Time. (To avoid overparameterization I think you'd almost surely want to treat time as a quantitative
predictor if you're going to model it as having a random effect.)

One of the reasons that I constructed a full example with a new sim was to get a big-enough data set together so that the lmer fit fairly obviously matched the parameters of the sim (to verify the correctness of the sim and the suggested model
formula). Another reason is that the code of your sim didn't actually have different subj-to-subj variability in the "D" condition than it did in the "P" condition, so a model with such an effect was overparameterized for your original simulated
data. Could this be why the lmer call I suggested failed for you?

BTW, nice to see someone from the UM School of Business (I didn't notice until just now what your email address said). I worked there about 20 years ago on the Applied AI Reporter when I was an undergraduate psychology major. But, looking at the SBA
web site, I recognize barely anyone, and those I do recognize probably wouldn't recognize me.

alan
"Afshartous, David" <afshart at exchange.sba.miami.edu> on Friday, July 13, 2007 at 10:44 AM -0500 wrote:
--
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