----------------------------------------------------------------------------------------------------- . * CCAPMmudeli jaoks vajalike tunnuste loomine, osa 1. . gen y=ln(1+(price-L.price+L.div)/L.price) (1 missing value generated) . gen cg=ln(cons/L.cons) (1 missing value generated) * CCAPM mudeli hindamine OLS-i abil. Osa 2. . regress y cg Source | SS df MS Number of obs = 65 -------------+---------------------------------- F(1, 63) = 20.01 Model | .392968563 1 .392968563 Prob > F = 0.0000 Residual | 1.23700489 63 .019634998 R-squared = 0.2411 -------------+---------------------------------- Adj R-squared = 0.2290 Total | 1.62997345 64 .025468335 Root MSE = .14012 ------------------------------------------------------------------------------ y | Coefficient Std. err. t P>|t| [95% conf. interval] -------------+---------------------------------------------------------------- cg | 3.644356 .8146242 4.47 0.000 2.016459 5.272253 _cons | -.0191633 .0259828 -0.74 0.464 -.0710858 .0327591 ------------------------------------------------------------------------------ . gen dp=ln(div/price) . * Instrumenttunnuste kasutamine, osa 3. . ivregress 2sls y (cg = L. i L.dp), first First-stage regressions ----------------------- Number of obs = 65 F(2, 62) = 4.66 Prob > F = 0.0131 R-squared = 0.1306 Adj R-squared = 0.1025 Root MSE = 0.0204 ------------------------------------------------------------------------------ cg | Coefficient Std. err. t P>|t| [95% conf. interval] -------------+---------------------------------------------------------------- i | L1. | .2036788 .0668061 3.05 0.003 .0701352 .3372223 | dp | L1. | .0033859 .0061172 0.55 0.582 -.0088423 .0156141 | _cons | .032856 .0202778 1.62 0.110 -.0076787 .0733908 ------------------------------------------------------------------------------ Instrumental variables 2SLS regression Number of obs = 65 Wald chi2(1) = 8.87 Prob > chi2 = 0.0029 R-squared = . Root MSE = .16546 ------------------------------------------------------------------------------ y | Coefficient Std. err. z P>|z| [95% conf. interval] -------------+---------------------------------------------------------------- cg | 7.92602 2.662015 2.98 0.003 2.708566 13.14347 _cons | -.1206773 .0663665 -1.82 0.069 -.2507532 .0093986 ------------------------------------------------------------------------------ Instrumented: cg Instruments: L.i L.dp . * Endogeensuse testimine, osa 4. . estat endog Tests of endogeneity H0: Variables are exogenous Durbin (score) chi2(1) = 4.28033 (p = 0.0386) Wu-Hausman F(1,62) = 4.37059 (p = 0.0407) -----------------------------------------------------------------------------------------------------