[R] One-parameter fitting

S Ellison S.Ellison at LGCGroup.com
Wed Jul 3 16:28:30 CEST 2013


> Now I have question:   what about y=b  fitting?  is there any model to
> force or  impose the ax to be zero

Rui Barradas has answered correctly for a simple lm case.

You can also do 
lm(y~1) to obtain an estimated mean.
 
That formulation happens to be quite useful if you are interested in a purely random-effects model* fitted using, say, lme, though you won't generally get a simple mean for unbalanced data in such a case.

S Ellison



*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}



More information about the R-help mailing list