Blog Archives

All you need is text – Markdown (via pandoc) for academia

May 1, 2013
By

Many students struggle to find an adequte format for their thesis. Ironically the advent of “modern” WYSIWYG programms seems to make it harder to consistently format a text. While learning LaTeX may be a bit too much to ask for, markdown is a very minimal language that together with pandoc affords all typesetting needs for

Read more »

Evolution of a logistic regression

January 28, 2013
By
Evolution of a logistic regression

In my last post I showed how one can easily summarize the outcome of a logistic regression. Here I want to show how this really depends on the data-points that are used to estimate the model. Taking a cue from the evolution of a correlation I have plotted the estimated Odds Ratios (ORs) depending on

Read more »

Plotting Odds Ratios (aka a forrestplot) with ggplot2 –

January 17, 2013
By
Plotting Odds Ratios (aka a forrestplot) with ggplot2 –

Hi, if you like me work in medical research, you have to plot the results of multiple logistic regressions every once in a while. As I have not yet found a great solution to make these plots I have put together the following short skript. Do not expect too much, it’s more of a reminder

Read more »

When Venn diagrams are not enough – Visualizing overlapping data with Social Network Analysis in R

March 2, 2012
By
When Venn diagrams are not enough – Visualizing overlapping data with Social Network Analysis in R

I recently thought about ways to visualize medications and their co-occurences in a group of children. As long as you want to visualize up to  4 different medications you can simply use Venn diagrams. There is a very nice R-package to generate these kind of graphics for you (for a  description see: Chen and Boutros, 2011). But

Read more »

Visualizing GIS data with R and Open Street Map

October 8, 2011
By
Visualizing GIS data with R and Open Street Map

In this post I way to share with you some code to use Openstreetmap – maps as a backdrop for a data visualization. We will use the RgoogleMaps-package for R. In the following I will show you how to make this graph. 1. Download the map I wanted to take a closer look at an

Read more »

The four steps to publication-grade graphics in R

October 3, 2011
By

This Article is also available in EN, ES.

Read more »

Simulation studies in R – Using all cores and other tips

September 16, 2011
By

After working more seriously with simulations I noticed some updates were necessary to my previous setup. Most notably are the following three: It is very handy to explicitly call the different scenarios instead of using nested loops Storing intermediate results in single files obliviates the need to rerun an almost finished but crashed analysis and

Read more »

Dump MySQL to CSV using R

August 10, 2011
By

Based on a related post on one of my favorite python-lists I remembered, that I wrote a similar snipplet some time ago. So if you want to dump your whole MySQL database to csv-files you can recycle the following code: ?Download mysql2cvs.R1 2 3 4 5 6 7 8 9 require(RMySQL) m<-MySQL() summary(m) con<-dbConnect(m, dbname

Read more »

GIS on a shoestring – Getting traveltimes from google

July 2, 2011
By

The analysis of geospatial information is currently a big trend in medicine and public health. Even though some may want to convince you that this can only be achieved with the latest and most expensive software, I am not convinced. First, analysis  of spatial data dates back to at least 1856 when John Snow investigated

Read more »

Visualizing small-scale paired data – combining boxplots, stripcharts, and confidence-intervals in R

June 3, 2011
By
Visualizing small-scale paired data – combining boxplots, stripcharts, and confidence-intervals in R

Sometimes when working with small paired data-sets it is nice to see/show all the data in a structured form. For example when looking at pre-post comparisons, connected dots are a natural way to visualize which data-points belong together. In R this can be easily be combined with boxplots expressing the overall distribution of the data.  This

Read more »