forest-package: Forest plots

forest-packageR Documentation

Forest plots

Description

Create forest plots from common R objects.

Details

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

See Also

forest

Examples

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


raredd/forest documentation built on Feb. 19, 2024, 9:22 p.m.