|
Reghdfe作者有解释如何计算截距项:http://scorreia.com/software/reghdfe/faq.html
Computing the constant
If you really need to compute the constant (for sanity checks, etc.), you need to save the fixed effects and run a few extra commands:
. reghdfe price weight length, absorb(turn, save)
(dropped 4 singleton observations)
(converged in 1 iterations)
(converged in 2 iterations)
HDFE Linear regression Number of obs = 70
Absorbing 1 HDFE group F( 2, 54) = 22.41
Prob > F = 0.0000
R-squared = 0.5999
Adj R-squared = 0.4888
Within R-sq. = 0.4535
Root MSE = 2101.2277
------------------------------------------------------------------------------
price | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
weight | 5.703116 1.103095 5.17 0.000 3.491544 7.914689
length | -40.11461 40.99301 -0.98 0.332 -122.3006 42.07143
-------------+----------------------------------------------------------------
Absorbed | F(13, 54) = 2.881 0.003 (Joint test)
------------------------------------------------------------------------------
Absorbed degrees of freedom:
---------------------------------------------------------------+
Absorbed FE | Num. Coefs. = Categories - Redundant |
-------------+-------------------------------------------------|
turn | 14 14 0 |
---------------------------------------------------------------+
. predict double d, d
(4 missing values generated)
. summarize d
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
d | 70 -3473.347 2563.418 -6933.888 142.9562
. di r(mean)
-3473.3468
In this case, the constant is “-3473.3468”.
|