Re: [R] nls() vs lm() estimates

From: Janne Huttunen <jmhuttun_at_stat.berkeley.edu>
Date: Fri, 13 Jun 2008 11:21:52 -0700

Héctor Villalobos wrote:
> Hi,
>
> I'm trying to understand why the coefficients "a" and "b" for the model: W = a*L^b estimated
> via nls() differs from those obtained for the log transformed model: log(W) = log(a) + b*log(L)
> estimated via lm(). Also, if I didn't make a mistake, R-squared suggests a "better" adjustment
> for the model using coefficients estimated by lm() . Perhaps I'm doing something wrong in
> nls()?

I didn't tried your code, but in general these estimates are different: for the former estimate you minimize the norm of the difference W-a*L^b (W are ) and for the latter you minimize the norm of the difference log(W)-(log(a)+b*log(L)). The solution for these problems are equal. That which approach you should choose depends on errors, for additive error model the former is better choice.

-- 
Janne Huttunen
University of California
Department of Statistics
367 Evans Hall Berlekey, CA 94720-3860
email: jmhuttun_at_stat.berkeley.edu
phone: +1-510-502-5205
office room: 449 Evans Hall

______________________________________________
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.
Received on Fri 13 Jun 2008 - 21:09:12 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 13 Jun 2008 - 21:31:17 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive