Skip to content
Prev 387425 / 398502 Next

Failure in predicting parameters

Hello,
I would like to use the Rutledge equation
(https://pubmed.ncbi.nlm.nih.gov/15601990/) to model PCR data. The
equation is:
Fc = Fmax / (1+exp(-(C-Chalf)/k)) + Fb
I defined the equation and another that subtracts the values from the
expectations. I used minpack.lm to get the parameters, but I got an
error:
```
+        -14.29, -20.26, -14.99, -21.05, -20.64, -8.03, -21.56, -1.28, 15.01,
+        75.26, 191.76, 455.09, 985.96, 1825.59, 2908.08, 3993.18, 5059.94,
+        6071.93, 6986.32, 7796.01, 8502.25, 9111.46, 9638.01, 10077.19,
+        10452.02, 10751.81, 11017.49, 11240.37, 11427.47, 11570.07, 11684.96,
+        11781.77, 11863.35, 11927.44, 11980.81, 12021.88, 12058.35, 12100.63,
+        12133.57, 12148.89, 12137.09)
+   Slope <- c(0)
+   for (i in 2:length(X)) {
+     delta_x <- X[i] - X[i-1]
+     delta_y <- Y[i] - Y[i-1]
+     Slope[i] <- delta_y/delta_x
+   }
+   return(Slope)
+ }
+   divisor = 1 + exp(-1* ((x-m)/s) )
+   y = (M/divisor) + B
+   return(y)
+ }
+                 fn = rutledge_param, x = 1:45, y = high)
Error in nls.lm(par = list(m = halfFluo, s = slopes, M = MaxFluo, B =
high[1]),  :
  evaluation of fn function returns non-sensible value!
```

Where could the error be?