plot_simulate_y_structure_optim: Plot the minimum Y-structure required to explain some...

Description Usage Arguments Value

View source: R/y-structure.r

Description

For a given Y-structure, can an association of b_xy can be obtained through ascertainment on a collider? Use optimisation to determine the minimum OR_sz for a range of rsq_xs and rsq_ys values

Usage

1
2
3
4
5
6
7
8
9
plot_simulate_y_structure_optim(
  prop,
  b_xy_thresh,
  b_xy = 0,
  rsq_xs_range = c(0, 1),
  rsq_ys_range = c(0, 1),
  gran = 101,
  max_or_sz = 20
)

Arguments

prop

Proportion of population included in sample

b_xy_thresh

Target b_xy association - e.g. what value of b_xy are you suspicious could be due to ascertainment on a collider

b_xy

Suspected true X-Y effect. Default = 0

rsq_xs_range

Range of rsq_xs values to enumerate over. Default = c(0,1)

rsq_ys_range

Range of rsq_ys values to enumerate over. Default = c(0,1)

gran

Granularity of ranges. Default = 101

max_or_sz

Maximum OR_sz to allow in optimisation.

Value

ggplot of simulations


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