Skip to content
flexplot: graphical data analysis
R QML Other
Branch: master
Clone or download
Latest commit 4c8dc0d Dec 1, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R Merge branch 'development' into master Nov 18, 2019
README_files updated logo Dec 2, 2019
data this build passes R CMD check Oct 23, 2019
inst JASP wouldn't work without exports Nov 14, 2019
jamovi hiding numeric options only worked with integers, not decimals too Oct 22, 2019
man JASP wouldn't work without exports Nov 14, 2019
tests Merge branch 'development' into master Nov 18, 2019
vignettes doi for a reference was incorrect Oct 27, 2019
.DS_Store model.comparison would not compare two logistic models Nov 7, 2019
.Rapp.history unit tests were not testing estimates Oct 26, 2019
.Rbuildignore JASP wouldn't work without exports Nov 14, 2019
.gitignore
.travis.yml added codecov Oct 23, 2019
DESCRIPTION incremented package version Nov 13, 2019
EJ notes.rtf
FlexplotLogo.svg updated logo Dec 2, 2019
NAMESPACE JASP wouldn't work without exports Nov 14, 2019
README.Rmd updated logo Dec 2, 2019
README.md updated logo Dec 2, 2019
flexplot.Rproj R CMD CHECK fixes Oct 23, 2019
flexplot.jmo post R CMD check jamovi build Oct 23, 2019
flexplot.svg updated logo Dec 2, 2019
icon.svg put jamovi edits back Oct 15, 2019

README.md

flexplot

Travis build status codecov

Overview

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 graphics
  • added.plot() added variable plots
  • visualize() shows a visual representation of a fitted object
  • compare.fits() visually compares the fit of two different models
  • estimates() reports of effect sizes for statistical models
  • model.comparison() statistically compares the fits of two different models

A more complete manual for flexplot can be found at the Psych Arxiv

Installation of flexplot

# install.packages("devtools")
# install the stable version
devtools::install_github("dustinfife/flexplot")
# install the development version
devtools::install_github("dustinfife/flexplot", repo="development")

Usage

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="polynomial", 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)
#> Model R squared:
#> 0.567 (0.49, 0.64)
#> 
#> Semi-Partial R squared:
#> communication:separated 
#>                    0.01 
#> 
#> Estimates for Factors:
#>   variables        levels estimate lower upper
#> 1 separated Not Separated    44.72  43.1 46.35
#> 2               Separated    65.78 63.56    68
#> 
#> 
#> Mean Differences:
#>   variables              comparison difference lower upper cohens.d
#> 1 separated Separated-Not Separated      21.06  17.2 24.91     1.84
#> 
#> 
#> Estimates for Numeric Variables = 
#>       variables estimate lower upper std.estimate std.lower std.upper
#> 1   (Intercept)     2.66 -5.28 10.59         0.00      0.00      0.00
#> 2 communication     0.76  0.62  0.91         0.49     -0.47      1.45
compare.fits(satisfaction~communication|separated, data=relationship_satisfaction, full.mod, reduced.mod)

model.comparison(full.mod, reduced.mod)
#> $statistics
#>                  aic      bic bayes.factor p.value r.squared
#> full.mod    2312.712 2331.214        1.566  0.0108     0.567
#> reduced.mod 2317.309 2332.111        0.639             0.557
#> 
#> $pred.difference
#>    0%   25%   50%   75%  100% 
#> 0.033 0.460 0.962 1.814 6.736

Getting help

If something breaks, please post a minimal reproducible example on github. For questions and other discussion, contact me on twitter or by email.

You can’t perform that action at this time.