Multi-dimension simulation function
simdata_discr(
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,
nobs = NULL,
format = "long"
)
A table with simulated data.
Number of individuals
A k by k matrix, which characterize the rate of the adaptive response.
A particular state, which is a deviation from the normal (or optimal). This is a vector with length of k.
A matrix k by k, which is a non-negative-definite symmetric matrix.
A vector-function (with length k) of the normal (or optimal) state.
A diffusion coefficient, k by k matrix.
mortality at start period of time.
A displacement coefficient of the Gompertz function.
A vector with length equal to number of dimensions used, defines starting values of covariates. Default ystart = 80.
Starting time (age). Can be a number (30 by default) or a vector of two numbers: c(a, b) - in this case, starting value of time is simulated via uniform(a,b) distribution.
A number, defines final time (105 by default).
A time step (1 by default).
A number, defines a number of observations (lines) for an individual, NULL by default.
Data format: "long" (default), "short".
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. <DOI:10.1080/08898480590932296>.
library(stpm)
data <- simdata_discr(N=100)
head(data)
Run the code above in your browser using DataLab