powered by
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 )
Estimated cost
Holdout set size at which to estimate k_2 (cost)
Matrix of predictors
Vector indicating PRE incidence
Random seed; set before starting or set to NULL
Population prevalence of PRE if not prophylactically treated. Defaults to empirical value 1426/58974
Proportion of the population on which an intervention will be made. Defaults to 0.1
Reduction in PRE risk with intervention. Defaults to empirical value 0.37
# 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)
Run the code above in your browser using DataLab