[R] Non-linear regression analysis in R‏

Yann Labou yann.labou at outlook.com
Wed Dec 19 18:42:16 CET 2012


Hey all,

I'm trying to fit a non-linear model y ~ a * constant ^ b * x ^ c and 
estimates the paramaters a, b and c.

Using the nls function, I'm getting following error message:

Error in nlsModel(formula, mf, start, wts) :
   singular gradient matrix at initial parameter estimates

If I logarithmize the whole equation log(y) ~ log (a) + b * 
log(constant) + c * log(x) and fit the equation with lm, I get only NAs 
estimates for the second term on the right side:

Coefficients: (1 not defined because of singularities)

Do you have any hints on how to fit this equation or any alternatives to 
nls?

Thanks,
Yann



More information about the R-help mailing list