dot-freqpcr_loglike_cont: Log-likelihood when sample allele ratio is continuous.

.freqpcr_loglike_contR Documentation

Log-likelihood when sample allele ratio is continuous.

Description

Called from freqpcr() instead of .freqpcr_loglike() when the model is ‘continuous’. This function assumes that each sample does not consist of n individual organisms with certain genotypes, but the result of a direct DNA extraction from the sub-population having the allele ratio around p:(1-p). Each sample allele ratio is considered to follow Beta(apk, a(1-p)k), where a and k are the relative DNA content of the sample and the gamma shape parameter, respectively.

Usage

.freqpcr_loglike_cont(
  X,
  A,
  DCW,
  DCD,
  zeroAmount,
  para.fixed = NULL,
  beta = TRUE,
  dummyDCW = FALSE
)

Arguments

X

Numeric vector that stores the parameter values to be optimized via nlm(): P in logit scale and K, targetScale, sdMeasure, and EPCR in log scale.

A

Relative DNA content between the samples. A continuous version of N in .freqpcr_loglike(), as a numeric vector.

DCW, DCD

Numeric vectors. They store the measured values of the two ΔCq: DCW (= target0 - housek0) and DCD (= target1 - housek1).

zeroAmount

(In RED-ΔΔCq method) residue rate of restriction enzyme digestion, or (in general ΔΔCq analyses) small portion of the off-target allele on the target locus of the test sample, which will be amplified in the PCR. It needs to be always specified by the user as a number between 0 and 1, usually near 0.

para.fixed

Named numeric vector that stores the fixed parameters inherited from freqpcr(), if specified. By default (NULL), all the parameters (P, K, targetScale, sdMeasure, and EPCR) are unknown. Unlike X, each element value is set in linear scale.

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 TRUE, which accelerates the calculation.

dummyDCW

Whether the ΔCq values of the control samples are dummy or not.

Value

Scalar of the log likelihood.


freqpcr documentation built on March 18, 2022, 7:25 p.m.