[R] testing slopes different than a given value

John Fox
Thu, 10 Feb 2005 19:45:16 -0000

Dear Manuel,

Take a look at the linear.hypothesis function in the car package.

I hope this helps,
 John

--------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox
--------------------------------

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Manuel
> Gutierrez
> Sent: Thursday, February 10, 2005 1:36 PM
> To: r-help at stat.math.ethz.ch
> Subject: [R] testing slopes different than a given value
>
> 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
>
> ______________________________________________
> R-help at 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