Hi R users
I'm trying to fit a model y=ax^b.
I know if I made ln(y)=ln(a)+bln(x) this is a linear regression.
But I obtain differente results with nls() and lm()
My commands are: nls(CV ~a*Est^b, data=limiares, start =list(a=100,b=0),
trace = TRUE) for nonlinear regression
and : lm(ln_CV~ln_Est, data=limiares) for linear
regression
Nonlinear regression model: a=738.2238151 and b=-0.3951013
Linear regression: Coefficients:
Estimate Std. Error t value
Pr(>|t|)
(Intercept) 7.8570224 0.0103680 757.8 <2e-16 ***
ln_Est -0.5279412 0.0008658 -609.8 <2e-16 ***
I think it should be a=exp("(Intercept) ") = exp(7.8570224) = 2583.815
and b=ln_Est
Probably I'm wrong, but why??
Thanks in advance.
Ana Quiterio
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html