Description Details Author(s) References Examples
Tool for risk controlled ITR discovery
The DESCRIPTION file:
This package was not yet installed at build time.
Index: This package was not yet installed at build time.
Tool for discovery of risk controlled individualized treatment rules
Kevin Doubleday
Maintainer: Kevin Doubleday <kdoub5ha@gmail.com>
[In Submission] Doubleday, K., Zhou, J., Fu, H. (2020), "Risk Controlled Decision Trees and Random Forests for Individualized Treatment Recommendations".
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | ## Not run:
set.seed(123)
# Generate example data
dat <- generateData(n = 1000)
# Construct rcDT
tre1 <- rcDT(data = dat,
split.var = 1:10,
risk.threshold = 2.75,
lambda = 1,
efficacy = "y",
risk = "r",
col.trt = "trt",
col.prtx = "prtx")
# Prune and select rcDT
pruned1 <- prune(tre1, a = 0, risk.threshold = 2.75, lambda = 1)
rcDT.fit <- rcDT.select(dat = dat,
split.var = 1:10,
lambda = 1,
risk.threshold = 2.75,
efficacy = "y",
risk = "r",
col.trt = "trt",
col.prtx = "prtx",
nfolds = 5)
# Construct rcRF
set.seed(2)
rcRF.fit <- rcRF(dat,
split.var = 1:10,
efficacy = "y",
risk = "r",
col.trt = "trt",
col.prtx = "prtx",
risk.threshold = 2.75,
ntree = 100,
lambda = 0.5)
# Variable importances
VI <- Variable.Importance.ITR(rcRF.fit, sort = FALSE)
# Predictions
preds.rcDT <- predict.ITR(rcDT.fit$best.tree.alpha,
new.data = dat,
split.var = 1:10)
preds.rcRF <- predict.ITR(rcRF.fit,
new.data = dat,
split.var = 1:10)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.