0
$\begingroup$

The seminal paper I allude to is linked here. Namely, the authors use contiguous county pairs to estimate the effect of minimum wage. Let $i$ index counties, $p$ index pairs, and $t$ index time. Furthermore, let $w_{it}^M$ be the minimum wage in county $i$ and pair $p$, $y_{it}$ be the employment in county $i$ at time $t$(can also be indexed by pairs), let $\phi_i$ be the county fixed effect, $\tau_{pt}$ be the time fixed effect and $\varepsilon_{ipt}$ be the typical white noise error. Finally, let $\alpha$ be the constant coeffcient. Thus, their model is:

$$\ln y_{ipt} = \alpha + \eta w_{it}^M + \dot + \phi_i + \tau_{pt} + \varepsilon_{ipt}$$

What I can't understand for my life is how does the model matrix looks like? Or, equivalently, how do I set up my data in order to run the above specification (ie, how do I generate appropriate dummy variables)

For example, suppose I have 4 counties $a,b,c,d$ with $(a,b)$ and $(c,d)$ being contiguous pairs. Then, would the below matrix/data setup enable me to fit the above model?

$$\begin{matrix} time & county & wage & employment/outcome & pair_{ab} & pair_{cd} \\ 1990 & a & w_{a1990} & y_{a1990} & 1 & 0 \\ 1990 & b & \vdots & \vdots & 1 & 0\\ 1990 & c & & & 0 & 1\\ 1990 & d & & & 0 & 1\\ 1991 & a & & & 1 & 0 \\ 1991 & b & & & 1 & 0 \\ 1991 & c & & & 0 & 1\\ 1991 & d & & & 0 & 1\\ \end{matrix}$$

so that, for example, in R model notation, I would estimate: $$y\sim \text{county_dummy} + \text{time_dummy}+\text{wage} + \text{pair_ab} + \text{pair_cd}$$

$\endgroup$
0
$\begingroup$

You're on the right track. Since the model is indexed by time, country, and pair, you'll need to index your model parameters by each of these three. So make a column for each index (time, country, pair). In your table above, you've split the "pair" column into two separate columns. That works, but it might be simpler to use a single column with aliases 1 for {$ab$} and 2 for {$cd$}.

Next you want to use a column to store each of the parameters in the formula. What's confusing is that your parameter definitions don't match the model parameters. What are $a$ and $\eta$? Is there a missing term between the two $+$ symbols? Should $y$ be indexed by $ipt$ (as in the formula) or just $ip$ (as in your description)? Are these parameters truly just indexed over $i$, $p$, and $t$; or are some maybe functions of (some of) these indexes?

Once you get a column for each of $a$, $\eta w^M_{it}$, $\phi_i$, and $\tau_{pt}$, you'll want one final column to store the estimate (or maybe two columns: one is the estimate and one is the true value).

Then row by row enter a unique combination of indices (just like you did above), the corresponding parameter values, and (if applicable) the actual observed employment. Finally, you get the formula's estimate by summing the parameter values and exponentiating.

Good luck!

| cite | improve this answer | |
$\endgroup$
  • $\begingroup$ won't coding the pairs into a categorical variable lose the tractability of each pair-wise difference? $\endgroup$ – Gene Burinsky Apr 5 '17 at 17:34
  • $\begingroup$ On another note, $\eta$ is the coefficient for $w_i^M$, I noted the $\alpha$ and fixed the other issues. I'm not sure what you mean in the last paragraph. The above is intended to be simply put through a least-squares estimator, ie $\beta = (X'X)^{-1}(Xy)$ .. etc Also, as a side note, recall that the first moment of the log-normal is $e^{\bar{y}+.5\sigma^2}$ $\endgroup$ – Gene Burinsky Apr 5 '17 at 17:41
0
$\begingroup$

It seems the only element missing is the interaction between time and pairs so the model ends up being (abusing notation R's model notation):

$$y∼\text{county_dummy}+\text{wage}+\text{pair_ab:time_dummies}+\text{pair_cd:time_dummies}$$

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.