[R] simple fit

R. Michael Weylandt michael.weylandt at gmail.com
Thu Dec 8 16:56:06 CET 2011


Fit y-b without an intercept? (which you do by adding "+ 0" or "- 1"
to the model formula) Not sure if this is the optimal result, but it
will give you a pretty reasonable answer.

Michael

On Thu, Dec 8, 2011 at 10:52 AM, Alaios <alaios at yahoo.com> wrote:
> Dear all,
>  I have a formula of the form
> y=ax+b
> I know everything except b. How I can ask R to do fitting to find only the value of b?
> I already know the lm() but it always return both an intercept point (b) and the a.
>
> What should I do ?
>
> I would like to thank you in advance for your help
>
> B.R
> Alex
>
>        [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help at r-project.org 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