Publications by Chris
Using R for Introductory Statistics, Chapters 1 and 2
I’m working my way through Using R for Introductory Statistics, by John Verzani, a free version of which is available as SimpleR. Chapter 1 …covers basics of R such as arithmetic, loading libraries and reading data. We also get an introduction to vectors and indexing. Chapter 2: Univariate Data The book divides data into three types: categor...
2510 sym R (1015 sym/5 pcs) 10 img
Using R for Introductory Statistics, 3.1
Pairs of categorical data The grades data.frame holds two columns of letter grades, giving pairs of categorical data, like so: prev grade 1 B+ B+ 2 A- A- 3 B+ A- ... 122 B B This type of data can be summarized by the table function, which counts the occurrence of each possible pair of letter grades. But first, I was...
1038 sym R (1341 sym/5 pcs) 4 img
Five years of Weight Tracking
After I moved back from New Jersey in June 2008 I started to track my body weight more seriously. My routine usually consists of getting up and after finishing the morning bathroom I would step on my scale. That way I try to ensure that the condition for each weighing are as similar as possible. I recorded my weight on paper and eventually would ...
2258 sym 4 img
Berlin Marathon 2014 Participants
After the 2013 Berlin Marathon sold out in less than four hours, the organizers decided to alter the registration process for 2014. First there was a pre-registration phase followed by a random selection from the pool of registrants to receive a spot. Those who were selected had to register until November 11th, 2013. Any spots that were not confi...
2099 sym 4 img
Analyzing Sleep with Sleep Cycle App and R
I have been tracking my sleep for almost two years now using my Fitbit. I started with the Fitbit Ultra and then moved on the the Fitbit One after it came out. In October 2013 I found out about the Sleep Cycle (Link) app for the iPhone. For weeks, Sleep Cycle was listed as the best-selling health app in Germany, where currently (as of January 201...
2523 sym 8 img
Determine your Fitbit stride length using a GPS watch
I have been carrying my Fitbit One for a little over two years with me and it keeps tracking my daily steps. It also tracks my distance covered by multiplying those steps using the stride length which you can either provide explicitly or implicitly setting your heights. In the winter of 2012 I bought my first Garmin Forerunner 410 (replaced by a ...
2082 sym 4 img
T-tests
One-Sample T-Tests To conduct a one-sample t-test in R, we use the syntax t.test(y, mu = 0) where x is the name of our variable of interest and mu is set equal to the mean specified by the null hypothesis. So, for example, if we wanted to test whether the volume of a shipment of lumber was less than usual ((mu_0=39000) cubic feet), we would run: ...
3229 sym R (2433 sym/8 pcs) 10 img
SafeGram: visualising drug safety
Update: an RMarkdown notebook explaining the whole process is available here. Visualising vaccine safety is hard. Doing so from passive (or, as we say it in Britain, ‘spontaneous’!) pharmacovigilance (PhV) sources is even harder. Unlike in active or trial pharmacovigilance, where you are essentially dividing the number of incidents by the per...
11447 sym 117 img 2 tbl
Installing RStudio Server on Debian 9
Oh, wouldn’t it be just wonderful if you could have your own RStudio installation on a server that you could then access from whatever device you currently have, including an iPad? It totally would. Except it’s some times far from straightforward. Here’s how to do it relatively painlessly. Step 1: Get a server Choose a suitable (and afforda...
6009 sym R (2427 sym/7 pcs) 8 img 1 tbl
Get your Jupyterhub box set up on Linode with a single go!
At CBRD, a lot of the research work we do is done on remote machines. For various reasons, we like being able to spin up and wind down these boxes at will, and auto-configure them at short notice according to a few standard variables. Depending on the installation, then, we would have a perfectly set up box with all the features we want, focused ...
4666 sym