View source: R/03_known_ratio.R
knownqpcr_unpaired | R Documentation |
A variant of knownqpcr()
that accepts the Cq values concatenated into a vector (the argument Cq
) accompanied with the experimental conditions (the arguments Digest
and Gene
). Their exact allele mixing ratios are known as trueY
.
knownqpcr_unpaired( Digest, Gene, trueY, Cq, A = rep(1, length(Cq)), XInit = c(meanDNA = -10, targetScale = 0, baseChange = 0, sdMeasure = 1, zeroAmount = -5, EPCR = 0), method = "BFGS", pvalue = 0.05, trace = 0, report = 10, verbose = FALSE )
Digest |
Numeric vector having the same length as |
Gene |
Numeric vector that specify each Cq measure (element of |
trueY |
A numeric vector. |
Cq |
Measured Cq values. This argument is a numeric vector and can contain |
A |
Optionally, you can specify relative DNA content between the samples, as a numeric vector having the same length as |
XInit |
Optionally, the named vector specifies the initial parameter values to be optimized. Defined in the natural log scale; e.g. |
method |
A string specifying the optimization algorithm used in |
pvalue |
The two-sided confidence interval is calculated at the last iteration at given significance level. Default is 0.05, which returns the 95% Wald's CI (2.5 to 97.5 percentile) based on the Hessian matrix. |
trace |
Non-negative integer. If positive, |
report |
The frequency of reports if |
verbose |
Send messages to stdout? Default is FALSE. |
A table containing the estimated parameter values. The format is same as knownqpcr()
.
Other estimation procedures:
freqpcr()
,
knownqpcr()
,
sim_dummy()
# A dummy Cq dataset: four mixing ratios with four replicates. # K:2, scaleDNA:1e-11, targetScale:1.5, baseChange:0.3, zeroAmount:1e-3, # sdMeasure:0.3, and EPCR:0.95. Assuming a RED-DeltaDeltaCq analyses. trueY <- c(rep(0.1, 4), rep(0.25, 4), rep(0.5, 4), rep(1, 4)) housek0 <- c( 19.39, 19.78, 19.28, 19.58, 18.95, 19.91, 19.66, 19.96, 20.05, 19.86, 19.55, 19.61, 19.86, 19.27, 19.59, 20.21 ) target0 <- c( 19.16, 19.08, 19.28, 19.03, 19.17, 19.67, 18.68, 19.52, 18.92, 18.79, 18.8, 19.28, 19.57, 19.21, 19.05, 19.15 ) housek1 <- c( 21.61, 21.78, 21.25, 21.07, 22.04, 21.45, 20.72, 21.6, 21.51, 21.27, 21.08, 21.7, 21.44, 21.46, 21.5, 21.8 ) target1 <- c( 24.3, 24.22, 24.13, 24.13, 22.74, 23.14, 23.02, 23.14, 21.65, 22.62, 22.28, 21.65, 20.83, 20.82, 20.76, 21.3 ) # Incomplete observation dataset, prepared as the "long" format. # If the undegested (Digest == 0) samples were only analyzed when trueY == 1. d.long.all <- data.frame( trueY=rep(trueY, 4), Digest=c(rep(0, 16 + 16), rep(1, 16 + 16)), Gene=c(rep(0, 16), rep(1, 16), rep(0, 16), rep(1, 16)), A=rep(1, 16*4), Cq=c(housek0, target0, housek1, target1) ) d.long <- d.long.all[d.long.all$Digest == 1 | d.long.all$trueY == 1, ] print(d.long) knownqpcr_unpaired( Digest=d.long$Digest, Gene=d.long$Gene, trueY=d.long$trueY, Cq=d.long$Cq, A=d.long$A ) # In general DeltaDeltaCq analyses, the experimental design will not include # dedicated control samples (Digest == 0). d.long <- d.long.all[d.long.all$Digest == 1, ] knownqpcr_unpaired( Digest=d.long$Digest, Gene=d.long$Gene, trueY=d.long$trueY, Cq=d.long$Cq, A=d.long$A )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.