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.

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

Data Transformation in R: The #Tidyverse-Approach of Organizing Data #rstats

Yesterday, I had the pleasure to give a talk at the 8th Hamburg R User-Group meeting. I talked about data wrangling and data transformation, and how the philosophy behind the tidyverse makes these tasks easier. If you like, you can download the slides here (or at the GitHub-Repo from the Hamburg R-User-Group). Feel free to add your comments to the slide here.

Data wrangling within the #tidyverse – the design philosophy behind the sjmisc-package #rstats

I’m pleased to announce sjmisc 2.3.0, which was just updated on CRAN. The update might break existing code – however, functions were largely revised to work seamlessly within the tidyverse. In the long run, consistent design makes working with sjmisc more intuitive.

Basically, sjmisc covers two domains of functionality:

  • Reading and writing data between R and other statistical software packages like SPSS, SAS or Stata and working with labelled data; this includes easy ways to get and set label attributes, to convert labelled vectors into factors (and vice versa), or to deal with multiple declared missing values etc.
  • Data transformation tasks like recoding, dichotomizing or grouping variables, setting and replacing missing values. The data transformation functions also support labelled data.

This posting briefly describes some of the changes to the function design that do data transformation tasks.

Weiterlesen „Data wrangling within the #tidyverse – the design philosophy behind the sjmisc-package #rstats“

sjPlot-update: b&w-Figures for Print Journals and Package Vignettes #rstats #dataviz

My sjPlot-package was just updated on CRAN with some – as I think – useful new features.

First, I have added some vignettes to the package (based on the existing online-documentation) that cover some core features and principles of the sjPlot-package, so you have direct access to these manuals within R. The vignettes are also online on CRAN.

Weiterlesen „sjPlot-update: b&w-Figures for Print Journals and Package Vignettes #rstats #dataviz“

Exploring the European Social Survey (ESS) – pipe-friendly workflow with sjmisc, part 2 #rstats #tidyverse

This is another post of my series about how my packages integrate into a pipe-friendly workflow. The post focusses on my sjmisc-package, which was just updated on CRAN, and highlights some of the new features. Examples are based on data from the European Social Survey, which are freely available.

Please note: The statistical analyses at the end of this post mainly serve the purpose of demonstrating some features of the sjmisc-package that target „real life“ problems! For clarity reasons, I ran a quick-and-dirty model, which is not of high statistical quality or standard!

Weiterlesen „Exploring the European Social Survey (ESS) – pipe-friendly workflow with sjmisc, part 2 #rstats #tidyverse“

Pipe-friendly workflow with sjPlot, sjmisc and sjstats, part 1 #rstats #tidyverse

Recent development in R packages are increasingly focussing on the philosophy of tidy data and a common package design and api. Tidy data is an important part of data exploration and analysis, as shown in the following figure:

(Source: http://r4ds.had.co.nz/explore-intro.html)
(Source: http://r4ds.had.co.nz/explore-intro.html)

Tidying data not only includes data cleaning, but also data transformation, both being necessary to perform the core steps of data analysis and visualization. This is a complex process, which involves many steps. You need many packages and functions to perfom those tasks. This is where a common package design and api comes into play: „A powerful strategy for solving complex problems is to combine many simple pieces“, says the tidyverse manifesto. For a coding workflow, this means:

  • compose single functions with the pipe
  • design your API so that it is easy to use by humans

The latter bullet point is helpful to achieve the first bullet point.

Weiterlesen „Pipe-friendly workflow with sjPlot, sjmisc and sjstats, part 1 #rstats #tidyverse“

Tagged NA values and labelled data #rstats

sjmisc-package: Working with labelled data

A major update of my sjmisc-package was just released an CRAN. A major change (see changelog for all changes )is the support of the latest release from the haven-package, a package to import and export SPSS, SAS or Stata files.

The sjmisc-package mainly addresses three domains:

  • reading and writing data between other statistical packages and R
  • functions to make working with labelled data easier
  • frequently applied recoding and variable transformation tasks, also with support for labelled data

In this post, I want to introduce the topic of labelled data and give some examples of what the sjmisc-package can do, with a special focus on tagged NA values.

Weiterlesen „Tagged NA values and labelled data #rstats“

Effect-Size Calculation for Meta-Analysis in R #rstats

When conducting meta-analysis, you most likely have to calculate or convert effects sizes into an effect size with common measure. There are various tools to do this – one easy to use tool is the Practical Meta-Analysis Effect Size Calculator from David B. Wilson.

This online-tool is now implemented as an R-package: esc: Effect Size Computation for Meta Analysis.

Weiterlesen „Effect-Size Calculation for Meta-Analysis in R #rstats“

Pipe-friendly bootstrapping with list-variables in #rstats

A few days ago, my package sjstats was updated on CRAN. Most functions of this package are convenient functions for common statistical computations, especially for (mixed) regression models. This latest update introduces some pipe-friendly bootstrapping-methods, namely bootstrap(), boot_ci(), boot_se() and boot_p(). In this post, I just wanted to give a quick example of these functions, used within a pipeline-workflow.

Weiterlesen „Pipe-friendly bootstrapping with list-variables in #rstats“

Data visualization in social sciences – what’s new in the sjPlot-package? #rstats

My sjPlot package just reached version 2.0 and got many updates during the couple of last months. The focus was less on adding new functions; rather, I improved existing functions by adding new smaller and bigger features to make working with the package easier and more reliable. In this blog post, I will report some of the new features.

Consistent name style of arguments

Most notably, I tried to give all package functions a consistent naming style or pattern for arguments. In previous versions, mixing different name-styles was sometimes very confusing. For example, some functions used showNA, others na.rm or show.na. Or some functions used hideLegend, some showLegend and others again show.legend.

Weiterlesen „Data visualization in social sciences – what’s new in the sjPlot-package? #rstats“