gwpcr.mixture: Mixtures of Distributions with PCR-distributed Weights

Description Usage Arguments Details See Also

View source: R/gwpcr.R

Description

Computes mixtures (i.e. convex linear combinations) of arbitrary functions with PCR-distributed weights.

Usage

1
gwpcr.mixture(x, FUN, efficiency, molecules = 1, grid.width.fun = NULL)

Arguments

x

value to evaluate the mixture at

FUN

function to mix

efficiency

efficiency of amplification

molecules

initial copy number

grid.width.fun

functions which returns the maximum grid size (i.e. distance between points) depending on λ. If the variance of F depends strongly on λ, this can be used to ensure that F is evaluated on finer grid for values of lambda where the variance is small.

Details

Numerically approximates the integral

Int F(x,λ) dgwpcr(λ) dλ over [0, Infinity)

where dgwpcr is the density function of the PCR product distribution for the specified efficiency and initial number of molecules.

Function F is usually the pdf (probability density function) or cdf (cumulative density function) of a probability distribution, in which case gwpcr.mixture computes the pdf (resp. cdf) of mixture of F's with PCR-distributed weights.

grid.width.fun can be used to control the coarseness of the integration grid. This should be a unary function that takes a value of λ and returns the maximum acceptable distance between grid points in the vicinity of λ value. If F(.,λ) is a pdf or cdf with λ-dependent variance, grid.width.fun can be used to enforce a finer grid in regions where the variance is small.

See Also

gwpcr


Cibiv/gwpcR documentation built on Aug. 31, 2021, 1:20 p.m.