Publications by Max Gordon
Using the SVD to find the needle in the haystack
Sitting with a data set with too many variables? The SVD can be a valuable tool when you’re trying to sift through a large group of continuos variables. The image is CC by Jonas in China. It can feel like a daunting task when you have a > 20 variables to find the few variables that you actually “need”. In this article I describe how the sin...
5787 sym R (9882 sym/10 pcs) 10 img 5 tbl
Getting to the point – an alternative to the bezier arrow
An alternative bezier arrow to the regular grid-bezier. Apart from a cool gradient it has the advantages of: exact width, exact start/end points and axis alignment. About two weeks ago I got frustrated with the bezierGrob function in the grid package. The lwd parameter is interpreted differently depending on device, the arrow at the end does not ...
4783 sym R (25777 sym/24 pcs) 20 img 12 tbl
Visualizing transitions with the transitionPlot function
A transition between states – the above is a simulation of before and after surgery where I’ve highlighted the large proportion that doesn’t improve in the moderate group. As an orthopaedic surgeon I’m often interested in how a patient is doing after surgery compared to before. I call this as a transition between states, e.g. severe pain ...
3909 sym R (2614 sym/14 pcs) 14 img 8 tbl
Too crude to be true?
Harvesting the magical update() function. The image is CC by Waldemar Horwat. The key to programming is being lazy; it has actually been called a virtue by some. When I discovered the update() function it blew me away. Within short I had created a monster based upon this tiny function, allowing quick and easy output of regression tables that cont...
3590 sym R (14731 sym/16 pcs) 2 img 10 tbl
The forestplot of dreams
A forestplot that compares Swedish and Danish EQ-5D outcome predictors generated with the forestplot2()-function in the Gmisc-package Displaying large regression models without overwhelming the reader can be challenging. I believe that forestplots are amazingly well suited for this. The plot gives a quick understanding of the estimates position i...
4487 sym R (4089 sym/12 pcs) 16 img 6 tbl
Fast-track publishing using knitr: intro (part I)
A beautiful old document. Probably state of the art in those days. The image is CC by storebukkebruse. Fast-track publishing using knitr is a short series on how I use knitr to get my articles faster published. By fast-track publishing I mean eliminating as many of the obstacles as possible during the manuscript phase, and not the fast-track some...
6996 sym 4 img
Fast-track publishing using knitr: the setup using .RProfile with custom CSS + some HTML goodies (part II)
Flexing RStudio/knitr where you want can be a challenge. The image is CC by Ben Barnes. Fast-track publishing using knitr is a short is a short series on how I use knitr to get my articles faster published. This is part II where I will show how you can tweak RStudio into producing seamless MS Word-integration by using the .RProfile together with ...
6775 sym R (6392 sym/12 pcs) 12 img 7 tbl
Fast-track publishing using knitr: exporting images for sharing and press (part III)
Images can be a powerful medium if used right. The image is CC by alemdag. Fast-track publishing using knitr is a short series on how I use knitr to speedup publishing in my research. This is the third article in the series devoted to plots. Hopefully you will through this post have the need-to-know stuff so that you can (1) add auto-numbering to...
7728 sym R (4947 sym/15 pcs) 18 img 8 tbl
Fast-track publishing using knitr: table mania (part IV)
Constructing tables is an art – maximizing readability and information can be challenging. The image is of the Turning Torso in Malmö and is CC by Alan Lam. Fast-track publishing using knitr is a short series on how I use knitr to speedup publishing in my research. While illustrations (previous post) are optional, tables are not, and this four...
7203 sym R (6381 sym/18 pcs) 12 img 9 tbl
Fast-track publishing using knitr: stitching it together (part V)
Putting all the pieces together can be challenging both for surgeons and researchers. The image is CC by Zac Peckler Fast-track publishing using knitr is a short series on how I use knitr to speedup publishing in my research. There has been plenty of feedback and interest for the series, and in this post I would like to provide (1) a brief summar...
3706 sym R (11902 sym/4 pcs) 8 img 2 tbl