Learn R Programming

stabiliser (version 1.0.6)

simulate_selection_bias: 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.

Value

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

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)).