Blog Archives

IV Estimates via GMM with Clustering in R

April 1, 2014
By
IV Estimates via GMM with Clustering in R

In econometrics, generalized method of moments (GMM) is one estimation methodology that can be used to calculate instrumental variable (IV) estimates. Performing this calculation in R, for a linear IV model, is trivial. One simply uses the gmm() function in the excellent gmm package like an lm() or ivreg() function. The gmm() function will estimate

Read more »

Within Group Index in R

February 4, 2014
By
Within Group Index in R

There are many occasions in my research when I want to create a within group index for a data frame. For example, with demographic data for siblings one might want to create a birth order index. The below illustrates a simple example of how one can create such an index in R.

Read more »

Detecting Weak Instruments in R

September 23, 2013
By
Detecting Weak Instruments in R

Any instrumental variables (IV) estimator relies on two key assumptions in order to identify causal effects: That the excluded instrument or instruments only effect the dependent variable through their effect on the endogenous explanatory variable or variables (the exclusion restriction), That the correlation between the excluded instruments and the endogenous explanatory variables is strong enough

Read more »

Endogenous Spatial Lags for the Linear Regression Model

August 18, 2013
By
Endogenous Spatial Lags for the Linear Regression Model

Over the past number of years, I have noted that spatial econometric methods have been gaining popularity. This is a welcome trend in my opinion, as the spatial structure of data is something that should be explicitly included in the empirical modelling procedure. Omitting spatial effects assumes that the location co-ordinates for observations are unrelated

Read more »

How Much Should Bale Cost Real?

August 5, 2013
By
How Much Should Bale Cost Real?

It looks increasingly likely that Gareth Bale will transfer from Tottenham to Real Madrid for a world record transfer fee. Negotiations are ongoing, with both parties keen to get the best deal possible deal with the transfer fee. Reports speculate that this transfer fee will be anywhere in the very wide range of £80m to

Read more »

The Frisch–Waugh–Lovell Theorem for Both OLS and 2SLS

June 5, 2013
By
The Frisch–Waugh–Lovell Theorem for Both OLS and 2SLS

The Frisch–Waugh–Lovell (FWL) theorem is of great practical importance for econometrics. FWL establishes that it is possible to re-specify a linear regression model in terms of orthogonal complements. In other words, it permits econometricians to partial out right-hand-side, or control, variables. This is useful in a variety of settings. For example, there may be cases

Read more »

Kalkalash! Pinpointing the Moments “The Simpsons” became less Cromulent

April 30, 2013
By
Kalkalash! Pinpointing the Moments “The Simpsons” became less Cromulent

Whenever somebody mentions “The Simpsons” it always stirs up feelings of nostalgia in me. The characters, uproarious gags, zingy one-liners, and edgy animation all contributed towards making, arguably, the greatest TV ever. However, it’s easy to forget that as a TV show “The Simpsons” is still ongoing—in its twenty-fourth season no less. For me, and

Read more »

texreg: A package for beautiful and easily customizable LaTeX regression tables from R

January 20, 2013
By
texreg: A package for beautiful and easily customizable LaTeX regression tables from R

There was a very informative post last week showing how the R package stargazer is used to generate nice LaTeX tables from a number of R objects. This package looks very useful. However, I would like to extol the virtues of another R package that converts model objects in R into LaTeX code: texreg. For

Read more »

The Cluster Bootstrap

January 12, 2013
By
The Cluster Bootstrap

Adjusting standard errors for clustering can be a very important part of any statistical analysis. For example, duplicating a data set will reduce the standard errors dramatically despite there being no new information. I have previously dealt with this topic with reference to the linear regression model. However, in many cases one would like to

Read more »

Identical Champions League Draw: What Were the Odds?

December 24, 2012
By
Identical Champions League Draw: What Were the Odds?

A number of news outlets have reported a peculiar quirk that arose during Friday’s Champions League draw. Apparently, the sport’s European governing body, UEFA, ran a trial run the day before the main event, and the schedule chosen during this event was identical to that of the actual draw on Friday. Given this strange coincidence,

Read more »