[R] Regression query ...

David Winsemius dwinsemius at comcast.net
Tue Oct 30 03:11:41 CET 2007


Rob Hodgkinson wrote:
> Forgive me, I do not yet use R nor is it (yet) installed on my machine.
>
> I just need an answer to whether (and how ?) R is able to do Ordinary Least
> Squares (OLS) Regression with the requirement that the regressed line must
> pass through the origin.
>
>   
When you enter ?lm at the R-prompt you should get a help file that 
includes a paragraph like this:

"A formula has an implied intercept term. To remove this use either |y ~ 
x - 1| or |y ~ 0 + x|. See |formula <formula.html>| for more details of 
allowed formulae."

-- 
David Winsemius



More information about the R-help mailing list