View source: R/OptHoldoutSize_aspre.R
aspre_k2 | R Documentation |
Estimate cost at a given holdout set size in ASPRE model
aspre_k2(
n,
X,
PRE,
seed = NULL,
pi_PRE = 1426/58974,
pi_intervention = 0.1,
alpha = 0.37
)
n |
Holdout set size at which to estimate k_2 (cost) |
X |
Matrix of predictors |
PRE |
Vector indicating PRE incidence |
seed |
Random seed; set before starting or set to NULL |
pi_PRE |
Population prevalence of PRE if not prophylactically treated. Defaults to empirical value 1426/58974 |
pi_intervention |
Proportion of the population on which an intervention will be made. Defaults to 0.1 |
alpha |
Reduction in PRE risk with intervention. Defaults to empirical value 0.37 |
Estimated cost
# Simulate
set.seed(32142)
N=1000; p=15
X=matrix(rnorm(N*p),N,p); PRE=rbinom(N,1,prob=logit(X%*% rnorm(p)))
aspre_k2(1000,X,PRE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.