I am using Stata 12.
I am doing a regression and have been using Dummy variables in order to use eststo: prefix.
Simply out of idle curiosity I did the regression instead using the i. prefx for the variable used to generate the Dummy (because I think the output looks nicer.
But it generates different levels of significance for the cateogries that if I used the Dummy variables.
When using
reg logmBeginToProv i.FCReg Period if DayShift ==1 & Outlier==0
Output
Where as
. reg logmBeginToProv FCReg_Dummy* Period if DayShift ==1 & Outlier==0
Yields
With different p values for the same categories (I have cross checked)
The R2 etc is the same and other independent variable values are not affected.
Is this normal behavior? I thought these different approaches would yield the same result? Is it to do with the ommited variable in each?
It doesn't really matter as I am just controlling for these to isolate another variable effect. But I thought it was curious.
Thanks,
Peregrine
I am doing a regression and have been using Dummy variables in order to use eststo: prefix.
Simply out of idle curiosity I did the regression instead using the i. prefx for the variable used to generate the Dummy (because I think the output looks nicer.
But it generates different levels of significance for the cateogries that if I used the Dummy variables.
When using
reg logmBeginToProv i.FCReg Period if DayShift ==1 & Outlier==0
Output
logmBeginT~v | Coef. | Std. Err. | t | P>t | [95% Conf. | Interval] |
FCReg | ||||||
3 | 0.239057 | 0.065421 | 3.65 | 0 | 0.110774 | 0.36734 |
4 | 0.222279 | 0.063113 | 3.52 | 0 | 0.098521 | 0.346037 |
5 | 0.067246 | 0.060392 | 1.11 | 0.266 | -0.05118 | 0.185668 |
6 | -0.15131 | 0.079708 | -1.9 | 0.058 | -0.30761 | 0.004992 |
7 | 0.444792 | 0.07781 | 5.72 | 0 | 0.292215 | 0.597369 |
8 | 0.769023 | 0.061541 | 12.5 | 0 | 0.648348 | 0.889698 |
15 | 0.84092 | 0.051907 | 16.2 | 0 | 0.739137 | 0.942703 |
17 | 0.134585 | 0.122669 | 1.1 | 0.273 | -0.10596 | 0.375126 |
19 | 0.00783 | 0.055735 | 0.14 | 0.888 | -0.10146 | 0.117121 |
21 | 0.395971 | 0.083419 | 4.75 | 0 | 0.232395 | 0.559547 |
25 | -0.11284 | 0.061729 | -1.83 | 0.068 | -0.23388 | 0.008207 |
27 | 0.283143 | 0.054459 | 5.2 | 0 | 0.176354 | 0.389931 |
28 | 0.298593 | 0.06775 | 4.41 | 0 | 0.165742 | 0.431443 |
29 | 0.511729 | 0.055338 | 9.25 | 0 | 0.403217 | 0.62024 |
30 | 0.575785 | 0.065874 | 8.74 | 0 | 0.446613 | 0.704958 |
Period | -0.32571 | 0.027863 | -11.69 | 0 | -0.38034 | -0.27107 |
_cons | 4.563697 | 0.035962 | 126.91 | 0 | 4.49318 | 4.634214 |
Where as
. reg logmBeginToProv FCReg_Dummy* Period if DayShift ==1 & Outlier==0
Yields
logmBeginTo~v | Coef. | Std. Err. | t | P>t | [95% Conf. | Interval] |
FCReg_Dummy1 | -0.39597 | 0.083419 | -4.75 | 0 | -0.55955 | -0.2324 |
FCReg_Dummy2 | -0.15691 | 0.088609 | -1.77 | 0.077 | -0.33067 | 0.01684 |
FCReg_Dummy3 | -0.17369 | 0.088775 | -1.96 | 0.051 | -0.34777 | 0.000387 |
FCReg_Dummy4 | -0.32872 | 0.089405 | -3.68 | 0 | -0.50404 | -0.15341 |
FCReg_Dummy5 | -0.54728 | 0.101946 | -5.37 | 0 | -0.74718 | -0.34737 |
FCReg_Dummy6 | 0.048821 | 0.103077 | 0.47 | 0.636 | -0.1533 | 0.250943 |
FCReg_Dummy7 | 0.373052 | 0.087218 | 4.28 | 0 | 0.202026 | 0.544077 |
FCReg_Dummy8 | 0.444949 | 0.080113 | 5.55 | 0 | 0.287856 | 0.602041 |
FCReg_Dummy9 | -0.26139 | 0.140065 | -1.87 | 0.062 | -0.53604 | 0.013266 |
FCReg_Dummy10 | -0.38814 | 0.08357 | -4.64 | 0 | -0.55201 | -0.22427 |
FCReg_Dummy11 | 0 | (omitted) | ||||
FCReg_Dummy12 | -0.50881 | 0.089372 | -5.69 | 0 | -0.68406 | -0.33356 |
FCReg_Dummy13 | -0.11283 | 0.081903 | -1.38 | 0.168 | -0.27343 | 0.047774 |
FCReg_Dummy14 | -0.09738 | 0.091479 | -1.06 | 0.287 | -0.27676 | 0.082002 |
FCReg_Dummy15 | 0.115758 | 0.08035 | 1.44 | 0.15 | -0.0418 | 0.273314 |
FCReg_Dummy16 | 0.179814 | 0.091002 | 1.98 | 0.048 | 0.00137 | 0.358259 |
Period | -0.32571 | 0.027863 | -11.69 | 0 | -0.38034 | -0.27107 |
_cons | 4.959668 | 0.076574 | 64.77 | 0 | 4.809514 | 5.109822 |
With different p values for the same categories (I have cross checked)
The R2 etc is the same and other independent variable values are not affected.
Is this normal behavior? I thought these different approaches would yield the same result? Is it to do with the ommited variable in each?
It doesn't really matter as I am just controlling for these to isolate another variable effect. But I thought it was curious.
Thanks,
Peregrine
Comment