[R] improvement of Ancova analysis

Stephan Kolassa Stephan.Kolassa at gmx.de
Sun May 4 09:05:26 CEST 2008


Hi Tobias,

If you want to do inferential statistics with groups differing 
systematically on the covariate, you will need to be extra careful in 
your interpretation. See, e.g., Miller, G. A. & Chapman, J. P. 
Misunderstanding Analysis of Covariance, Journal of Abnormal Psychology, 
2001, 110, 40-48, and a lot of other similar things.

That said, with your wide variation in pes you may want to consider 
restricted cubic splines ("natural splines") in Frank Harrell's Hmisc 
and Design packages. At least, it would be interesting to test whether 
the influence of pes really is linear, which can be done easily with 
splines. See also Harrell, F. E. Regression Modeling Strategies, 
Springer, 2001.

Good luck with your small furry creatures!
Stephan


Tobias Erik Reiners schrieb:
> Dear Helpers,
> 
> I just started working with R and I'm a bit overloaded with information.
> 
> My data is from marsupials reindroduced in a area. I have weight(wt), 
> hind foot
> lenghts(pes) as continues variables and origin and gender as categorial.
> condition is just the residuals i took from the model.
> 
>> names(dat1)
> [1] "wt" "pes" "origin"  "gender" "condition"
> 
> my model after model simplification so far:
> model1<-lm(log(wt)~log(pes)+origin+gender+gender:log(pes))
> -->six intercepts and two slopes
> 
> the problem is i have some things I can't include in my analysis:
> 1.Very different sample sizes for each of the treatments
>> tapply(log(wt),origin,length)
> captive    site    wild
>     119     149      19
> 2.Substantial differences in the range of values taken by the covariate 
> (leg length) between treatments
>> tapply(pes,origin,var)
>  captive     site     wild
> 82.43601 71.44442 60.42544
>> tapply(pes,origin,mean)
>  captive     site     wild
> 147.3261 144.8698 148.2895
> 
> 4.Outliers
> 5.Poorly behaved residuals
> 
> thanks for the answer I am open minded to any different kind of analysis.
> 
> Tobi
> 
> ______________________________________________
> 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.
> 
>



More information about the R-help mailing list