spm_pobs: Continuous-time multi-dimensional optimization for SPM with...

View source: R/spm_pobs.R

spm_pobsR Documentation

Continuous-time multi-dimensional optimization for SPM with partially observed covariates (multidimensional GenSPM)

Description

Continuous-time multi-dimensional optimization for SPM with partially observed covariates (multidimensional GenSPM)

Usage

spm_pobs(
  x = NULL,
  y = 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 = "observed",
  gomp = TRUE,
  ftol_rel = 1e-06
)

Arguments

x

A data table with genetic component.

y

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 hyphotetical percentage of presence of partially observed covariate 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.<DOI:10.1016/j.mbs.2006.11.006>.)

mode

Can be one of the following: "observed" (default), "unobserved" or "combined". mode = "observed" represents analysing only dataset with observed variable Z. mode = "unobserved" represents analysing only dataset of unobserved variable Z. mode = "combined" denoted joint analysis of both observed and unobserved datasets.

gomp

A flag (FALSE by default). When it is set, then time-dependent exponential form of mu0 is used: mu0 = mu0*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

Value

A set of estimated parameters aH, aL, f1H, f1H, QH, QL, fH, fL, bH, bL, mu0H, mu0L, thetaH, thetaL, p and additional variable limit which indicates if any parameter achieved lower or upper boundary conditions (FALSE by default).

References

Arbeev, K.G. et al (2009). Genetic model for longitudinal studies of aging, health, and longevity

Yashin, A.I. et al (2007). Stochastic model for analysis of longitudinal data on aging and mortality. Mathematical Biosciences, 208(2), 538-551.<DOI:10.1016/j.mbs.2006.11.006>.

Examples

## Not run: 
library(stpm)
#Reading the data:
data <- sim_pobs(N=1000)
head(data)
#Parameters estimation:
pars <- spm_pobs(x=data)
pars

## End(Not run)

stpm documentation built on Sept. 5, 2022, 5:06 p.m.