### Install sjPlot Stable Release (R) Source: https://github.com/strengejacke/sjplot/blob/master/README.md Installs the latest stable release of the sjPlot R package from CRAN. This is the recommended method for most users seeking reliable, tested versions. ```R install.packages("sjPlot") ``` -------------------------------- ### Install sjPlot Development Build (R) Source: https://github.com/strengejacke/sjplot/blob/master/README.md Installs the latest development snapshot of the sjPlot R package from GitHub using the devtools library. This method provides access to the most recent features and bug fixes. ```R library(devtools) devtools::install_github("strengejacke/sjPlot") ``` -------------------------------- ### sjp.likert() and sjp.grpfrq() Updates Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Details bug fixes for sjp.likert() and sjp.grpfrq(). Includes removal of unnecessary warnings and corrections for facetting and axis labeling. ```APIDOC sjp.likert() and sjp.grpfrq() Bug Fixes: - `sjp.likert()`: Removed unnecessary warning for uneven category counts when a neutral category is specified. - `sjp.grpfrq()`: - Correctly uses the complete space in facets when `facet.grid = TRUE`. - `type = "boxplot"`: Fixed x-axis labeling when a category has no elements in a vector. ``` -------------------------------- ### tab_model() Function Enhancements and Bug Fixes Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Comprehensive documentation for `tab_model()` updates, covering new arguments like `show.ngrps`, `show.loglik`, and `strings`. It details the integration of robust standard error calculation via `vcov.fun`, `vcov.type`, `vcov.args`, and the enhanced `p.style` argument. Numerous bug fixes related to column headers, R2 computation, and robust standard errors are also addressed. ```APIDOC tab_model() - `string.est`: Bug fix where it did not overwrite the default label for the estimate-column-header. - Bug fix: Minor fix for mixed models that can't compute R2. - Bug fix: Fix issue when printing robust standard errors and CI (i.e., when using arguments `vcov*`). - `show.ngrps`: Adds back functionality to print the number of random effects groups for mixed models. - `show.loglik`: Adds back functionality to print the model's log-Likelihood. - `strings`: Convenient shortcut for setting column-header strings. - `vcov.fun`, `vcov.type`, `vcov.args`: Additional arguments passed down to `sjstats::robust()` to calculate different types of (clustered) robust standard errors. - `p.style`: Now allows printing both numeric p-values and asterisks by using `p.style = "both"`. - Bug fix: Did not print number of observations for `coxph`-models. - Supports printing simplex parameters of monotonic effects of **brms** models. - `prefix.labels`: Argument to add a prefix to the labels of categorical terms. ``` -------------------------------- ### Handling of Model Coefficients and Standardization Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Focuses on how sjPlot handles model coefficients, particularly regarding standardization. It mentions that standardization now uses refitting and that specific arguments for standardized coefficients in tab_model() are no longer ignored. ```R ## General * Standardization of model parameters (in `plot_model()` or `tab_model()`) now uses standardization based on refitting the model. ## Bug fixes * Arguments `string.std_ci` and `string.std_se` are no longer ignored in `tab_model()`. ``` -------------------------------- ### plot_stackfrq() Function Renaming and Enhancements Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Documents the renaming of `sjp.stackfrq()` to `plot_stackfrq()`. It also highlights new functionalities such as the `show.n` argument for displaying count values (combinable with `show.prc`) and support for grouped data frames. ```APIDOC plot_stackfrq() (formerly sjp.stackfrq()) - Renamed from `sjp.stackfrq()`. - `show.n`: New argument to show count values, can be combined with `show.prc`. - Now works on grouped data frames. - Bug fix: Resolved issue when `show.na = TRUE` and some items had zero-values (in `sjt.stackfrq()`). ``` -------------------------------- ### plot_model() and plot_models() Enhancements Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Details new arguments, model support, and plotting features for plot_model() and plot_models(). Includes support for brmsfit, clmm, glmmTMB objects, zero-inflation plots, multivariate responses, and enhanced term specification. ```APIDOC plot_model() and plot_models() Changes: - New Argument: `prefix.labels`: Prefixes automatically retrieved term labels with the related variable name or label. - New Argument: `show.zeroinf`: Controls visibility of the zero-inflation part of models in the plot. - New Argument: `jitter`: Adds random variation to data points for specific plot types. - New Argument: `legend.title`: Defines the legend title for plots displaying a legend. - Enhanced `...` Argument: `plot_model()` passes more arguments to `ggeffects::plot()` for marginal effects plots. - New Model Support: `plot_model()` now supports `brmsfit` (including zero-inflated parts and random-effects QQ-plots for diagnostic types) and `clmm` objects. - Multivariate Response Models: `plot_model()` now plots models with multiple outcomes. - Diagnostic Plots (`type = "diag"`): - Supports `brmsfit` and `stanreg`/`stanfit` objects. - Axis limits can be set using `axis.lim` for Stan-models. - `glmmTMB`-models now show random-effects QQ-plots for all random effects. - Enhanced `grid.breaks` Argument: Accepts a vector of values for direct grid break definition or calculates better defaults when length is one. - Enhanced `terms` Argument: Allows specification of a range of numeric values (e.g., `"age [30:50]"`) or `"age [pretty]"` for marginal effects plots. - Categorical Term Handling: `terms` and `rm.terms` arguments now support specification of factor levels for categorical terms in coefficient plots. Bug Fixes related to plot_model(): - `plot_model(type = "re")`: Now supports standard errors and confidence intervals for `glmmTMB`-objects. - `glmmTMB` Tidier Fix: Corrected data return for the zero-inflation part. - `brms` Multilevel Models: Multiple random intercepts are now shown in separate facets. - `plot_model(type = "int")`: Improved automatic selection of `mdrt.values` for non-integer variables. ``` -------------------------------- ### General Package Updates and Dependency Management Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Covers general package-wide changes, including dependency updates, internal code revisions, and the introduction of new color palettes. It notes replacements of functions from external packages with internal ones from 'parameters'. ```R ## General * Replaced `performance::principal_component()` by `parameters::principal_component()`. * Fixed CRAN check issues, due to the latest *bayestestR* update. ## General * Minor revisions to meet the changes in the forthcoming update from tidyr. * new color palettes were added (see `show_sjplot_pals()`). ## General * Updated and re-arranged internal color palette, especially to have a better behaviour when selecting colors from continuous palettes (see `show_pals()`). ``` -------------------------------- ### sjt.itemanalysis() Function Enhancements Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Describes updates to the `sjt.itemanalysis()` function, including support for ordered factors and improved error messaging for unordered factors. It also details the new 'auto' option for the `factor.groups` argument, which leverages PCA with Varimax rotation for automatic factor group detection. ```APIDOC sjt.itemanalysis() - Now works on ordered factors. - Provides a clearer error message when unordered factors are used. - `factor.groups`: Argument can now be "auto" to detect factor groups based on a PCA with Varimax rotation. ``` -------------------------------- ### plot_grid() and plot_stackfrq() Updates Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Details changes to plot_grid() and plot_stackfrq(). plot_grid() gains a 'tags' argument for adding tags to plot panels. plot_stackfrq() has fixes for handling data frames with many missing values. ```R ## Changes to functions * `plot_grid()` gets a `tags`-argument to add tags to plot-panels. ## Bug fixes * Fixed bug in `plot_stackfrq()` for data frames with many missing values. * Fixed bug in `tab_stackfrq()` when items had different amount of valid values. ``` -------------------------------- ### Function Renames and Replacements Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Details on functions that have been renamed or replaced with new, improved versions in the sjPlot package. This includes guidance on migrating from older functions to newer ones. ```R sjp.scatter() was revised and renamed to plot_scatter(). plot_scatter() is pipe-friendly and works on grouped data frames. sjp.gpt() was revised and renamed to plot_gpt(). plot_gpt() is pipe-friendly and works on grouped data frames. sjp.likert() was renamed to plot_likert(). sjp.resid() was renamed to plot_residuals(). sjt.lm(), sjt.glm(), sjt.lmer(), sjt.glmer() are deprecated. Please use tab_model() instead. sjp.lm(), sjp.glm(), sjp.lmer(), sjp.glmer(), sjp.int() are defunct. Please use plot_model() instead. sjt.frq() is defunct. Please use sjmisc::frq(out = "v") instead. sjt.grpmean(), sjt.mwu(), sjt.df() are defunct. Replacements are sjstats::grpmean(), sjstats::mwu(), tab_df() resp. tab_dfs(). ``` -------------------------------- ### tab_model() Bug Fixes and Changes Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Information on updates to the tab_model() function, a replacement for older sjt. functions. Covers improvements in handling robust standard errors, confidence intervals, list inputs, and new arguments for p-values and column ordering. ```R tab_model() recalculates and adjusts confidence intervals and p-values based on robust standard errors. tab_model() accepts multiple model-objects stored in a list. tab_model() gets p.style and p.threshold arguments for significance indication. tab_model() gets show.adj.icc argument for adjusted ICC in mixed models. tab_model() gets col.order argument to reorder table columns. Fixed issue with standardized coefficient (show.std) in tab_model(). tab_model() supports brmsfit-objects with categorical-family. Argument show.ci in tab_model() now computes confidence intervals for different levels correctly. ``` -------------------------------- ### view_df() Function Bug Fixes Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Documents bug fixes for `view_df()`, addressing issues where labels and frequency values were mixed up when value labels were present but no such values were in the data, and where frequency/percentage values were not truncated correctly. ```APIDOC view_df() - Bug fix: Mixed up labels and frequency values when value labels were present, but no such values were in the data. - Bug fix: Did not truncate frequency- and percentage-values for variables where value labels were truncated to a certain maximum number. ``` -------------------------------- ### tab_model() Enhancements and Bug Fixes Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Details changes and fixes related to the tab_model() function in sjPlot, including improved handling of robust estimation, Kenward-Roger/Satterthwaite approximations, Bayesian models, p-value formatting, and support for new model types like gamlss and wbm(). It also covers new arguments for bootstrapping and displaying AICc. ```R ## Changes to functions * Improved handling for `tab_model()` of robust estimation in general and Kenward-Roger or Satterthwaite approximations in particular for linear mixed models. * Revised code to cope with forthcoming *tidyselect*-update. ## Bug fixes * Fixed issue in `tab_model()` and `plot_model()` for certain cases when coefficients could not be estimated and were `NA`. * Fixed issue in `tab_model()` with `collapse.ci` for Bayesian models. * Fixed issue in `tab_model()` when `p.val="kr"` and `show.df=TRUE`. * Fixed issue in `tab_model()` with formatting issues of p-values when standardized coefficients where requested. * Fixed issue in `tab_model()` due to changes in other packages *sjPlot* depends on. * Fixed issue in `tab_model()` with detecting labels when `auto.label = TRUE`. * Fixed issue in `tab_model()` for negative binomial hurdle mixed models (i.e. *glmmTMB* models with truncated negative-binomial family). * Fixed bug in `tab_model()` with `show.reflvl = TRUE`. * Fixed bug in `tab_model()` where labels for coefficients where not matching the correct coefficients. * Arguments `string.std_ci` and `string.std_se` are no longer ignored in `tab_model()`. * Fixed bug in `tab_model()` with `show.df = TRUE` for *lmerModLmerTest*. * Fixed bug in `tab_model()` where `show.reflvl = TRUE` did not insert the reference category in first place, but in alphabetical order. ## Changes to functions * `tab_model()` gets arguments `bootstrap`, `iterations` and `seed` to return bootstrapped estimates. * `tab_model()` now supports *gamlss* models. * `tab_model()` gets a `show.aicc`-argument to show the second order AIC. * `tab_model()` gets a `show.reflvl`-argument to show the reference level of factors. * `tab_model()` gets a `string.std_se` and `string.std_ci`-argument to change the column header for standard errors and confidence intervals of standardized coefficients. * `tab_model()` no longer prints a message that default p-values for mixed models are based on Wald approximation. * `show.ci50` defaults to `FALSE` now. ## Changes to functions * `tab_model()` now supports `wbm()`-models from the *panelr*-package. ``` -------------------------------- ### General Function Updates and Bug Fixes Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Covers various minor updates and bug fixes across different sjPlot functions. This includes exporting `dplyr::n()`, a fix for `plot_models()` stopping for some models, and a new `drop.empty()` argument for several plotting functions. ```APIDOC General Updates: - Export `dplyr::n()` to meet changes in dplyr 0.8.0. - `plot_models()`: Bug fix that stopped for some models. - `sjt.xtab()`, `sjp.xtab()`, `plot_frq()`, `sjp.grpfrq()`: Get a `drop.empty()`-argument to drop values / factor levels with no observations from output. - Bug fix: Fixed encoding issues with help-files. ``` -------------------------------- ### sjt.pca() and sjp.pca() Rotation Argument Update Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Describes the enhancement to the `rotation` argument in `sjt.pca()` and `sjp.pca()`, allowing it to support all rotation methods available in `psych::principal()`. ```APIDOC sjt.pca(), sjp.pca() - `rotation`: Argument now supports all rotations from `psych::principal()`. ``` -------------------------------- ### New Functions and Features Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Introduction of new functions and features in the sjPlot package. This includes a new primary function for model tables and new color scales for ggplot objects. ```R New function: tab_model() as replacement for sjt.lm(), sjt.glm(), sjt.lmer(), sjt.glmer(). Works with the same model-objects as plot_model(). New color scales for ggplot-objects: scale_fill_sjplot() and scale_color_sjplot(). New function: show_sjplot_pals() to show predefined color palettes. New function: sjplot_pal() to return color values of a specific palette. ``` -------------------------------- ### Defunct Functions in sjPlot Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Identifies functions that have been marked as defunct and provides their recommended replacements, primarily `tab_model()`. ```APIDOC Defunct Functions: - `sjt.lm()` - `sjt.glm()` - `sjt.lmer()` - `sjt.glmer()` - Recommendation: Please use `tab_model()` instead. ``` -------------------------------- ### sjt.itemanalysis() Bug Fix Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Fix for the file argument in sjt.itemanalysis(). ```R The file-argument now works again in sjt.itemanalysis(). ``` -------------------------------- ### tab_df() and plot_frq() Updates Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Details improvements to tab_df() and plot_frq() functions. tab_df() now uses value labels for factors and includes a 'digits' argument for rounding. plot_frq() has fixes for automatic axis labelling and plotting factors. ```R ## Bug fixes * Improved `tab_df()` now uses value labels for factors instead of numeric values. ## Changes to functions * `tab_df()` gets a `digits` argument, to round numeric values in output. ## Bug fixes * Fixed bug in automatic axis labelling for `plot_frq()` for non-labelled, numeric values. * Fixed bug in `plot_frq()` when plotting factors. * Fixed bug with sorting frequencies in `plot_frq()` when vector had more labels than values. ``` -------------------------------- ### sjt.xtab() Statistics Argument Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Enhancement to the statistics argument in sjt.xtab() to include Fisher's Exact Test. ```R The statistics-argument in sjt.xtab() gets a "fisher"-option, to force Fisher's Exact Test to be used. ``` -------------------------------- ### plot_model() Function Updates and Bug Fixes Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Details significant updates to `plot_model()`, including expanded support for various model types (e.g., `wbm()`, `MixMod`, `mlogit`, `gmnl`). It also covers new arguments for robust standard error calculation and addresses several bug fixes related to interaction term recognition and legend labeling. ```APIDOC plot_model() - Supports `wbm()`-models from the *panelr*-package. - Supports `MixMod`-objects from package **GLMMadpative**, `mlogit`- and `gmnl`-models. - `type = "int"`: Now recognizes interaction terms with `:` in formula (bug fix). - `vcov.fun`, `vcov.type`, `vcov.args`: Additional arguments passed down to `sjstats::robust()` for calculating different types of (clustered) robust standard errors. - Bug fix: Legend labels were inverted for **brms**-models when `type = "diag"`. - Bug fix: Legend labels were duplicated for marginal effects plots when `color = "bw"` and `legend.title` was specified. ``` -------------------------------- ### General Bug Fixes Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Addresses a bug related to handling German umlauts in HTML table output. ```APIDOC General Bug Fixes: - HTML Table Output: Fixed problems with German umlauts when printing HTML tables. ``` -------------------------------- ### Tidiers for lmerModLmerTest Objects Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Fix for tidier functions not working with lmerModLmerTest objects due to changes in broom and lmerTest packages. ```R Fix issue with tidiers for lmerModLmerTest objects due to changes in broom and lmerTest packages. ``` -------------------------------- ### Package Dependency Reduction Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md General package maintenance note regarding the reduction of package dependencies. ```R Reduced package dependencies. ``` -------------------------------- ### plot_frq() Function Renaming and Enhancements Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Details the renaming of `sjp.frq()` to `plot_frq()`. It highlights new features such as pipe-consistent syntax, the ability to plot multiple variables in one call, and support for grouped data frames. A bug fix related to `wrap.labels` is also noted. ```APIDOC plot_frq() (formerly sjp.frq()) - Renamed from `sjp.frq()`. - Bug fix: `wrap.labels` did not properly work for factor levels. - Now has pipe-consistent syntax. - Enables plotting multiple variables in one function call. - Supports grouped data frames. ``` -------------------------------- ### view_df() Deprecation Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Deprecation notice for the hide.progress argument in view_df(), replaced by verbose. ```R Argument hide.progress in view_df() is deprecated. Please use verbose now. ``` -------------------------------- ### Renamed Functions in sjPlot Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Lists functions that have been renamed within the sjPlot package to align with a more consistent naming convention. ```APIDOC Renamed Functions: - `sjp.kfold_cv()` was renamed to `plot_kfold_cv()`. - `sjp.frq()` was renamed to `plot_frq()`. ``` -------------------------------- ### Function Renaming and Deprecations Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Lists function renames and removals in sjPlot. Functions like sjt.itemanalysis and sjt.xtab have been renamed to tab_itemscale and tab_xtab respectively. Cluster functions have been removed and are now available in the 'parameters' package. ```R ## Function renaming * `sjt.itemanalysis()` is now named `tab_itemscale()`. * `sjt.xtab()` is now named `tab_xtab()`. ## Renamed functions * `sjp.stackfrq()` was renamed to `plot_stackfrq()`. * `sjt.stackfrq()` was renamed to `tab_stackfrq()`. ## Function renaming * `sjp.grpfrq()` is now names `plot_grpfrq()`. * `sjp.xtab()` is now names `plot_xtab()`. ## Breaking changes * Cluster functions have been removed, as these are now re-implemented in the **parameters** package. ``` -------------------------------- ### plot_likert() Function Updates and Bug Fixes Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Outlines changes to `plot_likert()`, including the introduction of `reverse.scale` to invert category order and `groups` for item grouping. It also notes the enhanced flexibility of `grid.range` to define different lengths for x-axis scales. A bug fix related to `reverse.scale` and `values = "sum.inside"` is also documented. ```APIDOC plot_likert() - Bug fix: `reverse.scale = TRUE` resulted in `values = "sum.inside"` being outside and vice-versa. - `reverse.scale`: Argument to reverse the order of categories, so positive and negative values switch position. - `groups`: Argument to group items in the plot. - `grid.range`: Argument may now also be a vector of length 2, to define different lengths for the left and right x-axis scales. ``` -------------------------------- ### plot_model() Enhancements and Bug Fixes Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Details changes and fixes related to the plot_model() function in sjPlot, including improvements in standardization methods, handling of coefficient order, and the addition of a new marginal effects plot type. ```R ## General * Standardization of model parameters (in `plot_model()` or `tab_model()`) now uses standardization based on refitting the model. ## Changes to functions * `plot_model()` gets `type = "emm"` as marginal effects plot type, which is similar to `type = "eff"`. See [Plotting Marginal Effects of Regression Models](https://strengejacke.github.io/sjPlot/articles/plot_marginal_effects.html) for details. ## Bug fixes * Fixed issue in `tab_model()` and `plot_model()` for certain cases when coefficients could not be estimated and were `NA`. * `sort.est = NULL` in `plot_model()` now preserves original order of coefficients. ``` -------------------------------- ### plot_model() Bug Fixes and Changes Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Details on fixes and enhancements for the plot_model() function in sjPlot. Includes changes to handling categorical predictors, terms specification, robust standard errors, color scales, and zero-inflated models. ```R plot_model() no longer automatically changes plot-type to "slope" for models with a single categorical predictor (>2 levels). plot_model() type="eff" and type="pred" now work when terms is not specified. plot_model() argument dot.size and line.size now apply to marginal effects and diagnostic plots. plot_model() uses a free x-axis scale in facets for models with zero-inflated part. plot_model() shows multiple plots for models with zero-inflated parts when grids = FALSE. plot_model() and plot_models() get a p.threshold argument to determine significance thresholds for estimates. Fixed bug in plot_model() where value labels disappeared for plot_likert(). plot_model() now supports brmsfit-objects with categorical-family. ``` -------------------------------- ### sjp.frq() Bug Fix Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Fix for the sjp.frq() function related to axis labels for non-labelled character vectors. ```R Fix issue in sjp.frq() with correct axis labels for non-labelled character vectors. ``` -------------------------------- ### plot_likert() Enhancements Source: https://github.com/strengejacke/sjplot/blob/master/NEWS.md Describes improvements to the plot_likert() function, focusing on how category labels are displayed in legends for grouped plots, including multi-row display and automatic label adjustment to prevent overlap. ```R ### `plot_likert()` * showed category labels in the top and bottom legends in two rows if there are more than six categories. Also, the categories are ordered column wise instead of row wise. This behaviour can now be controlled for grouped likert plots, using `group.legend.options`. The ordering now defaults to row wise and the user can force all categories onto a single row. * now automatically adjusts labels to avoid overlapping. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.