Blog Archives

The Unofficial ENAR 2015 Itinerary Maker

March 10, 2015
By
The Unofficial ENAR 2015 Itinerary Maker

It’s almost ENAR 2015! The final program is out with all the sessions. The last conference I went to, the International Stroke Conference, had a program planner hosted by abstracts online. Although there are parts of this system I would like to change, I believe it is helpful for looking up sessions, presenters, and especially

Read more »

Using Tables for Statistics on Large Vectors

March 1, 2015
By
Using Tables for Statistics on Large Vectors

This is the first post I’ve written in a while. I have been somewhat radio silent on social media, but I’m jumping back in. Now, I work with brain images, which can have millions of elements (referred to as voxels). Many of these elements are zero (for background). We want to calculate basic statistics on

Read more »

The average Stripe employee! Congrats to Alyssa!

January 2, 2015
By
The average Stripe employee! Congrats to Alyssa!

Recently, my colleague and fellow blogger Alyssa Frazee accepted a job at Stripe. All of us at JHU Biostat are happy for her, yet sad to see her go. While perusing Stripe’s website, I found the About page, where each employee has a photo of themselves. I’ve been playing around with some PCA and decompositions,

Read more »

Adding Cost Functions to ROCR performance objects

December 22, 2014
By
Adding Cost Functions to ROCR performance objects

In my last post, I gave an introduction of the ROCR package and how to use it for ROC analysis. In the ROCR reference manual, it states “new performance measures can be added using a standard interface”, but I have not found that to be so. I may have missed some crucial step, but others

Read more »

A small introduction to the ROCR package

December 19, 2014
By
A small introduction to the ROCR package

I've been doing some classification with logistic regression in brain imaging recently. I have been using the ROCR package, which is helpful at estimating performance measures and plotting these measures over a range of cutoffs. The prediction and performance functions are the workhorses of most of the analyses in ROCR I've been doing. For those

Read more »

My Commonly Done ggplot2 graphs: Part 2

December 18, 2014
By
My Commonly Done ggplot2 graphs: Part 2

In my last post I described some of my commonly done ggplot2 graphs. It seems as though some people are interested in these, so I was going to follow this up with other plots I make frequently. Scatterplot colored by continuous variable The setup of the data for the scatterplots will be the same as

Read more »

My Commonly Done ggplot2 graphs

October 30, 2014
By
My Commonly Done ggplot2 graphs

In my last post, I discussed how ggplot2 is not always the answer to the question “How should I plot this” and that base graphics were still very useful. Why Do I use ggplot2 then? The overall question still remains: why (do I) use ggplot2? ggplot2 vs lattice For one, ggplot2 replaced the lattice package

Read more »

Working with NIfTI images in R

October 1, 2014
By
Working with NIfTI images in R

The oro.nifti package is awesome for NeuRoimaging (couldn't help myself). It has functions to read/write images, introduces the S4 nifti class, and has useful plotting functions. There are some limitations and some gotchas that are important to discuss if you are working with these objects in R. Dataset Creation We'll read in some data (a

Read more »

Sorted HTML Tables and Javascript Libraries

August 4, 2014
By
Sorted HTML Tables and Javascript Libraries

A few days ago StatsInTheWild asked the following question In the R function “sortable.html.table”, it's sorting 9.2 higher than 30.5 because of the leading digit. How do I fix this? — SITW (@StatsInTheWild) July 23, 2014 So we had a few exchanges where I thought you could use sprintf and be done but it didn't

Read more »

Sometimes Table is not the Answer – a Faster 2×2 Table

July 7, 2014
By
Sometimes Table is not the Answer – a Faster 2×2 Table

The table command is great in its simplicity for cross tabulations. I have run into some settings where it is slow and I wanted to demonstrate one simple example here of why you may want to use other functions or write your own tabler. This example is a specific case where, for some examples and

Read more »