[R] how to fit y=m*x

John Kane jrkrideau at yahoo.ca
Thu Jun 14 21:38:17 CEST 2007


Yes it does  If you have R installed simply type
?lm

This gives you the appropriate help page.

Note for a no intercept regression

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


--- genomenet at gmail.com wrote:

> Hi There,
> 
> I have a set of data (xi,yi).I want to fit them with
> the equation
> y=mx. 
> 
> note: in the above equation, there is no intercept.
> 
> I don't know how to use common software such as R ,
> matlab, sas, or
> spss to do this kind of regression.
> 
> Does anyone know how to do this?
> 
> I know it is easy to use least square method to do
> this by
> programming. But I want to find if there exists some
> common software
> which can do this. 
> 
> Thank you very much.
> 
> Van
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained,
> reproducible code.
>



More information about the R-help mailing list