[R] nls
Komanduru Sai C
sck2348 at cacs.louisiana.edu
Wed Feb 19 05:33:02 CET 2003
Hi,
I am using nls library
df <- read.table("data.txt", header=T);
library(nls);
fm <- nls(y ~ a*(x+d)^(-b), df, start=list(a=max(df->y,na.rm=T)/2,b=1,d=0));
coef(fm);
q();
When i am using the above routine i am getting the following error
Error in nlsModel(formula, mf, start) : singular gradient matrix at initial
parameter estimates
Can some one help me in this.
The data.txt file looks like this
x y z
1.0 NA 478
2.0 NA 473
3.0 NA 449
4.0 NA 446
5.0 NA 438
6.5 NA 437
6.5 NA 437
8.0 NA 427
9.0 NA 426
10.0 NA 425
11.0 NA 424
14.0 NA 423
14.0 NA 423
14.0 NA 423
14.0 NA 423
14.0 NA 423
.........
The y field has some values at the bottom.
Thanks,
SAi
More information about the R-help
mailing list