Generate paired univariate data, given ACE parameters.
kinsim_internal(
r = c(1, 0.5),
npg = 100,
npergroup = rep(npg, length(r)),
mu = 0,
ace = c(1, 1, 1),
r_vector = NULL,
...
)
Returns data.frame
with the following:
id
genetic component for kin1
genetic component for kin2
shared-environmental component for kin1
shared-environmental component for kin2
non-shared-environmental component for kin1
non-shared-environmental component for kin2
generated variable for kin1 with mean of mu
generated variable for kin2 with mean of mu
level of relatedness for the kin pair
Levels of relatedness; default is MZ and DZ twins c(1,.5)
Sample size per group; default is 100.
List of sample sizes by group; default repeats npg
for all groups.
Mean for generated variable; default is 0.
Vector of variance components, ordered by c(a, c, e); default is c(1,1,1).
Alternative, give vector of relatedness coefficients for entire sample.
Optional pass on additional inputs.