[R] lmer model with continuos non normal response variable, transformation needed?
Christoph Scherber
Christoph.Scherber at agr.uni-goettingen.de
Thu Jul 24 10:14:58 CEST 2008
Dear Arams,
I would suggest to use lme() instead of lmer(), and then to use a variance function to model the
heteroscedasticity in the within-group errors, such as:
model.new=update(model,weights=varPower(form=~primary.covariate))
where model and model.new are lme fits, and primary.covariate is usually a numerical explanatory
variable.
Using varPower() as specified above when dealing with response variables that are proportions or
counts often helps in removing non-constant and/or non-normal errors.
See for example Fig. 5.2 on page 217 in Pinheiro and Bates.
Best wishes
Christoph
Bert Gunter schrieb:
> If I understand you correctly, then to paraphrase what Brian Ripley has
> stated in recent posts, it is not the (possibly transformed) response that
> you want to be normal, but rather the error distributions. Your response
> presumably contains systematic variation due to your covariates (your
> model). So using the K-S test as I think you describe is nonsense.
>
> I suggest you forget about testing for normality, transform your data
> "sensibly" (which is quite often not at all, even for proportions or
> counts), fit your model, and see what you get. If you're still hung up on
> distributional assumptions, check residual plots. Distributional assumptions
> are often most critical for inference, which for glmm's is problematic
> anyway, due to the crudeness of the asymptotic approximations (paraphrasing
> Doug Bates, now). They may or may not have a large impact on estimation,
> which is generally the greatest concern. Sensitivity analyses are a way to
> examine this.
>
> Cheers,
> Bert Gunter
> Genentech Nonclinical Statistics
>
>
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
> Behalf Of arams
> Sent: Thursday, June 26, 2008 9:39 AM
> To: r-help at r-project.org
> Subject: [R] lmer model with continuos non normal response variable,
> transformation needed?
>
>
> Hi.
>
> I want to do an lmer model but have doubts of what family I should use.
> My response variable was originally a proportion, however I standarized it
> for each year of data collection (20 in total). After standarizing it I
> checked for normality with the Kolmogorov-Smirnov test, and it turns out
> it is not normal. It ranges from -3 to 4.
> Since it is no longer a proportion I can't use a binomial distribution nor a
> normal distribution. I'm guessing I have to transform it, but this is a
> variable
> that has already been standarized. Anny suggestions?
> Thank you.
More information about the R-help
mailing list