.integrate_gamma {freqpcr} | R Documentation |
Double integration of likelihood over the two DNA quantities obeying the gamma distributions.
Description
Internal function to integrate the likelihood getting \Delta
Cq value (the argument del
) over the entire range of the DNA quantities of the two alleles, 0 <= x_S < Inf and 0 <= x_R < Inf. Vectorized for multiple bulk samples. It shares the arguments with .integrate_beta.
Usage
.integrate_gamma(
del,
SHR,
SHS,
zeroAmount,
targetScale,
sdMeasure,
xsm = 2,
EPCR,
cubmethod = "hcubature",
relTol = 0.1,
absTol = 1e-08,
maxEval = 10^6
)
Arguments
del |
Numeric vector of the observed |
SHR |
The gamma shape parameters for the mutant (R) portion of the bulk samples. Should be the same vector length as del. Each element of SHR is defined as K*(the assumed number of R allele in the bulk sample: 1, 2, 3, ..., n-1). |
SHS |
The gamma shape parameters for the wild (S) portion of the bulk samples. Should be the same length as del. Each element of SHS is defined as K*(the assumed number of S allele in the bulk sample). |
zeroAmount |
(In RED- |
targetScale |
( |
sdMeasure |
( |
xsm |
Specify the accumulation of the standard deviation of the Cq measuring errors when the *-Cq values are fed as difference. For |
EPCR |
( |
cubmethod |
Cubature method passed to the integrator function. See the section "Methods for cubintegrate". |
relTol |
The maximum tolerance passed to the cubature method. Though the default of cubature::cubintegrate function is 1e-5, the accuracy is reduced here to acceralate the integration. |
absTol |
The absolute tolerance passed to the cubature method. The default is 1e-8, which is less accurate than the default of cubintegrate function (1e-12) but considered enough for the estimation. |
maxEval |
Maximum number of function evaluations needed. The default is 10^6, which is same as the cubintegrate default. |
Value
A numeric vector of marginal likelihoods having the same length as del
.
See Also
Other integrators:
.integrate_beta()