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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.