How to force intercept to zero using nls pacakge in R?

1k Views Asked by At

I used nls package to analyze non linear model (power curve, y= ax^b).

cal<- nls(formula= agw~a*area^b, data=calibration_6, start=list(a=1, b=1))
summary(cal)

enter image description here

enter image description here

What I want now is to force intercept (a) to zero to check something. In Excel, I can't set intercept for power curve. In R, is that possible to set intercept?

If possible, could you tell me how to do it?

enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

y~ x^b model is what I considered first,

 nls(formula= agw ~ area^b, data=calibration_6, start=list(b=1))

but, I also found other way, please check the below link.

How to calculate R-squared in nls package (non-linear model) in R?