forest-package | R Documentation |
Create forest plots from common R
objects.
Currently supported objects:
coxph | Cox proportional hazards regression from the survival package | |
coxphf | Cox regression with Firth's penalized likelihood from the coxphf package | |
crr | Competing risks regression from the cmprsk package | |
crr2 | Competing risks regression from the cmprsk2 package | |
glm | Logistic regression, i.e., models fit with
family = binomial(link) |
|
glm | brglm2 regression, i.e., models fit with
family = binomial(link) , method = 'brglmFit' , and
type = ... ; see brglmFit |
|
logistf | Logistic regression with Firth's penalized likelihood from the logistf package | |
lm | Linear regression | |
formula | Odds ratios and Fisher's exact tests via
fisher.test |
|
forest
twos <- mtcars
twos[] <- lapply(twos, function(x) +grepl('1|4', x))
forest(mpg ~ ., twos)
forest(mpg ~ ., twos, plotArgs = list(xlim = c(0, 20), show_conf = TRUE))
forest(glm(vs ~ wt + mpg + factor(gear), mtcars, family = 'binomial'))
## see ?forest for more examples
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.