Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.LNX.4.44.0306051402270.1215-100000@gannet.stats>
Date: 2003-06-05T13:08:18Z
From: Brian Ripley
Subject: Regression slopes
In-Reply-To: <5.1.0.14.0.20030605125903.01e52b78@gatty.st-and.ac.uk>

No modification needed.  Fit either of

lm(y-x ~ x + z)
lm(y ~ x + z + offset(x))

and the t-test in the summary will be a test of the coefficient of x being 
one.

You can also use such models to do an anova against a modle with unit 
coefficient.

On Thu, 5 Jun 2003, Martin Biuw wrote:

> Sorry if this is an obvious one, but is there a simple way to modify the lm 
> function to test whether a slope coefficient is significantly different 
> from 1 instead of different from 0?

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595