[R] dealing with heteroscedasticity in lmer: problem with the method weights

From: doris gomez <dodogomez_at_yahoo.fr>
Date: Wed, 09 Jun 2010 10:39:32 +0000 (GMT)


Dear lmer users,

The experiment includes 15 groups of (3 males and 1 female). The female is characterized by its quality Q1 and Q2. Each male of a group is characterized by the number of MatingAttempts (with Poisson distribution). I want to examine if male mating attempts depend on female quality. I can see from graphic exploration that the within-group heterogeneity of male attempts increases with female quality Q1.

When including the method weights in the function lmer, I get the message that variables' length varies and the model does not run. lmer(MatingAttempts~Q1+Q2+(1|Group),data=file,family="poisson",na.action=na.omit, REML=FALSE, weights=varExp(form=~Q1))

If I run the same model (fixed effects and random effects) with lme, it works properly, which shows that there is no problem with data structure. lme(MatingAttempts~Q1+Q2,random=~1|Group,data=file,na.action=na.omit, method="ML", weights=varExp(form=~Q1))

I saw on the forum that lmer had problems in taking into account variance heterogeneity. Yet, the messages were old and there are maybe new solutions. How can I correct the analyses for this problem of heteroscedasticity? Should I normalise the within group variance before implementing the model? And deal with the variance (as a new variable to explain) in another model? Is there another way to solve this problem?

Thank you in advance for your help
Doris Gomez

      
	[[alternative HTML version deleted]]

______________________________________________
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. Received on Wed 09 Jun 2010 - 10:42:00 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 Jun 2010 - 17:40:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive