Function to run generalized estimating equations (gee) models estimating cultural transmission and sibling interaction on simulated data

gnome_gee_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),
  cmethod = "exchangeable"
)

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

cmethod

Gee error covariance structure

Value

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

Examples

gnome_gee_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
#> $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.14 0.185 0.06
#>      p4    p5   p6    p7    p8        Smz       Sdz
#> 1 0.108 0.127 0.15 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.025 0.061 0.01
#>     e4    e5    e6   e7   e8        Smz       Sdz
#> 1 0.05 0.029 0.063 0.01 0.05 0.04559689 0.0297855
#>