lme4 heteroscedasticity???
------------------------------ Message: 3 Date: Mon, 13 Oct 2014 10:17:54 -0500 From: Douglas Bates <bates at stat.wisc.edu> To: David Cox <dac64 at cam.ac.uk> Cc: R-mixed models mailing list <r-sig-mixed-models at r-project.org> Subject: Re: [R-sig-ME] varFixed function query in lme Message-ID: <CAO7JsnQpZhGyfcTf+RDUT5mDoht8L=UtvXS7+vtF0DB3LMJaZA at mail.gmail.com> Content-Type: text/plain; charset="UTF-8" It is best to send inquiries like this to the R-SIG-Mixed-Models at R-project.org mailing list, which I am cc:ing on this reply. I am no longer the maintainer of the nlme package - I was pushed aside by R Core many years ago and I really don't know what changes have been made since they took over.
On Mon, Oct 13, 2014 at 8:46 AM, David Cox <dac64 at cam.ac.uk> wrote:
Dear Professor Bates, I'm a neuroscience PhD student at Cambridge University. I saw that you maintain the 'varFixed' function for the 'weights' option in the nlme library. I have been reading the help manual but I'm a little stuck on a problem and wondered if you might have any quick suggestions. I'm using lme to model the peptide sequences of a set of proteins for cancer patients and healthy individuals. I want to use the weights function so that the peptide intensities are inversely weighted with the variance. The higher the variance, the lower the weighting etc. As the peptide intensities of cancer patients and healthy individuals will be different, I want to apply this weighting separately for each group. At the moment I've tried with a model like this for the 1st protein: Peptide Intensities ~ Covariates + Peptide Sequences + Group, random = Sample Id, data = data, weights = ~ Group Group denotes whether each intensity is a cancer patient/healthy person. Sample id is the id of each cancer/healthy sample. This doesn't work though. I get an error saying: "Error in Math.factor(attr(object, "covariate")) : abs not meaningful for factors." Many Thanks David Cox
This would be an easy exercise in JAGS or OpenBUGS. I believe there is a linear regression + multiple sigmas example (varIdent) in: Introduction to WinBUGS for Ecologists: Bayesian approach to regression, ANOVA, mixed models and related analyses Marc Kery Adding two crossed random effects is not difficult neither. Kind regards, Alain