More support for Bayesian analysis in the sj!-packages #rstats #rstan #brms

Another quick preview of my R-packages, especially sjPlot, which now also support brmsfit-objects from the great brms-package. To demonstrate the new features, I load all my „core“-packages at once, using the strengejacke-package, which is only available from GitHub. This package simply loads four packages (sjlabelled, sjmisc, sjstats and sjPlot). First, I fit two sample models, […]

Weiterlesen More support for Bayesian analysis in the sj!-packages #rstats #rstan #brms

Quick #sjPlot status update… #rstats #rstanarm #ggplot2

I’m working on the next update of my sjPlot-package, which will get a generic plot_model() method, which plots any kind of regression model, with different plot types being supported (forest plots for estimates, marginal effects and predictions, including displaying interaction terms, …). The package also supports rstan resp. rstanarm models. Since these are typically presented […]

Weiterlesen Quick #sjPlot status update… #rstats #rstanarm #ggplot2

Marginal effects for negative binomial mixed effects models (glmer.nb and glmmTMB) #rstats

Here’s a small preview of forthcoming features in the ggeffects-package, which are already available in the GitHub-version: For marginal effects from models fitted with glmmTMB() or glmer() resp. glmer.nb(), confidence intervals are now also computed. If you want to test these features, simply install the package from GitHub: library(devtools) devtools::install_github(„strengejacke/ggeffects“) Here are three examples: library(glmmTMB) […]

Weiterlesen Marginal effects for negative binomial mixed effects models (glmer.nb and glmmTMB) #rstats

Going Bayes #rstats

Some time ago I started working with Bayesian methods, using the great rstanarm-package. Beside the fantastic package-vignettes, and books like Statistical Rethinking or Doing Bayesion Data Analysis, I also found the ressources from Tristan Mahr helpful to both better understand Bayesian analysis and rstanarm. This motivated me to implement tools for Bayesian analysis into my […]

Weiterlesen Going Bayes #rstats

ggeffects: Create Tidy Data Frames of Marginal Effects for ‚ggplot‘ from Model Outputs #rstats

Aim of the ggeffects-package The aim of the ggeffects-package is similar to the broom-package: transforming “untidy” input into a tidy data frame, especially for further use with ggplot. However, ggeffects does not return model-summaries; rather, this package computes marginal effects at the mean or average marginal effects from statistical models and returns the result as tidy data […]

Weiterlesen ggeffects: Create Tidy Data Frames of Marginal Effects for ‚ggplot‘ from Model Outputs #rstats

Negative Binomial Regression for Complex Samples (Surveys) #rstats

The survey-package from Thomas Lumley is a great toolkit when analyzing complex samples. It provides svyglm(), to fit generalised linear models to data from a complex survey design. svyglm() covers all families that are also provided by R’s glm() – however, the survey-package has no function to fit negative binomial models, which might be useful […]

Weiterlesen Negative Binomial Regression for Complex Samples (Surveys) #rstats

Descriptive summary: Proportions of values in a vector #rstats

When describing a sample, researchers in my field often show proportions of specific characteristics as description. For instance, proportion of female persons, proportion of persons with higher or lower income etc. Since it happens often that I like to know these characteristics when exploring data, I decided to write a function, prop(), which is part […]

Weiterlesen Descriptive summary: Proportions of values in a vector #rstats

Direct integration of sjPlot-tables in knitr-rmarkdown-documents #rstats

A new update of my sjPlot-package was just released on CRAN. Thanks to @c_schwemmer, it’s now possible to easily integrate the HTML-ouput of all table-functions into knitr-rmarkdown-documents. Simpel Tables In the past, to integrate table-output in knitr, you needed to set the argument no.output = TRUE and use the return-value $knitr: If you also wanted […]

Weiterlesen Direct integration of sjPlot-tables in knitr-rmarkdown-documents #rstats