violets is a package for R which re-estimates fancy statistical models using simple OLS.

Original idea by @abhworthington. Hex logo by @researchremora. Thanks!

Install and load:

# install from github
library(remotes)
install_github('vincentarelbundock/violets')

```r
# load
library(violets)

Your Poisson model of horse kicks to the head could be BLUE:

url <- 'https://vincentarelbundock.github.io/Rdatasets/csv/pscl/prussian.csv'
dat <- read.csv(url, stringsAsFactors = FALSE)

mod <- glm(y ~ corp + year, data = dat, family = 'poisson')
violets(mod)

Your probit model of deaths aboard the titanic could be BLUE:

url <- 'http://vincentarelbundock.github.io/Rdatasets/csv/Stat2Data/Titanic.csv'
dat <- read.csv(url, stringsAsFactors = FALSE)

mod <- glm(Survived ~ Sex + Age + PClass, data = dat, family = binomial(link = 'probit'))
violets(mod)

Your ordered logit model of ??? could be BLUE:

library(MASS)
url <- 'https://vincentarelbundock.github.io/Rdatasets/csv/geepack/koch.csv'
dat <- read.csv(url, stringsAsFactors = FALSE)

dat$y <- as.factor(dat$y)
mod <- polr(y ~ day + trt, data = dat)

violets(mod)


vincentarelbundock/violets documentation built on Feb. 27, 2021, 8:15 p.m.