Learn R Programming

qpcR (version 1.3-7.1)

takeoff: Calculation of the qPCR takeoff point

Description

Calculates the first significant cycle of the exponential region (takeoff point) using externally studentized residuals as described in Tichopad et al. (2003).

Usage

takeoff(object, pval = 0.05, nsig = 3)

Arguments

object
an object of class 'pcrfit'.
pval
the p-value for the takeoff test.
nsig
the number of successive takeoff tests. See 'Details'.

Value

  • A list with the following components:
  • topthe takeoff point.
  • f.topthe fluorescence at top.

Details

Takeoff points are calculated essentially as described in the reference below. The steps are: 1) Fitting a linear model to background cycles $1:n$, starting with $n = 5$. 2) Calculation of the external studentized residuals using rstudent, which uses the hat matrix of the linear model and leave-one-out: $$\langle \hat{\varepsilon}_i \rangle = \frac{\hat{\varepsilon}_i}{\hat{\sigma}_{(i)} \sqrt{1-h_{ii}}}, \hat{\sigma}_{(i)} = \sqrt{\frac{1}{n - p - 1} \sum_{j = 1 \atop j \ne i }^n \hat{\varepsilon}_j^2}$$ with $h_{ii}$ being the $i$th diagonal entry in the hat matrix $H = X(X^TX)^{-1}X^T$. 3) Test if the last studentized residual $\langle \hat{\varepsilon}_n \rangle$ is an outlier in terms of t-distribution: $$1 - pt(\langle \hat{\varepsilon}_n \rangle, n - p) < 0.05$$ with $n$ = number of residuals and $p$ = number of parameters. 4) Test if the next nsig - 1 cycles are also outlier cycles. 5) If so, take cycle number from 3), otherwise $n = n + 1$ and start at 1).

References

Standardized determination of real-time PCR efficiency from a single reaction set-up. Tichopad A, Dilger M, Schwarz G & Pfaffl MW. Nucleic Acids Research (2003), e122.

Examples

Run this code
m1 <- pcrfit(reps, 1, 2, l5)
res1 <- takeoff(m1) 
plot(m1)
abline(v = res1$top, col = 2)
abline(h = res1$f.top, col = 2)

Run the code above in your browser using DataLab