pcrboot {qpcR} | R Documentation |
Bootstrapping and jackknifing qPCR data
Description
Confidence intervals for the estimated parameters and goodness-of-fit measures are calculated for a nonlinear qPCR data fit by either
a) boostrapping the residuals of the fit or
b) jackknifing and refitting the data.
Confidence intervals can also be calculated for all parameters obtained from the efficiency
analysis.
Usage
pcrboot(object, type = c("boot", "jack"), B = 100, njack = 1,
plot = TRUE, do.eff = TRUE, conf = 0.95, verbose = TRUE, ...)
Arguments
object |
an object of class 'pcrfit'. |
type |
either |
B |
numeric. The number of iterations. |
njack |
numeric. In case of |
plot |
should the fitting and final results be displayed as a plot? |
do.eff |
logical. If |
conf |
the confidence level. |
verbose |
logical. If |
... |
other parameters to be passed on to the plotting functions. |
Details
Non-parametric bootstrapping is applied using the centered residuals.
1) Obtain the residuals from the fit:
2) Draw bootstrap pseudodata:
where are i.i.d. from distribution
, where the residuals from the original fit are centered at zero.
3) Fit by nonlinear least-squares.
4) Repeat B times, yielding bootstrap replications
One can then characterize the EDF and calculate confidence intervals for each parameter:
The jackknife alternative is to perform the bootstrap on the data-predictor vector, i.e. eliminating a certain number of datapoints.
If the residuals are correlated or have non-constant variance the latter is recommended. This may be the case in qPCR data,
as the variance in the low fluorescence region (ground phase) is usually much higher than in the rest of the curve.
Value
A list containing the following items:
ITER |
a list containing each of the results from the iterations. |
CONF |
a list containing the confidence intervals for each item in |
Each item contains subitems for the coefficients (coef
), root-mean-squared error (rmse
), residual sum-of-squares (rss
), goodness-of-fit measures (gof
) and the efficiency analysis (eff
). If plot = TRUE
, all data is plotted as boxplots including confidence intervals.
Author(s)
Andrej-Nikolai Spiess
References
Nonlinear regression analysis and its applications.
Bates DM & Watts DG.
Wiley, Chichester, UK, 1988.
Nonlinear regression.
Seber GAF & Wild CJ.
Wiley, New York, 1989.
Boostrap accuracy for non-linear regression models.
Roy T.
J Chemometics (1994), 8: 37-44.
Examples
## Simple bootstrapping with
## too less iterations...
par(ask = FALSE)
m1 <- pcrfit(reps, 1, 2, l4)
pcrboot(m1, B = 20)
## Jackknifing with leaving
## 5 datapoints out.
m2 <- pcrfit(reps, 1, 2, l4)
pcrboot(m2, type = "jack", njack = 5, B = 20)