RheinischWestflisches Institut fr Wirtschaftsforschung Implementing Restricted Least Squares

  • Slides: 15
Download presentation
Rheinisch-Westfälisches Institut für Wirtschaftsforschung „Implementing Restricted Least Squares in Linear Models“ Dr. John P.

Rheinisch-Westfälisches Institut für Wirtschaftsforschung „Implementing Restricted Least Squares in Linear Models“ Dr. John P. Haisken-De. New jhaiskendenew@rwi-essen. de Haisken-De. New / Stata 2006 Mannheim March 31, 2006 1

v Inter-Industry Wage Differentials - Why do secretaries in the steel industry make more

v Inter-Industry Wage Differentials - Why do secretaries in the steel industry make more money than otherwise observably identical secretaries in the services industry? - Calculating „wage differentials“: Wages in steel > services ? - Dummy Variables: 0 or 1 v Starting Point Krueger/Summers (1988) „Efficiency Wages and the Inter-Industry Wage Structure“, Econometrica, 56, p 259 -93. - Would like to interpret differentials as deviations from a weighted average - Remove arbitrary selection of reference category - Excellent seminal paper, however technical problems … - Attempt to implement Restricted Least Squares (RLS) but. . - Incorrect standard errors: t-values systematically biased downward - Incorrect overall inference: Variation systematically biased downward Haisken-De. New / Stata 2006 Mannheim March 31, 2006 2 Rheinisch-Westfälisches Institut für Wirtschaftsforschung 1 a. Background

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 1 b. Background v Technical Contribution (in Handout) Haisken-De. New/Schmidt

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 1 b. Background v Technical Contribution (in Handout) Haisken-De. New/Schmidt (1997) „Inter-Industry and Inter-Regional Differentials: Mechanics and Interpretation“, Review of Economics and Statistics, 79(3), p. 517 -21. - How to implement Restricted Least Squares (RLS) correctly - How to implement RLS after any linear model (OLS, FE, RE…) - RLS was implemented in GAUSS, LIMDEP and Stata (crudely) v Now RLS is implemented in Stata in a flexible Ado <hds 97. ado> - What does the syntax look like? Haisken-De. New / Stata 2006 Mannheim March 31, 2006 3

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 2 a. RLS <hds 97. ado> - One Dummy Set

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 2 a. RLS <hds 97. ado> - One Dummy Set v Run a linear regression reg/xtreg depvar indepvars v Standard Syntax (only ONE dummy set) hds 97 indepvars [, options] options description refname( string ) a string containing the name of the "reference" category realname( string ) a string containing a descriptive name for the set of dummy variables weight( varname ) a string containing the name of the weighting variable Haisken-De. New / Stata 2006 Mannheim March 31, 2006 4

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 2 b. RLS <hds 97. ado> - Many Dummy Sets

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 2 b. RLS <hds 97. ado> - Many Dummy Sets v Run a linear regression reg/xtreg depvar x* Xvar_1 Zvar_2 Dvar_* XXLvar_* v Advanced Syntax (MANY dummy variable sets) global hds 97_1 Xvar_ref descriptive_name_for_X global hds 97_2 Zvar_1 Zvar_2 Zvar_ref descriptive_name_for_Z global hds 97_3 Dvar_*. . . global hds 97_50 XXLvar_* Dvar_ref XXLvar_ref descriptive_name_for_D descriptive_name_for_XXL (up to 50 globals/constraints can be set) Xvar_1 is a regressor used in regress or xtreg previously Xvar_ref is a text name for the reference category descriptive_name is a descriptive text name of the dummy set hds 97 [, weight(wgt_var_name)] Haisken-De. New / Stata 2006 Mannheim March 31, 2006 5

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 2 c. RLS <hds 97. ado> v Output created by

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 2 c. RLS <hds 97. ado> v Output created by <hds 97. ado> (A) Original Regression (OLS, RE, FE etc) repeated (B) Each Dummy Variable Group using RLS is calculated - From “k-1” Dummy Variables: “k” Coefficients reported (C) Weighted Standard Deviation (Sampling Corrected) of RLS Betas - Measure of overall variation (D) F-Tests of Joint Significance - Are the dummy variables as a group significant (E) Sample Shares of each Dummy - What were the sample shares used to create the weighted average - From the weighted average, the deviations are calculated (see B) Haisken-De. New / Stata 2006 Mannheim March 31, 2006 6

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 3. Illustrative Example (in Handout) v American Current Population Survey

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 3. Illustrative Example (in Handout) v American Current Population Survey (CPS) - Use freely available January 2004 CPS sample - http: //www. nber. org/morg/annual/morg 04. dta v Run simple wage regression (age 18 -65) - log hourly wages = f (age, gender, race, marital status, state) v Dummy Indicators - gender: male, female - race: white, black, other - marital status: married, divorced, separated, single - states: AK, AL… WY v Selecting arbitrary dummy variable as reference - Which one? Makes no difference in the calculation, just in interpretation v With RLS, interpret the dummy variables as deviations from a weighted average as opposed to an arbitrary reference category v If logged wages, then interpretation: %-point deviations from average v Use <hds 97. ado> to implement RLS Haisken-De. New / Stata 2006 Mannheim March 31, 2006 7

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 3. Sample Regression Output (in Handout) v . regress lhw

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 3. Sample Regression Output (in Handout) v . regress lhw age genderm raceb raceo msmar msdiv mssep Source | SS df MS Number of obs = 8417 -------+---------------F( 7, 8409) = 181. 36 Model | 242. 712792 7 34. 673256 Prob > F = 0. 0000 Residual | 1607. 68867 8409. 191186665 R-squared = 0. 1312 -------+---------------Adj R-squared = 0. 1304 Total | 1850. 40146 8416. 219867093 Root MSE =. 43725 ---------------------------------------lhw | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------+--------------------------------age |. 00861. 0004585 18. 78 0. 0077112. 0095088 genderm |. 1737988. 0095849 18. 13 0. 000. 1550101. 1925876 raceb | -. 0730053. 0162526 -4. 49 0. 000 -. 1048645 -. 0411462 raceo | -. 0131488. 0193254 -0. 68 0. 496 -. 0510315. 0247338 msmar |. 1365145. 0125807 10. 85 0. 000. 1118532. 1611758 msdiv |. 1014927. 0180303 5. 63 0. 000. 0661489. 1368365 mssep |. 0237369. 0341694 0. 69 0. 487 -. 0432435. 0907174 _cons | 6. 5783. 016593 396. 45 0. 000 6. 545774 6. 610826 --------------------------------------- v. global hds 97_1 hds 97_2 hds 97_3 genderm genderf raceb raceo racew msmar msdiv mssep mssgl gender race marital . hds 97 Name of reference Haisken-De. New / Stata 2006 Mannheim description March 31, 2006 8

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 3 a. Gender (2 -Way) Haisken-De. New / Stata 2006

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 3 a. Gender (2 -Way) Haisken-De. New / Stata 2006 Mannheim March 31, 2006 9

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 3 b. Race (3 -Way) Haisken-De. New / Stata 2006

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 3 b. Race (3 -Way) Haisken-De. New / Stata 2006 Mannheim March 31, 2006 10

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 3 c. Marital Status (4 -Way) Haisken-De. New / Stata

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 3 c. Marital Status (4 -Way) Haisken-De. New / Stata 2006 Mannheim March 31, 2006 11

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 3 d. State of Residence (51 -Way) Ref=Hi Haisken-De. New

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 3 d. State of Residence (51 -Way) Ref=Hi Haisken-De. New / Stata 2006 Mannheim March 31, 2006 12

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 3 d. State of Residence (51 -Way) Ref=Lo Haisken-De. New

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 3 d. State of Residence (51 -Way) Ref=Lo Haisken-De. New / Stata 2006 Mannheim March 31, 2006 13

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 3 d. State of Residence (51 -Way) Haisken-De. New /

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 3 d. State of Residence (51 -Way) Haisken-De. New / Stata 2006 Mannheim March 31, 2006 14

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 4. Conclusions v RLS: Interpretation of Dummy Variables - Even

Rheinisch-Westfälisches Institut für Wirtschaftsforschung 4. Conclusions v RLS: Interpretation of Dummy Variables - Even with a small dimension, RLS intuitive interpretation - Remove arbitrariness of reference category - Allow for importance weighting of each category v Easily Implemented with <hds 97. ado> - Can be used after regress or xtreg and coefficients calculated - Useful additional statistics calculated v Flexible use - Transform a single set of dummy variables - Transform up to 50 sets of dummy variables at once v Areas of Application - Wage Differentials by: Region, Industry, Occupation, Education, Marital Status, Race, etc… Haisken-De. New / Stata 2006 Mannheim March 31, 2006 15