I'm not an expert in R, and I'm trying to fit thermal-death bacteria data to a weibull model:
log._CFU.ml=c(9.6,9.2,9,8.5,9,7.5,6.8,5.8)
time_min=c(0,10,15,20,25,30,35,45)
ecoli_52=data.frame(log._CFU.ml,time_min)
weibull=function(x,a,b){-(1/2.303)*((x/a)^b)} #first i defined the function
Then, I applied nls
:
mod.ecoli_52=nls(ecoli_52$log._CFU.ml~weibull(ecoli_52$time_min,a,b),
ecoli_52,start=list(a=1,b=1))
After that, it appeared to me the error
Error in numericDeriv(form[[3L]], names(ind), env) :
Missing value or an infinity produced when evaluating the model
I'm sure that this error is about the a and b values in start. Does a method exist to estimate these values?