[R] improvement of Ancova analysis

Andrew Robinson A.Robinson at ms.unimelb.edu.au
Sun May 4 04:23:56 CEST 2008


Tobi,

I think that it would be easier to provide advice if you were more
explicit on what the model will be used for, and what is the structure
of the data.  Is there only one measurement for each marsupial?  Is
the goal to

a) produce a model to predict marsupial weight given other variables,
and if so, why, 

b) produce a model to estimate the effect of introduction on weight,
with the other variables being nuisance variables, and if so, why,

c) something else (and why)

because all these factors affect the position that you could adopt
about the questions that you have.

Andrew

On Sun, May 04, 2008 at 04:00:16AM +0200, Tobias Erik Reiners wrote:
> 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.

-- 
Andrew Robinson  
Department of Mathematics and Statistics            Tel: +61-3-8344-6410
University of Melbourne, VIC 3010 Australia         Fax: +61-3-8344-4599
http://www.ms.unimelb.edu.au/~andrewpr
http://blogs.mbs.edu/fishing-in-the-bay/



More information about the R-help mailing list