View source: R/generic-funcs-subtee.R
plot.subtee | R Documentation |
Plotting function for objects of class 'subtee'. Visualizes estimates and confidence intervals for all candidate subgroups (and complements) in a forest plot.
## S3 method for class 'subtee' plot(x, y = NULL, z = NULL, type = c("trtEff", "trtEffDiff"), show.compl = FALSE, xlab = "default", ylab = "default", main = "default", them, point.size = 2.5, line.size = 1, palette = "default", ...)
x |
An object of class |
y |
An object of class |
z |
An object of class |
type |
A character specifyng if treatment effects should be plotted ( |
show.compl |
Logical. If true estimates for candidate subgroup complements should be plotted as well. Only available if |
xlab |
Character. Label for x-axis. |
ylab |
Character. Label for y-axis. |
main |
Character. Title. The default is to provide a string with the level of the uncertainty intervals. |
them |
ggplot2 theme. Use |
point.size |
Size for points, which denote point estimates of treatment effects. Default to 2.5. |
line.size |
Size for points, which denote confidence interval of treatment effects. Default to 1. |
palette |
A string providing a ggplot2 colour palette to use. This will be passed to the palette option in a |
... |
Not used. |
Forest plot visualizing treatment effect estimates (if type = "trtEff"
) or treatment-subgroup interactions in candidate subgroups (if type = "trtEffDiff"
).
Ballarini, N. Thomas, M., Rosenkranz, K. and Bornkamp, B. (2021) "subtee: An R Package for Subgroup Treatment Effect Estimation in Clinical Trials" Journal of Statistical Software, 99, 14, 1-17, doi: 10.18637/jss.v099.i14
summary.subtee
data(datnorm) cand.groups <- subbuild(datnorm, height, labvalue, region, smoker) fitd <- cbind(datnorm, cand.groups) subgr <- colnames(cand.groups) ### Plot unadjusted estimates res_unadj <- unadj(resp = "y", trt = "treat", subgr = subgr, data = fitd, covars = ~ x1 + x2, fitfunc = "lm") summary(res_unadj) plot(res_unadj) plot(res_unadj, show.compl = TRUE) plot(res_unadj, type = "trtEffDiff") ### Compare unadjusted with model averaging estimates res_modav <- modav(resp = "y", trt = "treat", subgr = subgr, data = fitd, covars = ~ x1 + x2, fitfunc = "lm") plot(res_unadj, res_modav, show.compl = TRUE) plot(res_unadj, res_modav, type = "trtEffDiff")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.