[R] testing slopes different than a given value

Manuel Gutierrez
Thu, 10 Feb 2005 18:36:25 -0000

In a multiple linear regression with two independent
variables is there any function in R to test for the
coefficients being different than some given values?
Example:
x1<-rnorm(100)
x2<-rnorm(100)
y<-3+0.6*x1+0.3*x2
lm(y~x1+x2)
Obtain a test for the coefficients for x1 being
different than 0.6 and for x2 different than 0.3
Thanks
Manuel