.freqpcr_loglike {freqpcr} | R Documentation |
Log-likelihood of obtaining Cq values under given parameter set.
Description
The internal function is called from the optimizer, nlm()
, running in freqpcr()
. It defines the log-likelihood by obtaining the two \Delta
Cq values (differences in the four Cq measurements) provided that the allele mixing ratio for each bulk sample is given together with other parameters. This function is vectorized over multiple bulk samples.
Usage
.freqpcr_loglike(
X,
N,
DCW,
DCD,
zeroAmount,
para.fixed = NULL,
beta = TRUE,
diploid = FALSE,
dummyDCW = FALSE
)
Arguments
X |
Numeric vector that stores the parameter values to be optimized via |
N |
Sample sizes as a numeric vector. |
DCW , DCD |
Numeric vectors having the same length as |
zeroAmount |
(In RED- |
para.fixed |
Named numeric vector that stores the fixed parameters inherited from |
beta |
Whether to use the beta distribution to approximate the sample allele ratio instead of specifying individual gamma distribution for each of the allelic DNA amounts? Default is |
diploid |
Is the target organism diploidy? Default is |
dummyDCW |
Whether the |
Value
Scalar of the log likelihood.