Paul Smith
2006-Aug-03 13:33 UTC
[R] Looking for transformation to overcome heterogeneity of variances
Dear All My data consists in 96 groups, each one with 10 observations. Levene's test suggests that the variances are not equal, and therefore I have tried to apply the classical transformations to have homocedasticity in order to be able to use ANOVA. Unfortunately, no transformation that I have used transforms my data into data with homocedasticity. The histogram of variances is at http://phhs80.googlepages.com/hist1.png Is someone able to suggest to me a transformation to overcome the problem of heterocedasticity? Thanks in advance, Paul
Peter Dalgaard
2006-Aug-03 13:45 UTC
[R] Looking for transformation to overcome heterogeneity of variances
"Paul Smith" <phhs80 at gmail.com> writes:> Dear All > > My data consists in 96 groups, each one with 10 observations. Levene's > test suggests that the variances are not equal, and therefore I have > tried to apply the classical transformations to have homocedasticity > in order to be able to use ANOVA. Unfortunately, no transformation > that I have used transforms my data into data with homocedasticity. > The histogram of variances is at > > http://phhs80.googlepages.com/hist1.png > > Is someone able to suggest to me a transformation to overcome the > problem of heterocedasticity?Not based on that information. Try the following instead: fit <- lm(y~g) par(mfrow=c(2,2)); plot(fit) -- O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
Brian S Cade
2006-Aug-03 19:11 UTC
[R] Looking for transformation to overcome heterogeneity of variances
Paul: It is too bad that most peoples statistical thought processes lead them to thinking heterogeneity is something to overcome so that a simple test of differences in means with ANOVA can be made. If you have that much heterogeneity among 96 groups (hard for me to imagine otherwise), perhaps the distributional heterogeneity rather than simple shifts in means is the more important effect. You might try using omnibus tests of distributional differences (eg., MRPP, coverage tests, etc.) or compare multiple quantiles (e.g., with quantile regression) since you've already admitted that the group distributions differ by more than just a shift in means. Heterogeneous variances among groups immediately implies that there is not a single parameter describing changes in distributions among groups. Focusing on just a comparison of means, while traditional and analytically expedient, is unlikely to be very enlightening. You could of course, weight each group inversely by its variance to achieve a weighted comparison of means. But doing this just makes it so that you've made a valid test on only one of the parameters characterizing distributional differences. A better analysis but still not as enlightening as possible. My 2 pence. Brian Brian S. Cade U. S. Geological Survey Fort Collins Science Center 2150 Centre Ave., Bldg. C Fort Collins, CO 80526-8818 email: brian_cade@usgs.gov tel: 970 226-9326 "Paul Smith" <phhs80@gmail.com> Sent by: r-help-bounces@stat.math.ethz.ch 08/03/2006 07:33 AM To r-help@stat.math.ethz.ch cc Subject [R] Looking for transformation to overcome heterogeneity of variances Dear All My data consists in 96 groups, each one with 10 observations. Levene's test suggests that the variances are not equal, and therefore I have tried to apply the classical transformations to have homocedasticity in order to be able to use ANOVA. Unfortunately, no transformation that I have used transforms my data into data with homocedasticity. The histogram of variances is at http://phhs80.googlepages.com/hist1.png Is someone able to suggest to me a transformation to overcome the problem of heterocedasticity? Thanks in advance, Paul ______________________________________________ R-help@stat.math.ethz.ch 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. [[alternative HTML version deleted]]
Paul Smith
2006-Aug-04 10:21 UTC
[R] Looking for transformation to overcome heterogeneity of variances
Thanks to all contributors for the fruitfulness of this discussion. I am speculating about a simpler solution: to use a non-parametric approach. To avoid the requirement of having normal residuals, Frank Harrell has suggested here the following non-parametric procedure: library(Design) # also requires library(Hmisc) f <- lrm(y ~ a*b*c*d) f anova(f) Could someone please tell me whether that also works when there is no homoscedasticity? What are the assumptions of that method? Paul
Apparently Analagous Threads
- Looking for transformation to overcome heterogeneity ofvariances
- Drawing a histogram from a massive dataset
- How to fit a linear model to data by minimizing the mean absolute percent error?
- General question about GLMM and heterogeneity of variance
- modeling variance heterogeneity in lme4