multivar_sim | R Documentation |
Simulate multivar data.
multivar_sim( k, d, n, prop_fill_com, prop_fill_ind, lb, ub, sigma, unique_overlap = FALSE, mat_common = NULL, mat_unique = NULL, mat_total = NULL, diag = FALSE )
k |
Integer. The number of individuals (or datasets) to be generated. |
d |
Integer. The number of variables per dataset. For now this will be constant across individuals. |
n |
Integer. The time series length. |
prop_fill_com |
Numeric. The proportion of nonzero paths in the common transition matrix. |
prop_fill_ind |
Numeric. The proportion of nonzero unique (not in the common transition matrix or transition matrix of other individuals) paths in each individual transition matrix. |
lb |
Numeric. The upper bound for individual elements of the transition matrices. |
ub |
Numeric. The lower bound for individual elements of the transition matrices. |
sigma |
Matrix. The (population) innovation covariance matrix. |
unique_overlap |
Logical. Default is FALSE. Whether the unique portion should be completely unique (no overlap) or randomly chosen. |
mat_common |
Matrix. A common effects transition matrix (if known). |
mat_unique |
List. A list of unique effects transition matrix (if known). |
mat_total |
List. A list of total effects transition matrix (if known). |
diag |
Logical. Default is FALSE. Should diagonal elements be filled first for common elements. |
k <- 3 d <- 10 n <- 20 prop_fill_com <- .1 prop_fill_ind <- .05 lb <- 0.1 ub <- 0.5 sigma <- diag(d) data <- multivar_sim(k, d, n, prop_fill_com, prop_fill_ind, lb, ub,sigma)$data
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.