Dear All, Suppose that I have the following results,
How can I predict manually? It should be something like
In particular, how can I incorporate type, asset2, and year? Thanks.
Code:
. reg spreadD2 z01-z09 maturity i.type i.asset2 i.year if split==0, noconstant //538 observations
note: z01 omitted because of collinearity.
note: z02 omitted because of collinearity.
note: z03 omitted because of collinearity.
Source | SS df MS Number of obs = 527
-------------+---------------------------------- F(20, 507) = 685.12
Model | 2602.49469 20 130.124735 Prob > F = 0.0000
Residual | 96.2947133 507 .189930401 R-squared = 0.9643
-------------+---------------------------------- Adj R-squared = 0.9629
Total | 2698.78941 527 5.12104252 Root MSE = .43581
------------------------------------------------------------------------------
spreadD2 | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
z01 | 0 (omitted)
z02 | 0 (omitted)
z03 | 0 (omitted)
z04 | 2.783047 .1834411 15.17 0.000 2.422649 3.143446
z05 | 2.743212 .1715835 15.99 0.000 2.40611 3.080315
z06 | 2.174279 .165168 13.16 0.000 1.849781 2.498777
z07 | 1.945444 .166449 11.69 0.000 1.618429 2.272459
z08 | 1.936486 .1587104 12.20 0.000 1.624675 2.248297
z09 | 1.377192 .1341542 10.27 0.000 1.113625 1.640758
maturity | .0814115 .0109706 7.42 0.000 .0598582 .1029649
|
type |
2 | .0595228 .0494886 1.20 0.230 -.0377052 .1567508
3 | .2414885 .08609 2.81 0.005 .0723515 .4106255
|
asset2 |
2 | -.1603417 .0864387 -1.85 0.064 -.3301638 .0094805
3 | -.2118507 .0906293 -2.34 0.020 -.389906 -.0337954
4 | -.0609051 .1355407 -0.45 0.653 -.3271956 .2053854
5 | -.0961297 .1241528 -0.77 0.439 -.3400471 .1477877
6 | -.0862022 .1100055 -0.78 0.434 -.3023249 .1299205
7 | .0640044 .1651877 0.39 0.699 -.2605323 .388541
8 | -.5444096 .1945261 -2.80 0.005 -.9265861 -.1622332
|
year |
2013 | 1.113748 .2585086 4.31 0.000 .6058684 1.621628
2014 | .7873123 .136129 5.78 0.000 .5198659 1.054759
2015 | .5004605 .1337447 3.74 0.000 .2376984 .7632226
2016 | .3021893 .1357553 2.23 0.026 .0354771 .5689016
Code:
gen wanted = _b[z01]*z01+_b[z02]*z02+_b[z03]*z03+_b[z04]*z04+_b[z05]*z05+_b[z06]*z06+_b[z07]*z07+_b[z08]*z08+_b[z09]*z09+...+

Comment