simulate_selection_bias: simulate_selection_bias

View source: R/simulate_selection_bias.R

simulate_selection_biasR Documentation

simulate_selection_bias

Description

An function to illustrate the risk of selection bias in conventional modelling approaches by simulating a dataset with no information and conducting conventional modelling with prefiltration.

Arguments

nrows

A vector of the number of rows to simulate (i.e., c(100, 200)).

ncols

A vector of the number of columns to simulate (i.e., c(100, 200)).

p_thresh

A vector of the p-value threshold to use in univariate pre-filtration (i.e., c(0.1, 0.2)).

Value

A list including a dataframe of results, a dataframe of the median number of variables selected and a plot illustrating false positive selection.


stabiliser documentation built on May 31, 2023, 9:10 p.m.