epoh 发表于 2012-12-27 21:13 
答复你的留言
当初我改编的estar,系根据tsDyn_0.7-40
现在已是tsDyn_0.9-2
致尊敬的EPOH:
我在作门限自回归时,回归的结果中,有好几个不显著的变量,如何去掉这个不显著的变量,请你邦邦我:过程如下(数据给不了附件):单变时DLM2,是平稳的,用Keenan.test(dlm2)显示有非线性,滞后图也显示有非线性,最高的滞后阶数为7阶,门限测试结果;
d nominal AIC r p1 p2
[1,] 1 -1347 0.019117410 1 7 -----------最好的
[2,] 2 -1335 0.023202720 0 7
[3,] 3 -1321 0.009770315 1 6
[4,] 4 -1325 0.017065270 1 7
[5,] 5 -1330 0.018587110 0 7
[6,] 6 -1321 0.016998320 1 6
[7,] 7 -1332 0.023921560 3 2
故此:
>mk=tar(dlm2,p1=1,p2=7,d=1,a=.1,b=.9,print=T)
有结果:
time series included in this analysis is: dlm2
SETAR(2, 1 , 7 ) model delay = 1
estimated threshold = 0.01912 from a Minimum AIC fit with thresholds
searched from the 10 percentile to the 90 percentile of all data.
The estimated threshold is the 82.5 percentile of
all data.
lower regime: Residual Standard Error=0.0079
R-Square=0.7616
F-statistic (df=2, 163)=260.3385
p-value=0
Estimate Std.Err t-value Pr(>|t|)
intercept-dlm2 0.0186 0.0012 16.1917 0
lag1-dlm2 -0.4816 0.0930 -5.1800 0
(unbiased) RMS
6.165e-05
with no of data falling in the regime being
dlm2 165
(max. likelihood) RMS for each series (denominator=sample size in the regime)
dlm2 6.09e-05
upper regime:
Residual Standard Error=0.0095
R-Square=0.8029
F-statistic (df=8, 27)=13.7517
p-value=0
Estimate Std.Err t-value Pr(>|t|)
intercept-dlm2 0.0130 0.0073 1.7865 0.0852
lag1-dlm2 0.0391 0.2446 0.1600 0.8741
lag2-dlm2 0.1289 0.1373 0.9387 0.3562
lag3-dlm2 0.4572 0.2224 2.0560 0.0496
lag4-dlm2 0.0482 0.2258 0.2136 0.8324
lag5-dlm2 -0.1568 0.1714 -0.9144 0.3686
lag6-dlm2 -0.0997 0.1423 -0.7005 0.4896
lag7-dlm2 -0.5234 0.1409 -3.7144 0.0009
(unbiased) RMS
9.057e-05
with no of data falling in the regime being 35
(max. likelihood) RMS for each series (denominator=sample size in the regime)
6.987e-05
Nominal AIC is -1347
从结果看,低区还好,但在高区有几个滞后阶的系数不显著,如lag1-dlm2,lag2-dlm2,lag4-dlm2,lag5-dlm2,lag6-dlm2,都不那么显著,为此要分别去掉这些不显著的滞后变量。在命令中如何增加限制性的词语呢?是不是看到回归结果,一次性加MH=c(3,7),再回归呢,还是要一个一个限制呢,或有其它的办法呢。
我采用一次性加MH=C3,7),则报错。谢谢!