Hi, How do I test for the joint significance of the dummy variables using Stata commands?
Denis
Denis
. sysuse auto, clear
(1978 automobile data)
. regress price mpg i.rep78
Source | SS df MS Number of obs = 69
-------------+---------------------------------- F(5, 63) = 4.39
Model | 149020603 5 29804120.7 Prob > F = 0.0017
Residual | 427776355 63 6790100.88 R-squared = 0.2584
-------------+---------------------------------- Adj R-squared = 0.1995
Total | 576796959 68 8482308.22 Root MSE = 2605.8
------------------------------------------------------------------------------
price | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
mpg | -280.2615 61.57666 -4.55 0.000 -403.3126 -157.2103
|
rep78 |
2 | 877.6347 2063.285 0.43 0.672 -3245.51 5000.78
3 | 1425.657 1905.438 0.75 0.457 -2382.057 5233.371
4 | 1693.841 1942.669 0.87 0.387 -2188.274 5575.956
5 | 3131.982 2041.049 1.53 0.130 -946.7282 7210.693
|
_cons | 10449.99 2251.041 4.64 0.000 5951.646 14948.34
------------------------------------------------------------------------------
. testparm i.rep78
( 1) 2.rep78 = 0
( 2) 3.rep78 = 0
( 3) 4.rep78 = 0
( 4) 5.rep78 = 0
F( 4, 63) = 1.07
Prob > F = 0.3780
.
. sysuse auto, clear
(1978 automobile data)
. regress price mpg i.rep78
Source | SS df MS Number of obs = 69
-------------+---------------------------------- F(5, 63) = 4.39
Model | 149020603 5 29804120.7 Prob > F = 0.0017
Residual | 427776355 63 6790100.88 R-squared = 0.2584
-------------+---------------------------------- Adj R-squared = 0.1995
Total | 576796959 68 8482308.22 Root MSE = 2605.8
------------------------------------------------------------------------------
price | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
mpg | -280.2615 61.57666 -4.55 0.000 -403.3126 -157.2103
|
rep78 |
2 | 877.6347 2063.285 0.43 0.672 -3245.51 5000.78
3 | 1425.657 1905.438 0.75 0.457 -2382.057 5233.371
4 | 1693.841 1942.669 0.87 0.387 -2188.274 5575.956
5 | 3131.982 2041.049 1.53 0.130 -946.7282 7210.693
|
_cons | 10449.99 2251.041 4.64 0.000 5951.646 14948.34
------------------------------------------------------------------------------
. estimates store full
. regress price mpg if e(sample)
Source | SS df MS Number of obs = 69
-------------+---------------------------------- F(1, 67) = 17.58
Model | 119910002 1 119910002 Prob > F = 0.0001
Residual | 456886957 67 6819208.31 R-squared = 0.2079
-------------+---------------------------------- Adj R-squared = 0.1961
Total | 576796959 68 8482308.22 Root MSE = 2611.4
------------------------------------------------------------------------------
price | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
mpg | -226.3607 53.98091 -4.19 0.000 -334.107 -118.6143
_cons | 10965.23 1191.468 9.20 0.000 8587.05 13343.41
------------------------------------------------------------------------------
. estimates store part
. lrtest full part
Likelihood-ratio test
Assumption: part nested within full
LR chi2(4) = 4.54
Prob > chi2 = 0.3375
.
Comment