kinsim_internal {discord} | R Documentation |
Simulate Biometrically informed Univariate Data
Description
Generate paired univariate data, given ACE parameters.
Usage
kinsim_internal(
r = c(1, 0.5),
npg = 100,
npergroup = rep(npg, length(r)),
mu = 0,
ace = c(1, 1, 1),
r_vector = NULL,
...
)
Arguments
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. |
Value
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 |