## using 'modlist'
DAT <- modlist(reps, 2:9, fct = l5())
GROUP <- c(1, 1, 2, 2, 101, 101, 102, 102)
res <- ratiocalc(DAT, group = GROUP)
print(res$ratio)
## using 'pcrbatch' and combinations
DAT2 <- pcrbatch(reps, 2:9, fct = l5())
GROUP <- c(1, 1, 2, 2, 101, 101, 102, 102)
res <- ratiocalc(DAT2, group = GROUP, iter = "combs")
print(res$ratio)
## using only the efficiency estimate of the
## first curve
res <- ratiocalc(DAT2, group = GROUP, ratio = "first")
print(res$ratio)
## using constant value for the efficiency
res <- ratiocalc(DAT2, group = GROUP, ratio = "first")
print(res$ratio)
## strong differences in calculated error and
## simulated error indicate non-normality of
## propagated error
res <- ratiocalc(DAT, group = GROUP, do.sim = TRUE)
print(res$ratio)
## Does error propagation in qPCR quantitation make sense?
## In ratio calculations based on (E1^cp1)/(E2^cp2),
## only 2\% error in each of the variables result in
## over 50\% propagated error!
x <- NULL
y <- NULL
for (i in seq(0, 0.1, by = 0.01)) {
E1 <- c(1.7, 1.7 * i)
cp1 <- c(15, 15 * i)
E2 <- c(1.7, 1.7 * i)
cp2 <- c(18, 18 * i)
DF <- cbind(E1, cp1, E2, cp2)
res <- propagate(expression((E1^cp1)/(E2^cp2)), DF, type = "stat")
x <- c(x, i * 100)
y <- c(y, (res$errProp/res$evalExpr) * 100)
}
plot(x, y, xlim = c(0, 10), lwd = 2, xlab = "c.v. [%]", ylab = "c.v. (prop) [%]")
Run the code above in your browser using DataLab