[R] how to fit y=m*x

Andrew Robinson A.Robinson at ms.unimelb.edu.au
Thu Jun 14 20:44:46 CEST 2007


Probably

lm(y ~ x - 1)

will be better.  y~x doesn't remove the intercept, and ln() is a typo
(I hope!)

Andrew

On Thu, Jun 14, 2007 at 06:33:02PM +0000, Ndoye Souleymane wrote:
> Hi,
> 
> try : ln(y~x)
> 
> 
> >From: genomenet at gmail.com
> >Reply-To: genomenet at gmail.com
> >To: r-help at stat.math.ethz.ch
> >Subject: [R] how to fit y=m*x
> >Date: Thu, 14 Jun 2007 11:25:54 -0700
> >
> >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.
> 
> _________________________________________________________________
> D?couvrez le Blog heroic Fantaisy d'Eragon!
> 
> ______________________________________________
> 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.

-- 
Andrew Robinson  
Department of Mathematics and Statistics            Tel: +61-3-8344-9763
University of Melbourne, VIC 3010 Australia         Fax: +61-3-8344-4599
http://www.ms.unimelb.edu.au/~andrewpr
http://blogs.mbs.edu/fishing-in-the-bay/



More information about the R-help mailing list