knitr::opts_chunk$set( collapse = TRUE, comment = "#>", out.width = "100%" ) options(tibble.print_min = 5, tibble.print_max = 5)
flexplot is a set of tools designed to pair with statistical modeling and simplify the process of visualizing data analysis. Some of the primary functions include:
flexplot()
flexible and intelligent multivariate graphicsadded.plot()
added variable plotsvisualize()
shows a visual representation of a fitted objectcompare.fits()
visually compares the fit of two different modelsestimates()
reports of effect sizes for statistical modelsmodel.comparison()
statistically compares the fits of two different modelsA more complete manual for flexplot can be found at the Psych Arxiv
# install.packages("devtools") # install the stable version devtools::install_github("dustinfife/flexplot") # install the development version devtools::install_github("dustinfife/flexplot", ref="development")
library(flexplot) data(relationship_satisfaction) ### multivariate relationship flexplot(satisfaction~communication + separated | gender + interests, data=relationship_satisfaction) ### show a straight line, remove standard errors, and specify 3 bins flexplot(satisfaction~communication + separated | gender + interests, data=relationship_satisfaction, method="lm", se=F, bins=3) ### show a ghost line to simplify comparisons flexplot(satisfaction~communication + separated | gender + interests, data=relationship_satisfaction, method="lm", se=F, bins=3, ghost.line="black") ### categorical variable flexplot(satisfaction~gender, data=relationship_satisfaction, spread="quartiles", jitter=c(.1, 0)) ### histogram/barchart flexplot(satisfaction~1, data=relationship_satisfaction) flexplot(gender~1, data=relationship_satisfaction) ### added variable plot added.plot(satisfaction~communication + separated | gender + interests, data=relationship_satisfaction, method="quadratic", se=F) ### modeling + graphics full.mod = lm(satisfaction~communication * separated , data=relationship_satisfaction) reduced.mod = lm(satisfaction~communication + separated , data=relationship_satisfaction) visualize(full.mod) estimates(full.mod) compare.fits(satisfaction~communication|separated, data=relationship_satisfaction, full.mod, reduced.mod) model.comparison(full.mod, reduced.mod)
If something breaks, please post a minimal reproducible example on github. For questions and other discussion, contact me on twitter or by email.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.