# Blog Archives

## Minimizing Bias in Observational Studies

November 26, 2012
By

Measuring the effect of a binary treatment on a measured outcome is one of the most common tasks in applied statistics. Examples of these applications abound, like the effect of smoking on health, or the effect of low birth weight on cognitive development. In an ideal world we would like to be able to assign

## Heteroskedastic GLM in R

November 20, 2012
By

A commenter on my previous blog entry has drawn my attention to an R function called hetglm() that estimates heteroskedastic probit models. This function is contained in the glmx package. The glmx package is not available on CRAN yet, but thankfully can be downloaded here. The hetglm() function has a number of computational advantages compared with

## The Heteroskedastic Probit Model

November 19, 2012
By
$The Heteroskedastic Probit Model$

Specification testing is an important part of econometric practice. However, from what I can see, few researchers perform heteroskedasticity tests after estimating probit/logit models. This is not a trivial point. Heteroskedasticity in these models can represent a major violation of the probit/logit specification, both of which assume homoskedastic errors. Thankfully, tests for heteroskedasticity in these

## BMR: Bayesian Macroeconometrics in R

September 4, 2012
By

The recently released BMR package, short for Bayesian Macroeconometrics with R, provides a comprehensive set of powerful routines that estimate Bayesian Vector Autoregression (VAR) and Dynamic Stochastic General Equilibrium (DSGE) models in R. The procedure of estimating both Bayesian VAR and DSGE models can represent a great computational burden. However, BMR removes a lot of

## Probit Models with Endogeneity

August 15, 2012
By
$Probit Models with Endogeneity$

Dealing with endogeneity in a binary dependent variable model requires more consideration than the simpler continuous dependent variable case. For some, the best approach to this problem is to use the same methodology used in the continuous case, i.e. 2 stage least squares. Thus, the equation of interest becomes a linear probability model (LPM). The

## Combining ggplot Images

July 3, 2012
By

The ggplot2 package provides an excellent platform for data visualization. One (minor) drawback of this package is that combining ggplot images into one plot, like the par() function does for regular plots, is not a straightforward procedure. Fortunately, R user Stephen Turner has kindly provided a function called “arrange” that does exactly this. The function,

## How to Convert Rugby into Football/Soccer Scores

June 26, 2012
By

Following the Irish rugby team’s humiliating 60-0 defeat to New Zealand, an interesting question was posed on Twitter: what does a 60-0 result convert to in football/soccer? Intrigued, I decided to gather some data from both the English premier league (this season, more data collected and future blog posts to come!) and the equivalent English

## Euro 2012: Day 18

June 25, 2012
By

As promised. Looks like a Spain Germany final.

## Euro 2012: End of Group Stage

June 20, 2012
By

Time for an update of the plots. Here are the teams still left in the competition. This is the group stratification. Finally, the busy plot.

## Euro2012 Viz: Second Group Games

June 16, 2012
By

The second round of group games ended last night (sadly with Sweden’s elimination). Here is what the last number of days has done to the plots.