Miller (1988)‘s warning about the median replicated in R

median_bias

This page demons­tra­tes a repli­ca­tion of Miller (1988)‘s simu­la­tion revea­ling the esti­ma­tion bias mani­fest when esti­ma­ting the median of ske­wed data (ex. human res­ponse time data). The code demons­tra­tes Monte Carlo simu­la­tion in R using the plyr pac­kage and the use of ggplot2 for graphics. It should take about a half hour to com­plete on a rea­so­nably fast (circa 2008) system.

For the impa­tient, here is a vec­tor graphic pdf copy of the above graph (i.e. zoo­ma­ble, so you can read the num­bers), and for the tho­rough, here is a plot of the esti­ma­tion varia­bi­lity (“ev”, com­pu­ted as the stan­dard devia­tion of esti­ma­tes. n.b. Miller’s ori­gi­nal paper claims to report the sd of esti­ma­tes but actually reports the variance of esti­ma­tes; the square root of Miller’s values roughly match those obtai­ned here).

Leave a Reply