[R] regression with more than one observation per x value

From: Christoph Scherber <Christoph.Scherber_at_uni-jena.de>
Date: Wed 17 Aug 2005 - 00:20:07 EST


Dear R users,

How can I do a regression analysis in R where there is more than one observation per x value? I tried the example in Sokal&Rohlf (3rd edn., 1995), page 476 ff., but I somehow couldnīt find a way to partition the sums of squares into "linear regression", "deviations from regression", and within-groups SS.

I tried

model1<-lm(y~as.numeric(x)+as.factor(x) #with treatment contrasts

but I am sure thereīs a better way around it. I would be very happy if anyone could give me some suggestions on this.

Best regards
Christoph.



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 Received on Wed Aug 17 00:22:18 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:39:49 EST