# Blog Archives

## 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.

## Standard, Robust, and Clustered Standard Errors Computed in R

June 15, 2012
By
$Standard, Robust, and Clustered Standard Errors Computed in R$

Where do these come from? Since most statistical packages calculate these estimates automatically, it is not unreasonable to think that many researchers using applied econometrics are unfamiliar with the exact details of their computation. For the purposes of illustration, I am going to estimate different standard errors from a basic linear regression model: , using the

## Visualizing Euro 2012: First Group Games

June 12, 2012
By

Now that every team has played a match it will be interesting to see how this has affected the (inverse) odds of victory. Since the plot in my last post was a bit ‘busy’, I have decided to use the facet_wrap function in gglplot2 to stratify by group. Also, re-producing the ‘busy’ plot from the

## Visualizing Euro 2012 with ggplot2

June 9, 2012
By

After scanning this paper by Zeileis, Leitner & Hornik, I thought it would be interesting to see how the victory odds for each team changes as Euro 2012 progresses. To do this, I am going to collect the daily inverse odds of a tournament victory offered by a popular betting site for each team. Here