Description Usage Arguments Value
View source: R/helpers_simulation.R
Generate paired univariate data, given ACE parameters.
1 2 3 4 5 6 7 8 9 |
r |
Levels of relatedness; default is MZ and DZ twins c(1,.5) |
npg |
Sample size per group; default is 100. |
npergroup |
List of sample sizes by group; default repeats |
mu |
Mean for generated variable; default is 0. |
ace |
Vector of variance components, ordered by c(a, c, e); default is c(1,1,1). |
r_vector |
Alternative, give vector of relatedness coefficients for entire sample. |
... |
Optional pass on additional inputs. |
Returns data.frame
with the following:
id |
id |
A1 |
genetic component for kin1 |
A2 |
genetic component for kin2 |
C1 |
shared-environmental component for kin1 |
C2 |
shared-environmental component for kin2 |
E1 |
non-shared-environmental component for kin1 |
E2 |
non-shared-environmental component for kin2 |
y1 |
generated variable for kin1 with mean of |
y2 |
generated variable for kin2 with mean of |
r |
level of relatedness for the kin pair |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.