Publications by Tim Bock
Creating custom Sankey diagrams using R
I have previously shown how Sankey diagrams can easily be used to visualize response patterns in surveys and to display decision trees. Following on from these posts, I will now be getting a bit more technical, and describe how to create custom Sankey diagrams in R. I will start by explaining the basics of Sankey diagrams, and then provide examp...
4443 sym R (638 sym/1 pcs) 6 img
A new R package for labeled scatterplots and bubble charts
The rhtmlLabeledScatter package on github attempts to solve three chronic challenges with labeled scatterplots: readability with large numbers of labels, bubbles, and the use of images. Four tools for dealing with overlapping labels 1. Automatically arranging labels so they do not overlap If you look at the scatterplot below, you should immedia...
2315 sym 4 img
Easily add images to a correspondence analysis plot in R
You can take your correspondence analysis plots to the next level by including images. Better still, you don’t need to paste in the images after the analysis is complete – you can include them right from the start. The plot above shows the results of a correspondence analysis based on data from a study of how people perceive different carbona...
2595 sym R (1216 sym/3 pcs) 4 img
How to create a max-diff experimental design in R
Creating the experimental design for a max-diff experiment is easy in R. This post describes how to create and check a max-diff experimental design. If you are not sure what this is, it would be best to read A beginner’s guide to max-diff first. Step 1: Installing the packages The first step is to install the flipMaxDiff package and a series ...
7610 sym R (417 sym/2 pcs) 10 img
How to interpret correspondence analysis plots (it probably isn’t the way you think)
Correspondence analysis is a popular data science technique. It takes a large table, and turns it into a seemingly easy-to-read visualization. Unfortunately, it is not quite as easy to read as most people assume. In How correspondence analysis works (a simple explanation), I provide a basic explanation of how to interpret correspondence analys...
15955 sym 6 img
Using correspondence analysis to compare sub-groups and understand trends
This post shows how to use correspondence analysis to compare sub-groups. It focuses on one of the most interesting types of sub-groups: data at different points in time. This is variously known as trend, tracking, longitudinal and time series data. The end-goal is a visualization showing key comparisons, such as the visualization above. �...
6293 sym 4 img
The magic trick that highlights significant results on any table
This post describes the single biggest time saving technique that I know about for highlighting significant results on a table. The table below, which shows the results of a MANOVA, illustrates the trick. The coloring and bold fonts on the table quickly draw the eye to the two key patterns in the results: people aged 50 or more have lower averag...
7743 sym 4 img
Comparing Partial Least Squares to Johnson’s Relative Weights
In this post I explore two different methods for computing the relative importance of predictors in regression: Johnson’s Relative Weights and Partial Least Squares (PLS) regression. Both techniques solve a problem with Multiple Linear Regression, which can perform poorly when there are correlations between predictor variables. When the...
6284 sym 2 img
Singular Value Decomposition (SVD): Tutorial Using Examples in R
If you have ever looked with any depth at statistical computing for multivariate analysis, there is a good chance you have come across the singular value decomposition (SVD). It is a workhorse for techniques that decompose data, such as correspondence analysis and principal components analysis. In this post I explain, at an intuitive lev...
5539 sym R (604 sym/5 pcs) 2 img
Understanding the Math of Correspondence Analysis with Examples in R
Correspondence analysis is a popular tool for visualizing the patterns in large tables. To many practitioners it is probably a black box. Table goes in, chart comes out. In this post I explain the mathematics of correspondence analysis. I show each step of the calculation, and I illustrate all the of the steps using R. If you’ve ever wanted a d...
18198 sym R (952 sym/15 pcs) 8 img