On Tue, 2004-07-20 at 17:02, Avril Coghlan wrote:
Hello,
I'm a newcomer to R so please forgive me if this is a silly question.
It's that I have a linear regression: fm <- lm (x ~ y) and I want to test whether the slope of the regression is significantly less than 1. How can I do this in R?
Another way of doing this is to use offset(x) in the model formula
summary(fm <- lm(y ~ x + offset(x)))
(I know you wrote lm(x ~ y) but I find I have to think of it as lm(y ~ x) - old habits are hard to break.)
If you want to test for "slope is significantly less than 2" you would use
summary(fm <- lm(y ~ x + offset(2*x)))
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
