search for: 3observations

Displaying 1 result from an estimated 1 matches for "3observations".

Did you mean: observations
2004 Jun 11
1
comparing regression slopes
...values in one of the data sets). Now I want to compare the two regression slopes. I came across some R-code of Spencer Graves in reply to a similar problem: http://www.mail-archive.com/r-help at stat.math.ethz.ch/msg06666.html The code was: > df1 <- data.frame(x=1:10, y=1:10+rnorm(10)) #3observations in original code > df2 <- data.frame(x=1:10, y=1:10+rnorm(10)) > > fit1 <- lm(y~x, df1) > s1 <- summary(fit1)$coefficients > fit2 <- lm(y~x, df2) > s2 <- summary(fit2)$coefficients > > db <- (s2[2,1]-s1[2,1]) > sd <- sqrt(s2[2,2]^2+s1[2,2]^2...