knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
glmplus
is an enhanced version of general linear model for logistic regression. There are summary.glmplus
and plot.glmplus
in this package.
summary.glmplus
provides, in addition to the baseR summary.glm
, odds ratio and confidence interval.
library(glmplus) data(mtcars) glm_model <- glmplus(vs ~ cyl + mpg + hp, data=mtcars, family=binomial) summary(glm_model)
plot.glmplus
returns a ggplot object. The plot demonstrates the relationship between the given variable and the outcome binary variable.
library(glmplus) data(mtcars) glm_model <- glmplus(vs ~ cyl + mpg + hp, data=mtcars, family=binomial) plot(glm_model, "hp")
plot(glm_model, "hp", "cyl")
plot(glm_model, "hp") + labs(y="Prob(V-shaped Engine)", x="Horsepower", title="Relationship of V-shape engine and horsepower", subtitle="controlling for mpg and number of cylinders")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.