`nls` fitting error: always reach maximum number of iterations regardless starting values
问题 Using this parametrization for a growth curve logistic model I created some points with: K =0.7 ; y0=0.01 ; r =0.3 df = data.frame(x= seq(1, 50, by = 5)) df$y = 0.7/(1+((0.7-0.01)/0.01)*exp(-0.3*df$x)) Can someone tell me how can I have a fitting error if create the data with the model starters? fo = df$y ~ K/(1+((K-y0)/y0)*exp(-r*df$x)) model<-nls(fo, start = list(K=0.7, y0=0.01, r=0.3), df, nls.control(maxiter = 1000)) Error in nls(fo, start = list(K = 0.7, y0 = 0.01, r = 0.3), df, nls