get.pars0: Get initial Cq-dPCR parameters

Description Usage Arguments Details Value Author(s) Examples

View source: R/get.pars0.R

Description

Calculates initial parameter estimates from data. Used by cqmc.

Usage

1
2
3
4
get.pars0(data, extra = c("trendx", "trendy", "disp", "E1"),
  h = 0.1, n0 = NULL, n1 = NULL, 
  nt0 = 0, nt1 = 0, n.lo = 0, n.hi = 0, 
  maxn0 = 7, E.init = 0.9, E1.init = E.init, d.init = 1)

Arguments

data

object or data data frame. Contains x-locations, y-locations and Cq values including NA's for negative partitions.

extra

vector of names of parameters to include in model in additon to mu, E, and A. Defaults to all possibitilies: c("E1","trendx","trendy","disp").

h

threshold value. Not needed if data is cqdat object.

n0, n1, nt0, nt1, n.hi, n.lo

counts of the number of negative partitions (n0), positive partitions (n1), trimmed negative partitions (nt0), trimmed positive partitions (nt1), low outliers (n.lo) and high outliers (n.hi). Not needed if data is cqdat object.

maxn0

positive truncation of Poisson distribution in calculating initial value for A.

E.init, E1.init

initial parameter values (probabilities) for E and E_1.

d.init

initial parameter value (positive) for dispersion (ν).

Details

Initial values for nu, E and E_1 are given by the variables d.init, E.init and E1.init respectively. Initial values for trendx and trendy come robust linear regression using lmRob. The initial value for μ is derived from the proportion of negative partitions, and if d.init is 1 this will be the same as for the standard count-based method.

The initial value of A is based on A=h(1+E1)^-1*(1+E)^(1-m1) where m1 is an estimate of the mean Cq for 1 initial molecule and is based in turn on the sample mean of the Cq values.

Value

vector of initial parameter values.

Author(s)

Philip Wilson

Examples

1
2
dat<-fetch(Exp37a,1)
get.pars0(dat)

edpcr documentation built on May 2, 2019, 5:22 p.m.