Publications by Daniel
Visual interpretation of interaction terms in linear models with ggplot #rstats
I haven’t used interaction terms in (generalized) linear model quite often yet. However, recently I have had some situations where I tried to compute regression models with interaction terms and was wondering how to interprete the results. Just looking at the estimates won’t help much in such cases. One approach used by some people is to comp...
4466 sym R (2881 sym/9 pcs) 14 img
sjPlotting functions now as package available #rstats
This weekend I had some time to deal with package building in R. After some struggling, I now managed to setup RStudio, Roxygen and MikTex properly so I can compile my collection of R-scripts into a package that even succeeds the package check. Downloads (package and manual) as well as package description are available at the package information ...
1916 sym 4 img
sjPlot – data visualization for statistics (in social science) #rstats
I’d like to announce the release of version 0.7 of my R package for data visualization and give a small overview of this package (download and installation instructions can be found on the package page). What does this package do? In short, the functions in this package mostly do two things: compute basic or advanced statistical analyses plot ...
3275 sym 4 img
R vs Stata: Importing and Saving Datasets
Today, I got a license of the new Stata/MP 13 (dual core), so I decided to make some succinct comparisons with R (Rstudio). Much more tests will come in the following weeks, but today I focused only on the basics: processing text files. Essentially, reading and writing raw datasets. The results I obtained, surprised me—I’ve to confess—R ou...
4724 sym 2 img
sjPlot 0.9 (data visualization package) now on CRAN #rstats
Since version 0.8, my package for data visualization using ggplot has been released on the Comprehensive R Archive Network (CRAN), which means you can simply install the package with install.packages("sjPlot"). Last week, version 0.9 was released. Binaries are already available for OS X and Windows, and source code for Linux. Further updates wil...
1007 sym 4 img
Finding out repeated variables in multiple datasets
Few days ago I posted on doing a smart job on importing several data files alike from a directory. Today, I want to return to this topic, but stretching it a bit further by adding some complexity. I want to have a snapshot of the datasets even before starting work with them. That is, I want to know beforehand which variables appear across multi...
1977 sym 4 img
Comparing multiple (g)lm in one graph #rstats
It’s been a while since a user of my plotting-functions asked whether it would be possible to compare multiple (generalized) linear models in one graph (see comment). While it is already possible to compare multiple models as table output, I now managed to build a function that plots several (g)lm-objects in a single ggplot-graph. The following...
2154 sym R (785 sym/1 pcs) 10 img
Exponential Numbers
I received a message asking me why I use so often numbers like 1e6 (exponential form) instead of writing down the whole numbers. I never thought on this before. However, I can assure that it’s not because I’m lazy and don’t like typing long numbers. In fact, thinking on this made me find a reasonable explanation for this: With very large o...
1220 sym 2 img
No need for SPSS – beautiful output in R #rstats
About one year ago, I seriously started migrating from SPSS to R. Though I’m still using SPSS (because I have to in some situations), I’m quite comfortable and happy with R now and learnt a lot in the past months. But since SPSS is still very wide spread in social sciences, I get asked every now and then, whether I really needed to learn R, b...
3937 sym R (1967 sym/7 pcs) 18 img
Simply creating various scatter plots with ggplot #rstats
Inspired by these two postings, I thought about including a function in my package for simply creating scatter plots. In my package, there’s a function called sjp.scatter for creating scatter plots. To reproduce these examples, first load the package and then attach the sample data set: data(efc) The simplest function call is by just providing ...
1911 sym R (939 sym/6 pcs) 14 img