Skip to content

how to test this

3 messages · Jin.Li@csiro.au, Simon Blomberg, Brian Ripley

#
This is two tests: Whether the slope != 1 and whether the intercept != 0.

To do this, include an offset in your model:

fit  <- lm(y ~ x + offset(x), data=dat)

HTH,

Simon.
At 03:44 PM 3/08/2005, Jin.Li at csiro.au wrote:
Simon Blomberg, B.Sc.(Hons.), Ph.D, M.App.Stat.
Centre for Resource and Environmental Studies
The Australian National University
Canberra ACT 0200
Australia
T: +61 2 6125 7800 email: Simon.Blomberg_at_anu.edu.au
F: +61 2 6125 0757
CRICOS Provider # 00120C
#
On Wed, 3 Aug 2005, Simon Blomberg wrote:

            
Neither model given has an intercept ....
but no intercept, so use

summary(lm(y ~ 0 + x + offset(1.05*x), data=dat))

and look if the coefficient of x is significantly different from zero.

E.g.

x <- 1:10
set.seed(1)
y <- 1.05*x + rnorm(10)
summary(lm(y ~ 0 + x + offset(1.05*x)))

Coefficients:
   Estimate Std. Error t value Pr(>|t|)
x  0.03061    0.03910   0.783    0.454

is not.