simulate_y_structure: Y-structure collider

Description Usage Arguments Value

View source: R/y-structure.r

Description

X and Y are continuous, they influence continuous S which predicts binary inclusion variable Z

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
simulate_y_structure(
  n,
  prop,
  or_sz,
  b_xy,
  rsq_xs,
  rsq_ys,
  vx = 1,
  vy = 1,
  vs = 1,
  sig.level = 5e-08
)

Arguments

n

Population sample size

prop

Proportion of population in sample

or_sz

Odds ratio for the effect of collider variable S on being included

b_xy

Causal effect of X on Y

rsq_xs

Variance explained by X on collider variable S

rsq_ys

Variance explained by Y on collider variable S

vx

Variance of X. Default = 1.

vy

Variance of Y. Default = 1.

vs

Variance of S. Default = 1.

sig.level

Alpha threshold for power calculation. Default = 5e-8

Value

List of simulation results


explodecomputer/collidR documentation built on May 8, 2020, 3:33 a.m.