Learn R Programming

stpm (version 1.2.1)

simdata_gen: Multi-dimension simulation function for Genetic SPM (multidimensional GenSPM)

Description

Multi-dimension simulation function for Genetic SPM (multidimensional GenSPM)

Usage

simdata_gen(N = 100, a = -0.05, f1 = 80, Q = 2e-08, f = 80, b = 5,
  mu0 = 1e-05, theta = 0.08, ystart = 80, tstart = 30, tend = 105,
  dt = 1, p0 = 0.25)

Arguments

N
Number of individuals
a
A k by k matrix, which characterize the rate of the adaptive response.
f1
A particular state, which is a deviation from the normal (or optimal). This is a vector with length of k.
Q
A matrix k by k, which is a non-negative-definite symmetric matrix.
f
A vector-function (with length k) of the normal (or optimal) state.
b
A diffusion coefficient, k by k matrix.
mu0
mortality at start period of time.
theta
A displacement coefficient of the Gompertz function.
ystart
A vector with length equal to number of dimensions used, defines starting values of covariates.
tstart
A number that defines starting time (30 by default).
tend
A number, defines final time (105 by default).
dt
A time step (1 by default).
p0
A proportion of carriers and non-carriers in a population (default p=0.25).

Value

  • A table with simulated data.

References

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

Akushevich I., Kulminski A. and Manton K. (2005), Life tables with covariates: Dynamic model for Nonlinear Analysis of Longitudinal Data. Mathematical Population Studies, 12(2), pp.: 51-80. .

Examples

Run this code
library(stpm)
data <- simdata_gen(N=100, ystart=80)
head(data)

Run the code above in your browser using DataLab