Learn R Programming

qpcR (version 1.3-7.1)

pcrboot: 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 bootstrapping or jackknifing.
B
numeric. The number of iterations.
njack
numeric. In case of type = "jack", how many datapoints to exclude. Defaults to leave-one-out.
plot
should the fitting and final results be displayed as a plot?
do.eff
logical. If TRUE, efficiency analysis will be performed.
conf
the confidence level.
verbose
logical. If TRUE, the iterations will be printed on the console.
...
other parameters to be passed on to the plotting functions.

Value

  • A list containing the following items:
  • ITERa list containing each of the results from the iterations.
  • CONFa list containing the confidence intervals for each item in ITER.
  • 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.

Details

Non-parametric bootstrapping is applied using the centered residuals. 1) Obtain the residuals from the fit: $$\hat{\varepsilon_{t}} = y_t - f(x_t, \hat{\theta})$$ 2) Draw bootstrap pseudodata: $$y_{t}^{\ast} = f(x_t, \hat{\theta}) + \epsilon_{t}^{\ast}$$ where $\epsilon_{t}^{\ast}$ are i.i.d. from distribution $\hat{F}$, where the residuals from the original fit are centered at zero. 3) Fit $\hat\theta^\ast$ by nonlinear least-squares. 4) Repeat B times, yielding bootstrap replications $$\hat\theta^{\ast 1}, \hat\theta^{\ast 2}, \ldots, \hat\theta^{\ast B}$$ One can then characterize the EDF and calculate confidence intervals for each parameter: $$\theta \in [EDF^{-1}(\alpha/2), EDF^{-1}(1-\alpha/2)]$$ 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.

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

Run this code
## 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)

Run the code above in your browser using DataLab