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

2005-08-16 Thread Christoph Scherber
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 SokalRohlf (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


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

2005-08-16 Thread Liaw, Andy
Sounds like you're looking for something like pure.error.anova in the `alr3'
package on CRAN...

Andy

 From: Christoph Scherber
 
 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 SokalRohlf 
 (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
 
 


__
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