Skip to content

solving nls

2 messages · jorfid, Jean V Adams

#
Hi,

I have some data I want to fit with a non-linear function using nls, but it
won't solve.
Error in nls(lcfu ~ lN0 + log10(1 - (1 - 10^(k * t))^m), data = cfu_data,  : 
  step factor 0.000488281 reduced below 'minFactor' of 0.000976562

Tried to increase minFactor and number of iteration, but resulted in
extremely high number of iterations
Error in nls(lcfu ~ lN0 + log(1 - (1 - 10^(k * t))^m, base = 10), data =
cfu_data,  : 
  number of iterations exceeded maximum of 50000

Tried to give the derivatives, but got an error message I don't understand:
+ c('lN0', 'k', 't', 'm'), # parameter names
+ function(lN0, k, t, m){} # arguments for result
+ )
Error in qr.default(.swts * attr(rhs, "gradient")) : 
  NA/NaN/Inf in foreign function call (arg 1)

I have many datasets, but here is one as an example:

t		lcfu
0		7.344108507
1.0625		7.166004379
1.958333333	7.317609443
3.722222222	7.099456839
6.847222222	7.009846065
16.95833333	6.7143479
28.90625	6.086498408
37.9375		5.060249368
45.29166667	3.69628886
57.29166667	1.008174184

Thanks
J?rgen


--
View this message in context: http://r.789695.n4.nabble.com/solving-nls-tp4326845p4326845.html
Sent from the R help mailing list archive at Nabble.com.