Collection of plotting and table output functions for data visualization. Results of various statistical analyses (that are commonly used in social sciences) can be visualized using this package, including simple and cross tabulated frequencies, histograms, box plots, (generalized) linear models, mixed effects models, PCA and correlation matrices, cluster analyses, scatter plots, Likert scales, effects plots of interaction terms in regression models, constructing index or score variables and much more.
To install the latest development snapshot (see latest changes below), type following commands into the R console:
library(devtools)
devtools::install_github("sjPlot/devel")
Please note that the latest development snapshot most likely depends on the latest build of the sjmisc-package, so you probably want to install it as well:
devtools::install_github("sjPlot/sjmisc")
To install the latest stable release from CRAN, type following command into the R console:
install.packages("sjPlot")
In case you want / have to cite my package, please use citation('sjPlot')
for citation information. Since core functionality of package depends on the ggplot-package, consider citing this package as well.
sjp.gpt
to plot grouped proportional tables.save_plot
as convenient function to save the last ggplot-figure in high quality for publication.
sjp.lmm
can now also plot standardized estimates.sjp.lm
,sjp.lmm
andsjt.lm
can now plot standardized estimates, where standardization is computed following Gelman's approach by dividing estimates by two standard deviations.sjp.lm
,sjp.glm
,sjp.lmm
,sjp.glmm
,sjp.lmer
andsjp.glmer
get aremove.estimates
argument to remove specific estimates from the plot output.- Added parameters
ci.hyphen
andminus.sign
tosjt.lm
,sjt.glm
,sjt.lmer
andsjt.glmer
to set specific symbols or HTML entitities for hyphens and minus signs of negative numbers. - Added
type = "coeff"
tosjp.lmer
to plot joint random and fixed effects coefficients. type = "poly"
insjp.lm
can now deal with fitted models that either use polynomials withpoly
or splines withbs
(see examples).sjt.df
gets abig.mark
parameter to add thousands-separators if parameterdescribe = TRUE
.sjt.df
andview_df
now recognize Date and POSIX-classes, ifshowType = TRUE
.sjp.poly
now also returns cutpoints of loess curvature, to get maximum / minimum values of loess curvature.sjp.lm
withtype = "ma"
now also returns all plots as list of ggplot-objects.sjp.setTheme
now allows for custom label and title colors when using pre-set-themes.- Improved automatic y-axis-limit detection in
sjp.frq
andsjp.grpfrq
. - Minor improvements to
sjp.lmm
andsjp.glmm
.
- Fixed bug in
sjp.lmer
, which misleadingly printed wrong beta coefficients (they were exponentiated as for odds ratios). - Fixed bug with computation of predicted probabilities in
sjp.glm
andsjp.glmer
(only occured whentype = "y.pc"
). sjp.grpfrq
did not show correct number of missings (argumentna.rm = FALSE
), if grouping variable startet with zero.- Fixed bug with
sjp.frq
andsjt.frq
, when variable was a labelled factor with lowest factor level smaller than 1. - Fixed bug in
view_df
with parametershowFreq = TRUE
, when variable was a character vector. - Minor bug fixes with p-shapes in
sjp.lmm
andsjp.glmm
. - Fixed bug in
sjt
-table functions that occured with invalid multibyte strings.