tsinfer: Infer selection/drift parameters for time-series...

Description Usage Arguments Details Value

Description

tsinfer computes the selection coefficient, population size and initial frequency for the logistic using a Gaussian approximation of the Kimura expression for time-series variant-frequency data.

Usage

1
2
3
tsinfer(tvec, bvec, nvec, maxiter = 200, prec = 1e-06, iffreq = FALSE,
  ifneut = FALSE, iffixedf0 = FALSE, verbose = FALSE, mins = -2,
  maxs = 2, minalpha = 10, maxalpha = 1e+08, minf0 = -10, maxf0 = 10)

Arguments

tvec

Time coordinates for the time-series (start with 0)

bvec

Number of new form per time point

nvec

Total number of samples per time point

maxiter

Maximum number of iterations

prec

Precision for optimisation

iffreq

whether to assume that the sample frequencies are the population frequencies (default=FALSE)

ifneut

whether to compute only the neutral model (default=FALSE)

iffixedf0

whether to use the initial sample frequency as the initial frequency of the logistic component of the model (default=FALSE)

verbose

whether to print intermediate output (detault=FALSE)

mins

minimum s value to consider (default=-2)

maxs

maximum s value to consider (default=2)

minalpha

minimum alpha value to consider (default=10)

maxalpha

maximum alpha value to consider (default=1e8)

minf0

minimum f0 value to consider in log-odds (default=-10)

maxf0

maximum f0 value to consider in log-odds (default=10)

Details

Essential arguments are tvec (time point labels for time series starting at 0), bvec (number of new variants at each time point), and nvec (total number of samples at each time point).

Value

A list with the neutral and non-neutral parameter values and associated log-likelihoods The output of the execution is the following list: s = selection coefficient for non-neutral model alpha = population size for non-neutral model f0 = initial frequency for the logistic in non-neutral model LL = log-likelihood of non-neutral model s.0 = 0 (selection coefficient for the neutral model) alpha.0 = population size for the neutral model f0.0 = initial frequency for the logistic in neutral model LL.0 = log-likelihood of neutral model


benmarwick/signatselect documentation built on Dec. 4, 2019, 4:22 p.m.