logistic_forestplot | R Documentation |
logistic_forestplot
logistic_forestplot(
...,
modelnames = NULL,
varnames = NULL,
stats = NULL,
odds.ratio = F,
breaks = NULL,
intercept = T,
sig = 3
)
... |
One or more logistic regression model objects. |
modelnames |
A character vector of names to label each plot and table column. |
varnames |
A named character vector. Each element is a human friendly version of the variable name, and each name is the original variable name. |
stats |
A named list of numeric vectors. The names are the names of the stats; the vectors are the stats to include in the table. |
odds.ratio |
If TRUE, apply exponential transform to coefficients and omit intercept. |
breaks |
An optional vector of breaks for the plot x-axis. |
intercept |
If TRUE, include the intercept in the table and plot; otherwise omit. |
sig |
The number of significant digits for the table. |
A named list. $plot has the plot. $table has the data frame of coefficients and stats.
data(mtcars)
m1 <- glm(am ~ hp, family=binomial, mtcars)
m2 <- glm(mpg ~ wt, family=binomial, mtcars)
mnms <- c('AM vs HP', 'AM vs Weight')
vnms <- c(mpg='Miles per gallon', hp='Horsepower', wt='Weight')
out <- logistic_forestplot(m1, m2, modelsnames=mnms, varnames=vnms)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.