Blog Archives

Euro2012 Viz: Second Group Games

June 16, 2012
By
Euro2012 Viz: Second Group Games

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.

Read more »

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

Read more »

Visualizing Euro 2012: First Group Games

June 12, 2012
By
Visualizing Euro 2012: First Group Games

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

Read more »

Visualizing Euro 2012 with ggplot2

June 9, 2012
By
Visualizing Euro 2012 with ggplot2

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

Read more »

Let’s Party!

June 6, 2012
By
Let’s Party!

Exploring whether regression coefficients differ between groups is an important part of applied econometric research, and particularly for research with a policy based objective. For example, a government in a developing country may decide to introduce free school lunches in an effort to improve childhood health. However, if this treatment is known to only improve

Read more »

Optim, you’re doing it wrong?

May 28, 2012
By
Optim, you’re doing it wrong?

Call me uncouth, but I like my TV loud, my beer cold and my optimization functions as simple as possible. Therefore, what I write in this blog post is very much from a layman’s perspective, and I am happy to be corrected on any fundamental errors. I have recently become interested in writing my own

Read more »

Time-Series Policy Evaluation in R

May 21, 2012
By
Time-Series Policy Evaluation in R

Quantifying the success of government policies is clearly important. Randomized control trials, like those conducted by drug companies, are often described as the ‘gold-standard’ for policy evaluation. Under these, a policy is implemented in/to one area/group (treatment), but not in/to another (control). The difference in outcomes between the two areas or groups represents the effectiveness

Read more »

Simple Spatial Correlograms for Cross-Country Analysis in R

May 9, 2012
By
Simple Spatial Correlograms for Cross-Country Analysis in R

Accounting for temporal dependence in econometric analysis is important, as the presence of temporal dependence violates the assumption that observations are independent units. Historically, much less attention has been paid to correcting for spatial dependence, which, if present, also violates this independence assumption. The comparability of temporal and spatial dependence is useful for illustrating why

Read more »

An ivreg2 function for R

May 3, 2012
By
An ivreg2 function for R

The ivreg2 command is one of the most popular routines in Stata. The reason for this popularity is its simplicity. A one-line ivreg2 command generates not only the instrumental variable regression coefficients and their standard errors, but also a number of other statistics of interest. I have come across a number of functions in R

Read more »

Probit/Logit Marginal Effects in R

April 23, 2012
By
Probit/Logit Marginal Effects in R

The common approach to estimating a binary dependent variable regression model is to use either the logit or probit model. Both are forms of generalized linear models (GLMs), which can be seen as modified linear regressions that allow the dependent variable to originate from non-normal distributions. The coefficients in a linear regression model are marginal

Read more »