一个tsDyn中例子的问题:
>library(tsDyn)
> data=lynx
>selectSETAR(log(lynx), m=2)Using maximum autoregressive order for low regime: mL = 1
Using maximum autoregressive order for high regime: mH = 1
Searching on 75 possible threshold values within regimes with sufficient ( 15% ) number of observations
Searching on 75 combinations of thresholds ( 75 ), thDelay ( 1 ), mL ( 1 ) and MM ( 1 )
Results of the grid search for 1 threshold
thDelay mL mH th pooled-AIC
1 0 1 1 5.958425 264.2794
2 0 1 1 5.888878 264.7164
3 0 1 1 5.945421 265.3844
4 0 1 1 5.886104 265.4243
5 0 1 1 5.932245 266.3016
6 0 1 1 5.880533 266.3493
7 0 1 1 5.843544 266.9911
8 0 1 1 5.771441 267.8561
9 0 1 1 5.631212 267.9999
10 0 1 1 5.700444 268.6810
#这是一个不断试的过程。(TSDYN)包中择选的结果是(setar(llynx, m=2, thDelay=1, th=3.4))。而我择选的结果是(用最小AIC法): selectSETAR(log(lynx), m=3,thDelay=2)得到;>lytar=setar(log(lynx), m=3, thDelay=2, th=6.863)> print(lytar)Non linear autoregressive modelSETAR model ( 2 regimes)
Coefficients:
Low regime:
phiL.1 phiL.2 phiL.3 const L
0.99020281 0.02619117 -0.23172966 1.79347690 High regime:
phiH.1 phiH.2 phiH.3 const H
1.5267618 -1.1932628 0.3895756 1.6785271 Threshold:
-Variable: Z(t) = + (0) X(t)+ (0)X(t-1)+ (1)X(t-2)
-Value: 6.863 (fixed)
Proportion of points in low regime: 54.05% High regime: 45.95%
+++++++++++++++++++++++> summary(lytar)Non linear autoregressive modelSETAR model ( 2 regimes)
Coefficients:
Low regime:
phiL.1 phiL.2 phiL.3 const L
0.99020281 0.02619117 -0.23172966 1.79347690 High regime:
phiH.1 phiH.2 phiH.3 const H
1.5267618 -1.1932628 0.3895756 1.6785271 Threshold:
-Variable: Z(t) = + (0) X(t)+ (0)X(t-1)+ (1)X(t-2)
-Value: 6.863 (fixed)
Proportion of points in low regime: 54.05% High regime: 45.95% Residuals:
Min 1Q Median 3Q Max
-1.3290073 -0.2622449 -0.0069755 0.2837141 1.1024128 Fit:
residuals variance = 0.1975, AIC = -169, MAPE = 5.608%Coefficient(s): Estimate Std. Error t value Pr(>|t|)
const L 1.793477 0.452055 3.9674 0.0001324 ***
phiL.1 0.990203 0.139885 7.0787 1.647e-10 ***
phiL.2 0.026191 0.191641 0.1367 0.8915524
phiL.3 -0.231730 0.108400 -2.1377 0.0348366 *
const H 1.678527 1.231040 1.3635 0.1756129
phiH.1 1.526762 0.125964 12.1206 < 2.2e-16 ***
phiH.2 -1.193263 0.204422 -5.8373 5.859e-08 ***
phiH.3 0.389576 0.202187 1.9268 0.0566805 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1Threshold
Variable: Z(t) = + (0) X(t) + (0) X(t-1)+ (1) X(t-2)Value: 6.863 (fixed)+++++++++++有不显著项,要册除。
如何去除不显著项。请高手给予邦助,紧急求助!谢谢!
也却在这个命令中如何改动它: lytar=setar(log(lynx), m=3, thDelay=2, th=6.863)


雷达卡



京公网安备 11010802022788号







