Usage
spm_gen(gendat, nongendat = NULL, aH = -0.05, aL = -0.01, f1H = 60, f1L = 80, QH = 2e-08, QL = 2.5e-08, fH = 60, fL = 80, bH = 4, bL = 5, mu0H = 8e-06, mu0L = 1e-05, thetaH = 0.08, thetaL = 0.1, p = 0.25, stopifbound = FALSE, algorithm = "NLOPT_LN_NELDERMEAD", lb = NULL, ub = NULL, maxeval = 500, verbose = FALSE, pinv.tol = 0.01, mode = "genetic", gomp = FALSE, ftol_rel = 1e-06)
Arguments
gendat
A data table with genetic component.
nongendat
A data table without genetic component.
aH
A k by k matrix. Characterizes the rate of the adaptive response for Z = 1.
aL
A k by k matrix. Characterize the rate of the adaptive response for Z = 0.
f1H
A deviation from the norm (or optimal) state for Z = 1.
This is a vector of length k.
f1L
A deviation from the norm (or optimal) for Z = 0.
This is a vector of length k.
QH
A matrix k by k, which is a non-negative-definite symmetric matrix for Z = 1.
QL
A matrix k by k, which is a non-negative-definite symmetric matrix for Z = 0.
fH
A vector with length of k. Represents the normal (or optimal) state for Z = 1.
fL
A vector with length of k. Represents the normal (or optimal) state for Z = 0.
bH
A diffusion coefficient, k by k matrix for Z = 1.
bL
A diffusion coefficient, k by k matrix for Z = 0.
mu0H
A baseline mortality for Z = 1.
mu0L
A baseline mortality for Z = 0.
thetaH
A displacement coefficient for Z = 1.
thetaL
A displacement coefficient for Z = 0.
p
A percentage of carriers in a population (default p=0.25).
stopifbound
If TRUE then estimation stops if at least one parameter achieves lower or upper boundaries.
algorithm
An optimization algorithm used, can be one of those provided by nloptr
.
#'Check the NLopt website for a description of
the algorithms. Default: NLOPT_LN_NELDERMEAD
lb
Lower bound of parameter values.
ub
Upper bound of parameter values.
maxeval
Maximum number of iterations of the algorithm for nloptr
optimization.
The program stops when the number of function evaluations exceeds maxeval. Default: 500.
verbose
An indicator of verbosing output (FALSE by default).
pinv.tol
A tolerance value for pseudo-inverse of matrix gamma (see Yashin, A.I. et al (2007). Stochastic model for analysis of longitudinal data on aging
and mortality. Mathematical Biosciences, 208(2), 538-551..)
mode
Can be one of the following: "genetic" (default), "nongenetic" or "combined".
mode = "genetic" represents analysing only data of genetic group (which contains a value of genetic marker);
mode = "nongenetic" represents analysing only data of non-genetic group (not genotyped group).
mode = "combined" denoted joint analysis of both genetic and non-genetic groups.
gomp
A flag (FALSE by default). When it is set, then time-dependent exponential form of mu0 and Q are used:
mu0 = mu0*exp(theta*t), Q = Q*exp(theta*t).
ftol_rel
Relative tolerance threshold for likelihood function (defalult: 1e-6), see http://ab-initio.mit.edu/wiki/index.php/NLopt_Reference