Displaying 1 result from an estimated 1 matches for "sxx1".
Did you mean:
sx1
2008 Jun 04
1
Comparing two regression lines
...of the R script is appended below.
How would you proceed?
Many thanks for your help!
Best wishes,
Christoph
##
lm1=lm(y1~x) # y1 and y2 are different response variables, scaled to [0;1] using a ranging transform
lm2=lm(y2~x) # n is 12 for each regression
model3=lm(y~x*FACTOR)
summary(model3)
sxx1=sum((y1-mean(y1))^2)
sxx2=sum((y2-mean(y2))^2)
s.pooled=(4805.2+6946.6)/20
SED=sqrt(s.pooled*(1/sxx1+1/sxx2))
t=(528.54-446.004)/SED #residual SS from lm1 and lm2 divided by SED
qt(0.025,20) #compare with t distribution at 20 d.f.
##
#(using R 2.6.2 on Windows XP)