I am currently estimating a regression equation where the explanatory variables are only dummy variables. It is a cross-sectional data set which contains price data for several items per country. I want to regress item-country prices Pij on country and item dummies. Thus, the regression equation looks as follows: Pij= AiQi+BjCj+Eij, where Q is the item dummy, C is the country dummy, and Eij the error term.
I am familiar with Stata dropping one categorical dummy per variable to overcome the perfect multi collinearity problem, but if I understand the econometrics correctly, if I drop the intercept term, then it is possible to include a dummy for each category right? In my case it would be country and items if I understand correctly? The reason that I ask this is because I would like to obtain a value for the coefficient for each country dummy (I am not interested in the coefficient of the item dummies), so I would like to deal with the problem of Stata omitting one dummy coefficient. If anyone has an idea how I could do this, I would greatly appreciate it. I have tried the following code:
Code:
reg logp i.itemcode i.country , nocons
Code:
tabulate iso3code, gen(cc) tabulate itemcode, gen(ic)
Code:
reg logp cc* ic*, nocons
Code:
------------------------------------------------------------------------------ logp | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- country | AUS | 1.743436 .1003003 17.38 0.000 1.546779 1.940092 AUT | 1.409392 .1053655 13.38 0.000 1.202804 1.615979 BEL | 1.305924 .1185969 11.01 0.000 1.073393 1.538454 BGR | 1.269148 .0997988 12.72 0.000 1.073475 1.464821 BRA | 1.484607 .1019623 14.56 0.000 1.284692 1.684522 CAN | 1.362466 .1092622 12.47 0.000 1.148238 1.576694 CHL | 7.195977 .1084014 66.38 0.000 6.983437 7.408517
Code:
------------------------------------------------------------------------------ logp | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- cc1 | 7.412792 .587841 12.61 0.000 6.260226 8.565359 cc2 | 7.589908 .5877965 12.91 0.000 6.437428 8.742387 cc3 | 7.221128 .5882736 12.28 0.000 6.067713 8.374543 cc4 | 7.096145 .5897634 12.03 0.000 5.939809 8.252481 cc5 | 7.10125 .5877189 12.08 0.000 5.948923 8.253578 cc6 | 7.34436 .5880183 12.49 0.000 6.191446 8.497275 cc7 | 7.177504 .5887245 12.19 0.000 6.023205 8.331803 cc8 | 13.02219 .5886107 22.12 0.000 11.86812 14.17627
Best,
Satya
0 Response to OLS regression with dummy variables versus factor variables
Post a Comment