# Monthly Archives: July 2015

## #rstats Make arrays into vectors before running table

## Setup of Problem

While working with `nifti`

objects from the `oro.nifti`

, I tried to table the values of the image. The table took a long time to compute. I thought this was due to the added information about a medical image, but I found that the same sluggishness Read More

## Mark Twain was a stats fan, anything else is a Damn Lie.

At some point or another, many of us have heard the quote popularized by Mark Twain, that “there are three kinds of lies: lies, damned lies, and statistics.” For a long time, my response was to snarkily question Twain’s statistical training — I would say that he was writing Read More

## Derivation and interpretation of leverage in SLR

I was recently looking online for an explicit derivation of leverage — the diagonals of the “hat matrix” — in simple linear regression. If X is the n-times-p matrix of explanatory variables in a linear model, then the hat matrix is H=X(X’X)^{-1}X’, so called because it puts the Read More

## Many statistical “gold standards” aren’t perfect, but that’s why they’re perfectly named

Statisticians and computer scientists often use the term “gold standard” for the best possible benchmark you could have when trying to estimate something. For example, Elizabeth Sweeney has worked on algorithms for tagging brain lesions in MRIs, and compares the results against a gold standard of human neurologists attempting Read More

## Line plots of longitudinal summary data in R using ggplot2

I recently had an email for a colleague asking me to make a figure like this in `ggplot2`

or `trellis`

in `R`

:

As I know more about how to do things in `ggplot2`

, I chose to use that package (if it wasn't obvious from the plot or other Read More

## Teaching a short topic to beginner R users

A couple weeks ago I was given the opportunity to teach a 1 hr 30 min slot of an introduction to `R`

course. In the past, I’ve taught lectures for similar courses, and I ended up asking myself what would be the best short topic to teach and how to Read More

## Teaching a short topic to beginner R users

A couple weeks ago I was given the opportunity to teach a 1 hr 30 min slot of an introduction to `R`

course. In the past, I’ve taught lectures for similar courses, and I ended up asking myself what would be the best short topic to teach and how to Read More