Generate paired multivariate data, given ACE parameters.
kinsim(
r_all = c(1, 0.5),
npg_all = 500,
npergroup_all = rep(npg_all, length(r_all)),
mu_all = 0,
variables = 2,
mu_list = rep(mu_all, variables),
reliability_list = NULL,
r_vector = NULL,
ace_all = c(1, 1, 1),
ace_list = matrix(rep(ace_all, variables), byrow = TRUE, nrow = variables),
cov_a = 0,
cov_c = 0,
cov_e = 0,
...
)
Returns data.frame
with the following:
genetic component for variable i for kin1
genetic component for variable i for kin2
shared-environmental component for variable i for kin1
shared-environmental component for variable i for kin2
non-shared-environmental component for variable i for kin1
non-shared-environmental component for variable i for kin2
generated variable i for kin1
generated variable i for kin2
level of relatedness for the kin pair
id
Levels of relatedness; default is MZ and DZ twins c(1,.5).
Sample size per group; default is 500.
Vector of sample sizes by group; default repeats npg_all
for all groups
Mean for each generated variable; default is 0.
Number of variables to generate; default is 2. Currently, limited to max of two variables.
List of means by variable; default repeats mu_all
for all variables
Vector of Reliabilities for each generated variable; default is to repeat reliability_all
for each variable
Alternative, give vector of r coefficients for entire sample.
Vector of variance components for each generated variable; default is c(1,1,1).
Matrix of ACE variance components by variable, where each row is its own variable; default is to repeat ace_all
for each variable.
Shared variance for additive genetics (a); default is 0.
Shared variance for shared-environment (c); default is 0.
shared variance for non-shared-environment (e); default is 0.
Optional pass on additional inputs.