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, ... )
r_all | Levels of relatedness; default is MZ and DZ twins c(1,.5). |
---|---|
npg_all | Sample size per group; default is 500. |
npergroup_all | Vector of sample sizes by group; default repeats |
mu_all | Mean for each generated variable; default is 0. |
variables | Number of variables to generate; default is 2. Currently, limited to max of two variables. |
mu_list | List of means by variable; default repeats |
reliability_list | Vector of Reliabilities for each generated variable; default is to repeat |
r_vector | Alternative, give vector of r coefficients for entire sample. |
ace_all | Vector of variance components for each generated variable; default is c(1,1,1). |
ace_list | Matrix of ACE variance components by variable, where each row is its own variable; default is to repeat |
cov_a | Shared variance for additive genetics (a); default is 0. |
cov_c | Shared variance for shared-environment (c); default is 0. |
cov_e | shared variance for non-shared-environment (e); default is 0. |
... | Optional pass on additional inputs. |
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