Skip to content
Prev 387484 / 398502 Next

Failure in predicting parameters

Hello,

Maybe a bit late but there is a contributed package [1] for quantitative 
PCR fitting non-linear models with the Levenberg-Marquardt algorithm.

estim and vector R below are your model and your fitted values vector. 
The RMSE of this fit is smaller than your model's.


Isn't this simpler?


library(qpcR)

df1 <- data.frame(Cycles = seq_along(high), high)

fit <- pcrfit(
   data = df1,
   cyc = 1,
   fluo = 2
)
summary(fit)

coef(estim)
coef(fit)


sqrt(sum(resid(estim)^2))
#[1] 1724.768
sqrt(sum(resid(fit)^2))
#[1] 1178.318


highpred <- predict(fit, newdata = df1)

plot(1:45, high, type = "l", col = "red")
points(1:45, R, col = "blue")
points(1:45, highpred$Prediction, col = "cyan", pch = 3)


[1] https://CRAN.R-project.org/package=qpcR

Hope this helps,

Rui Barradas

?s 06:51 de 18/03/21, Luigi Marongiu escreveu: