Dummy Variables (Fixed Effects)
Using tenuredata.dta (restricted to rice == 1):
- Instead of manually demeaning the data, use the
i.operator to include a fixed effect dummy for every individual household (panelid). - Run a regression of raw
yieldonq_f_haand your dummy variables (i.panelid). Cluster the standard errors bypanelid.
Does the regression even run on your version of Stata? If so,
- Use
eststoto save the LSDV results. Then adapt the table structure from the previous exercise to create a table of results with a fourth column headedLSDV. - What is the coefficient on fertilizer in the LSDV regression and how does it compare to the coefficients you calculated in Exercises 1 and 2?