[R] after lm-fit: equality of two regression coefficients test

Christoph Lehmann christoph.lehmann at gmx.ch
Mon Aug 30 12:14:28 CEST 2004


Let's assume, we have a multiple linear regression, such as the one 
using the Scottish hills data (MASS, data(hills)):

one dependent variable: time
two independent var (metric): dist, climb

if I am interested, after (!) fitting a lm:

	my. lm <- lm(time ~ dist + climb, data = hills)

in the equivalence (or non-equivalence) of the two predictors "dist" and 

	H0: dist = climb

Is there any function in R, which lets me calculate this, in just giving 
the lm-object "my.lm" and e.g. a vector such as c(1, -1), 
operationalizing the hypothesis H0: t(c(1, -1)) %*% c(dist, climb) = 0 ?

many thanks



More information about the R-help mailing list