*[* EiR = Econometrics in Replications, a feature of TRN that highlights useful econometrics procedures for re-analysing existing research.]*

*NOTE: All the data and code necessary to produce the results in the tables below are available at Harvard’s Dataverse: ***click here.**

**click here.**

###### Fixed effects estimators are often used when researchers are concerned about omitted variable bias due to unobserved, time-invariant variables. These can prove insightful if there is much within-variation to support the fixed effects estimate. However, they can be misleading when there is not.

###### Stata has several commands that can help the researcher gauge the extent of within-variation. In this example, we use the “wagepan” dataset that is bundled with Jeffrey Wooldridge’s text, “Introductory Econometrics: A Modern Approach, 6e”. The dataset consists of annual observations of 545 workers over the years 1980-1987. It is described **here**.

**here**

###### In this example we use fixed effects to regress log(wage) on education, labor market experience, labor market experience squared, dummy variables for marital and union status, and annual time dummies.

###### The table below reports the fixed effects (within-estimate) for the “married” variable. For the sake of comparision, it also reports the between-estimate for “married” (calculated used the Mundlak version of the Random Effects Within Between estimator (**Bell, Fairbrother, and Jones, 2019**).

**Bell, Fairbrother, and Jones, 2019**

###### The within-estimate of the marriage premium is smaller than the between-estimate. This is consistent with marital status being positively associated with unobserved, time-invariant productivity characteristics of the worker. However, we want to know how much variation there is in marital status for the workers in our sample. If it is just a few workers who are changing marital status over time, then our estimate may not be representative of the effect of marriage in the population.

###### Stata provides two commands that can be helpful in this regard. The command *xttab *reports, among other things, a measure of variable stability across time periods. In the table below, among workers who ever reported being unmarried, they were unmarried for an average of 64.8% of the years in the sample.

*xttab*

###### Among workers who ever reported being married, they were married for 62.5% of the years in the sample. In this case, changes in marital status are somewhat common. Note that a time-invariant variable would have a “Within Percent” value of 100%.

###### Stata provides another command, *xttrans*, that gives detail about year-to-year variable transitions.

*xttrans*

###### The rows represent the values in year *t, *with the columns representing the values in the following year. In this case, 86% of observations that were unmarried at time *t, *were also unmarried at time *t+1. *14% of observations that were unmarried at time *t* changed status to “married” at time *t+1*.

###### Among other things, the *xttrans* command provides a reminder that the fixed effects estimate of the marriage premium includes the effect of transitioning from married to unmarried: 5% of observations that were married at time *t* were unmarried at time *t+1. *The implied assumption is that the effect of marriage on wages is symmetric, something that could be further explored in the data.

*xttrans*

You must be logged in to post a comment.