| predict.lmcal, predict.nlscal {quantchem} | R Documentation |
Inverse predict concentration from responses, using all fitted calibration models.
predict.lmcal(object, dataset, conf.int = 0.95, ...) predict.nlscal(object, dataset, ...)
object |
an object of class 'lmcal' or 'nlscal', respectively |
dataset |
a vector of responses |
conf.int |
confidence intercal (only for lmcal) |
... |
additional arguments, currently ignored |
For linear models, the concentrations are calculated by inverse.predict(), which
calls polyroot() on modified polynomial coefficients. For nonlinear models,
concentrations are calculated with appropriate 'inverse' formulas.
A list containing following elements. Each element is a list of concentration vectors, calculated from a model, with name referring to the model.
fitted |
Concentrations calculated by fitted model |
upper |
Upper limit of confidence interval of inverse prediction |
lower |
Lower limit of confidence interval of inverse prediction |
The confidence interval for prediction is calculated by taking standard error of
prediction and dividing it by slope of calibration curve (estimated by derivative)
Then, proper confidence interval is constructed using t statistic.
Lukasz Komsta
set.seed(1234) x=rep(1:10,10) y=jitter(sqrt(x)) fit=lmcal(x,y) predict(fit,rnorm(10,mean=2,sd=0.1))