GenCohortSingleOutcome: GenCohortSingleOutcome

Description Usage Arguments Value

View source: R/GenCohortSingleOutcome.R

Description

Generates a cohort with a single Bernoulli outcome with p features and length(betaZ) potential surrogates

Usage

1
2
3
GenCohortSingleOutcome(n = 1e+05, p = 250, p_nonzero = 30,
  beta0 = -14.75, betaZ = c(4.25, 2.25, 3.35), betaX, probZ = c(0.065,
  0.34, 0.62), probX, alpha0 = 0, alpha1 = 1, true.gamma = NULL)

Arguments

n

cohort size

p

number of features

p_nonzero

number of nonzero features

beta0

intercept; controls prevalence of finding

betaZ

vector of true coefficients for surrogate Z

betaX

vector of true coefficients for features X

probZ

vector of probabilities of potential surrogate, i.e. P(Z=1)

probX

vector of probabilities of features, i.e. P(X=1)

alpha0

recalibration intercept

alpha1

recalibration slope

true.gamma

Additional features

Value

A list with the following components: X: Matrix of dimension n x p for features Z: Matrix of dimension n x length(betaZ) for surrogates Y: Vector of 0/1 labels of length n trueAUC: AUC of the population if true probabilities were known true.beta: Vector of true coefficients


wlktan/surrogateSampling documentation built on May 23, 2019, 3:07 p.m.