Function to run OpenMx models estimating cultural transmission and sibling interaction on simulated data

gnome_mx_simulation(
  alpha = 0.05,
  seed = NA,
  standPGS = FALSE,
  nmz = 4000,
  ndz = 4000,
  a = default_a,
  c = default_c,
  e = default_e,
  ct = default_ct,
  si = default_si,
  x = default_x,
  nloci = 100,
  npgsloci = c(2, 5, 10, 15),
  assortm = default_assortm
)

Arguments

alpha

Alpha used to calculate power

seed

Set a seed if desired

standPGS

Boolean to standardize the PGS

nmz

Sample size monozygotic twins

ndz

Sample size dizygotic twins

a

Additive genetic path coefficient

c

Shared environmental path coefficient

e

Unique environmental path coefficient

ct

Cultural Transmission - Parent genotype to child phenotype

si

Sibling Interaction - Sibling 1 genotype to sibling 2 phenotype

x

Sibling Interaction at the phenotypic level

nloci

Number of diallelic loci

npgsloci

Number of loci comprising the PGS

assortm

Assortative mating - genetic correlation between the parents

Value

List with data frame of power estimates and data frame of parameter estimates

Examples

gnome_mx_simulation(ct = .01, si = .025, npgsloci = 10)
#> [1] "Running simulation proportion of genetic variance explained by the PGS is: 0.1 ."
#> [1] "The factorial design has 1 setting(s)."
#> [1] 1
#> Running Saturated MZDZModel with 47 parameters
#> Running Independence MZDZModel with 22 parameters
#> Running Saturated MZDZModel with 47 parameters
#> Running Independence MZDZModel with 22 parameters
#> $power
#>    nmz  ndz         a         c         e    g     b x PGS   A   p1    p2   p3
#> 1 4000 4000 0.6324555 0.5477226 0.5477226 0.01 0.025 0 0.1 0.9 0.13 0.181 0.06
#>      p4    p5    p6    p7    p8        Smz       Sdz
#> 1 0.108 0.122 0.149 0.054 0.079 0.04559689 0.0297855
#> 
#> $params
#>    nmz  ndz         a         c         e    g     b x PGS   A    e1    e2   e3
#> 1 4000 4000 0.6324555 0.5477226 0.5477226 0.01 0.025 0 0.1 0.9 0.023 0.031 0.01
#>      e4    e5    e6   e7    e8        Smz       Sdz
#> 1 0.025 0.029 0.032 0.01 0.025 0.04559689 0.0297855
#>