sim_dummy {freqpcr} | R Documentation |
Simulate freqpcr estimation based on user-generated dummy data.
Description
Wrapper of freqpcr()
suitable for the performance test using a randomly-generated data object.
Usage
sim_dummy(
CqList,
EPCR,
zeroAmount,
P = NULL,
K = NULL,
targetScale = NULL,
sdMeasure = NULL,
beta,
diploid,
maxtime,
print.level,
aux = NULL,
verbose = TRUE,
...
)
Arguments
CqList |
Object belonging to the CqList class, typically the output from |
EPCR |
( |
zeroAmount |
A numeric between 0 and 1, usually near 0, giving the residue rate of restriction enzyme digestion in RED- |
P , K , targetScale , sdMeasure |
If NULL (default), the parameter is considered unknown and estimated via |
beta , diploid , maxtime , print.level |
Configuration parameters which are passed directly to |
aux |
Additional information to be displayed on the console. The default is |
verbose |
Prints more information e.g. system time. Default is |
... |
Additional arguments passed to |
Value
Object of the S4 class CqFreq, which is same as freqpcr()
.
See Also
Other estimation procedures:
freqpcr()
,
knownqpcr_unpaired()
,
knownqpcr()
Examples
# Prepare the parameter values.
K <- 2 # You already know the size of K in this case.
EPCR <- 0.97 # The sizes of EPCR and zeroAmount must always be supplied.
zeroAmount <- 1.6e-03
is.diploid <- FALSE
# First, make a dummy Cq dataset with six bulk DNA samples,
# each of which comprises of eight haploid individuals.
dmy_cq <- make_dummy( rand.seed=1, P=0.75, K=K, ntrap=6, npertrap=8, scaleDNA=1e-07,
targetScale=1.5, baseChange=0.3, EPCR=EPCR,
zeroAmount=zeroAmount, sdMeasure=0.3, diploid=is.diploid )
# Estimate the population allele frequency on the dummy dataset, presupposing K = 2.
sim_dummy( CqList=dmy_cq, EPCR=EPCR, zeroAmount=zeroAmount,
K=K,
beta=TRUE, diploid=is.diploid, maxtime=60, print.level=2, aux="test" )
# If the maximum calculation time was too short to converge, nlm() returns error.
# Then sim_dummy() returns a matrix filled with zeros.
sim_dummy( CqList=dmy_cq, EPCR=EPCR, zeroAmount=zeroAmount,
beta=TRUE, diploid=is.diploid, maxtime=0.01, print.level=2 )