Blog Archives

Linear Models with Multiple Fixed Effects

December 11, 2012
By
Linear Models with Multiple Fixed Effects

Estimating a least squares linear regression model with fixed effects is a common task in applied econometrics, especially with panel data. For example, one might have a panel of countries and want to control for fixed country factors. In this case the researcher will effectively include this fixed identifier as a factor variable, and then proceed to

Read more »

Minimizing Bias in Observational Studies

November 26, 2012
By
Minimizing Bias in Observational Studies

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

Read more »

Heteroskedastic GLM in R

November 20, 2012
By
Heteroskedastic GLM in R

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

Read more »

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

Read more »

BMR: Bayesian Macroeconometrics in R

September 4, 2012
By
BMR: Bayesian Macroeconometrics in R

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

Read more »

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

Read more »

Combining ggplot Images

July 3, 2012
By
Combining ggplot Images

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,

Read more »

How to Convert Rugby into Football/Soccer Scores

June 26, 2012
By
How to Convert Rugby into Football/Soccer Scores

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

Read more »

Euro 2012: Day 18

June 25, 2012
By
Euro 2012: Day 18

As promised. Looks like a Spain Germany final.

Read more »

Euro 2012: End of Group Stage

June 20, 2012
By
Euro 2012: End of Group Stage

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.

Read more »