[R] Y-intercept Value

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Aug 7 05:23:29 CEST 2007


?offset : you can specify a different intercept for each case, or a common 
one.

Or you could just use lm (y - 3 ~ 0 +x), but offset() works better for 
prediction.

On Mon, 6 Aug 2007, Benjamin Zuckerberg wrote:

>
> Hello everyone,
>
> Quick question...is there a way of specifying a y-intercept value
> within a lm statement.  For example, if I wanted to specify the
> regression to pass through the origin I would enter lm(y~0+x).  But
> can I specify an actual term such as 1,2,3,4, etc. as an intercept
> value?  Thank you!
>

-- 
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



More information about the R-help mailing list