library(model.plot)

Welcome!

Welcome to model.plot! model.plot is an R package designed to make it easier to plot, interact with, and interpret your basic model results.

Installation

devtools::install_github("harader/model.plot")
libary(model.plot)

Usage

Let's load some data from the ISLR package and play around

library(ISLR)
summary(College)

This looks like an interesting data set about colleges! Let's subset to only private colleges, and run a regression on out of state tuition:

my_model <- lm(Outstate ~ perc.alumni + Grad.Rate + Top10perc + PhD + Terminal, data = College[College$Private == "Yes", ])

# Standard plot
plot(my_model)

Cool! Now let's say we want to see all variables, not just where p < .05

plot(my_model, p = 1)

And now a bar plot...

bar_plot(my_model)

And a table...

stat_table(my_model)

And a histogram of residuals...

plot_residuals(my_model)

Woohoo! Happy Plotting!



harader/model.plot documentation built on May 12, 2019, 5:40 a.m.