Skip to contents

The function creates one plot for each given bound. It shows the confusion matrix for the mean of each bound. The function can be used to find which boundary for PRS best describes the data.

Usage

decision_cross(
  train_data,
  y,
  cross_folds,
  bounds,
  thr,
  ncores = 1,
  LogReg = FALSE
)

Arguments

train_data

List generated from gen_sim.

y

The target vector. Could either be estimated liabilities from LTFH or phenotypes.

cross_folds

Number of folds in cross validation.

bounds

Decision boundaries to plot outcome for.

thr

Threshold for p-value to be used in calculating PRS.

ncores

Amount of cores to be used.

LogReg

Boolean indicating if logistic regression should be used to estimate the casual effect.

Value

The confusion matrix for the mean of each bound.