我用forvalues编写程序如下:
forvalues i = 1(1)1056 {
bysort year: arch r if id==`i', arch(1) garch(1) nolog
predict h, variance
}
其中id表示企业代码,year表示不同年度。
可以运行,但是已经半天了还是没有结束,正在进行的程序显示如下:
-> year = 2004
Number of gaps in sample: 29 (gap count includes panel changes)
(note: conditioning reset at each gap)
ARCH family regression
Sample: 20040628 - 20041231, but with gaps Number of obs = 129
Distribution: Gaussian Wald chi2(.) = .
Log likelihood = 270.8619 Prob > chi2 = .
------------------------------------------------------------------------------
| OPG
r | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
r |
_cons | -.0045339 .0027907 -1.62 0.104 -.0100035 .0009357
-------------+----------------------------------------------------------------
ARCH |
arch |
L1. | .2879147 .1467449 1.96 0.050 .0003 .5755294
|
garch |
L1. | -.1687872 .2891155 -0.58 0.059 -.7354432 .3978688
|
_cons | .0008414 .0002682 3.14 0.002 .0003157 .001367
------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------
-> year = 2005
Number of gaps in sample: 53 (gap count includes panel changes)
(note: conditioning reset at each gap)
。。。。。
请问我的代码有问题吗?应该怎么编写更好?
谢谢各位对我的帮助!!