Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 19 Dec 2008 06:58:34 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2008/Dec/19/t1229695263ik56ib0iqb89gv3.htm/, Retrieved Wed, 15 May 2024 09:10:53 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=35138, Retrieved Wed, 15 May 2024 09:10:53 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact155
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [(Partial) Autocorrelation Function] [acf Belgie] [2008-12-18 16:23:46] [005293453b571dbccb80b45226e44173]
-   P   [(Partial) Autocorrelation Function] [acf paper d=1 D=0] [2008-12-18 18:54:33] [005293453b571dbccb80b45226e44173]
-   P     [(Partial) Autocorrelation Function] [acf d=1 D=1] [2008-12-18 19:00:40] [005293453b571dbccb80b45226e44173]
- RMP       [ARIMA Backward Selection] [arima backward be...] [2008-12-18 21:15:10] [005293453b571dbccb80b45226e44173]
-   P         [ARIMA Backward Selection] [arima backward be...] [2008-12-18 21:23:00] [005293453b571dbccb80b45226e44173]
- RMPD            [ARIMA Forecasting] [ARIMA forecast we...] [2008-12-19 13:58:34] [80c86a3cb2b11c1c3a9a42d67fc5074f] [Current]
Feedback Forum

Post a new message
Dataseries X:
464196
460170
467037
460070
447988
442867
436087
431328
484015
509673
512927
502831
470984
471067
476049
474605
470439
461251
454724
455626
516847
525192
522975
518585
509239
512238
519164
517009
509933
509127
500857
506971
569323
579714
577992
565464
547344
554788
562325
560854
555332
543599
536662
542722
593530
610763
612613
611324
594167
595454
590865
589379
584428
573100
567456
569028
620735
628884
628232
612117
595404
597141
593408
590072
579799
574205
572775
572942
619567
625809
619916
587625
565742
557274
560576
548854
531673
525919
511038
498662
555362
564591
541657
527070
509846
514258
516922
507561
492622
490243
469357
477580
528379
533590
517945
506174
501866




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 3 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35138&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35138&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35138&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







Univariate ARIMA Extrapolation Forecast
timeY[t]F[t]95% LB95% UBp-value(H0: Y[t] = F[t])P(F[t]>Y[t-1])P(F[t]>Y[t-s])P(F[t]>Y[85])
73565742-------
74557274-------
75560576-------
76548854-------
77531673-------
78525919-------
79511038-------
80498662-------
81555362-------
82564591-------
83541657-------
84527070-------
85509846-------
86514258506907.9714493475.8613520340.08150.14170.334100.3341
87516922508425.5814488078.9383528772.22450.20650.287100.4456
88507561501993.836477004.3309526983.34110.33120.12081e-040.269
89492622490491.8431461431.9672519551.7190.44290.12480.00270.0959
90490243483586.587451021.7128516151.46110.34430.29330.00540.057
91469357474891.6303439140.5761510642.68460.38080.20.02380.0277
92477580470871.4203432204.8416509537.99890.36690.53060.07950.0241
93528379524252.8167482872.1062565633.52720.42250.98650.07030.7525
94533590533796.6538489870.5688577722.73890.49630.59550.08470.8574
95517945523009.989476677.6428569342.33520.41520.32720.21510.7112
96506174505688.2014457068.6682554307.73460.49220.31060.19440.4334
97501866487221.426436417.6957538025.15640.2860.23230.19140.1914

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast \tabularnewline
time & Y[t] & F[t] & 95% LB & 95% UB & p-value(H0: Y[t] = F[t]) & P(F[t]>Y[t-1]) & P(F[t]>Y[t-s]) & P(F[t]>Y[85]) \tabularnewline
73 & 565742 & - & - & - & - & - & - & - \tabularnewline
74 & 557274 & - & - & - & - & - & - & - \tabularnewline
75 & 560576 & - & - & - & - & - & - & - \tabularnewline
76 & 548854 & - & - & - & - & - & - & - \tabularnewline
77 & 531673 & - & - & - & - & - & - & - \tabularnewline
78 & 525919 & - & - & - & - & - & - & - \tabularnewline
79 & 511038 & - & - & - & - & - & - & - \tabularnewline
80 & 498662 & - & - & - & - & - & - & - \tabularnewline
81 & 555362 & - & - & - & - & - & - & - \tabularnewline
82 & 564591 & - & - & - & - & - & - & - \tabularnewline
83 & 541657 & - & - & - & - & - & - & - \tabularnewline
84 & 527070 & - & - & - & - & - & - & - \tabularnewline
85 & 509846 & - & - & - & - & - & - & - \tabularnewline
86 & 514258 & 506907.9714 & 493475.8613 & 520340.0815 & 0.1417 & 0.3341 & 0 & 0.3341 \tabularnewline
87 & 516922 & 508425.5814 & 488078.9383 & 528772.2245 & 0.2065 & 0.2871 & 0 & 0.4456 \tabularnewline
88 & 507561 & 501993.836 & 477004.3309 & 526983.3411 & 0.3312 & 0.1208 & 1e-04 & 0.269 \tabularnewline
89 & 492622 & 490491.8431 & 461431.9672 & 519551.719 & 0.4429 & 0.1248 & 0.0027 & 0.0959 \tabularnewline
90 & 490243 & 483586.587 & 451021.7128 & 516151.4611 & 0.3443 & 0.2933 & 0.0054 & 0.057 \tabularnewline
91 & 469357 & 474891.6303 & 439140.5761 & 510642.6846 & 0.3808 & 0.2 & 0.0238 & 0.0277 \tabularnewline
92 & 477580 & 470871.4203 & 432204.8416 & 509537.9989 & 0.3669 & 0.5306 & 0.0795 & 0.0241 \tabularnewline
93 & 528379 & 524252.8167 & 482872.1062 & 565633.5272 & 0.4225 & 0.9865 & 0.0703 & 0.7525 \tabularnewline
94 & 533590 & 533796.6538 & 489870.5688 & 577722.7389 & 0.4963 & 0.5955 & 0.0847 & 0.8574 \tabularnewline
95 & 517945 & 523009.989 & 476677.6428 & 569342.3352 & 0.4152 & 0.3272 & 0.2151 & 0.7112 \tabularnewline
96 & 506174 & 505688.2014 & 457068.6682 & 554307.7346 & 0.4922 & 0.3106 & 0.1944 & 0.4334 \tabularnewline
97 & 501866 & 487221.426 & 436417.6957 & 538025.1564 & 0.286 & 0.2323 & 0.1914 & 0.1914 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35138&T=1

[TABLE]
[ROW][C]Univariate ARIMA Extrapolation Forecast[/C][/ROW]
[ROW][C]time[/C][C]Y[t][/C][C]F[t][/C][C]95% LB[/C][C]95% UB[/C][C]p-value(H0: Y[t] = F[t])[/C][C]P(F[t]>Y[t-1])[/C][C]P(F[t]>Y[t-s])[/C][C]P(F[t]>Y[85])[/C][/ROW]
[ROW][C]73[/C][C]565742[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]557274[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]560576[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]548854[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]531673[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]525919[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]511038[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]498662[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]555362[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]564591[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]541657[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]527070[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]509846[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]514258[/C][C]506907.9714[/C][C]493475.8613[/C][C]520340.0815[/C][C]0.1417[/C][C]0.3341[/C][C]0[/C][C]0.3341[/C][/ROW]
[ROW][C]87[/C][C]516922[/C][C]508425.5814[/C][C]488078.9383[/C][C]528772.2245[/C][C]0.2065[/C][C]0.2871[/C][C]0[/C][C]0.4456[/C][/ROW]
[ROW][C]88[/C][C]507561[/C][C]501993.836[/C][C]477004.3309[/C][C]526983.3411[/C][C]0.3312[/C][C]0.1208[/C][C]1e-04[/C][C]0.269[/C][/ROW]
[ROW][C]89[/C][C]492622[/C][C]490491.8431[/C][C]461431.9672[/C][C]519551.719[/C][C]0.4429[/C][C]0.1248[/C][C]0.0027[/C][C]0.0959[/C][/ROW]
[ROW][C]90[/C][C]490243[/C][C]483586.587[/C][C]451021.7128[/C][C]516151.4611[/C][C]0.3443[/C][C]0.2933[/C][C]0.0054[/C][C]0.057[/C][/ROW]
[ROW][C]91[/C][C]469357[/C][C]474891.6303[/C][C]439140.5761[/C][C]510642.6846[/C][C]0.3808[/C][C]0.2[/C][C]0.0238[/C][C]0.0277[/C][/ROW]
[ROW][C]92[/C][C]477580[/C][C]470871.4203[/C][C]432204.8416[/C][C]509537.9989[/C][C]0.3669[/C][C]0.5306[/C][C]0.0795[/C][C]0.0241[/C][/ROW]
[ROW][C]93[/C][C]528379[/C][C]524252.8167[/C][C]482872.1062[/C][C]565633.5272[/C][C]0.4225[/C][C]0.9865[/C][C]0.0703[/C][C]0.7525[/C][/ROW]
[ROW][C]94[/C][C]533590[/C][C]533796.6538[/C][C]489870.5688[/C][C]577722.7389[/C][C]0.4963[/C][C]0.5955[/C][C]0.0847[/C][C]0.8574[/C][/ROW]
[ROW][C]95[/C][C]517945[/C][C]523009.989[/C][C]476677.6428[/C][C]569342.3352[/C][C]0.4152[/C][C]0.3272[/C][C]0.2151[/C][C]0.7112[/C][/ROW]
[ROW][C]96[/C][C]506174[/C][C]505688.2014[/C][C]457068.6682[/C][C]554307.7346[/C][C]0.4922[/C][C]0.3106[/C][C]0.1944[/C][C]0.4334[/C][/ROW]
[ROW][C]97[/C][C]501866[/C][C]487221.426[/C][C]436417.6957[/C][C]538025.1564[/C][C]0.286[/C][C]0.2323[/C][C]0.1914[/C][C]0.1914[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35138&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35138&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Univariate ARIMA Extrapolation Forecast
timeY[t]F[t]95% LB95% UBp-value(H0: Y[t] = F[t])P(F[t]>Y[t-1])P(F[t]>Y[t-s])P(F[t]>Y[85])
73565742-------
74557274-------
75560576-------
76548854-------
77531673-------
78525919-------
79511038-------
80498662-------
81555362-------
82564591-------
83541657-------
84527070-------
85509846-------
86514258506907.9714493475.8613520340.08150.14170.334100.3341
87516922508425.5814488078.9383528772.22450.20650.287100.4456
88507561501993.836477004.3309526983.34110.33120.12081e-040.269
89492622490491.8431461431.9672519551.7190.44290.12480.00270.0959
90490243483586.587451021.7128516151.46110.34430.29330.00540.057
91469357474891.6303439140.5761510642.68460.38080.20.02380.0277
92477580470871.4203432204.8416509537.99890.36690.53060.07950.0241
93528379524252.8167482872.1062565633.52720.42250.98650.07030.7525
94533590533796.6538489870.5688577722.73890.49630.59550.08470.8574
95517945523009.989476677.6428569342.33520.41520.32720.21510.7112
96506174505688.2014457068.6682554307.73460.49220.31060.19440.4334
97501866487221.426436417.6957538025.15640.2860.23230.19140.1914







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
860.01350.01450.001254022920.46594501910.03882121.7705
870.02040.01670.001472189128.79796015760.73322452.7048
880.02540.01119e-0430993314.99932582776.24991607.1018
890.03020.00434e-044537568.4733378130.7061614.9233
900.03440.01380.001144307834.35283692319.52941921.5409
910.0384-0.01170.00130632132.85732552677.73811597.7102
920.04190.01420.001245005042.04683750420.17061936.6002
930.04030.00797e-0417025388.89231418782.40771191.1265
940.042-4e-04042705.80343558.81759.6558
950.0452-0.00978e-0425654113.50222137842.79181462.1364
960.04910.0011e-04236000.289719666.6908140.238
970.05320.03010.0025214463546.36717871962.19734227.5244

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
86 & 0.0135 & 0.0145 & 0.0012 & 54022920.4659 & 4501910.0388 & 2121.7705 \tabularnewline
87 & 0.0204 & 0.0167 & 0.0014 & 72189128.7979 & 6015760.7332 & 2452.7048 \tabularnewline
88 & 0.0254 & 0.0111 & 9e-04 & 30993314.9993 & 2582776.2499 & 1607.1018 \tabularnewline
89 & 0.0302 & 0.0043 & 4e-04 & 4537568.4733 & 378130.7061 & 614.9233 \tabularnewline
90 & 0.0344 & 0.0138 & 0.0011 & 44307834.3528 & 3692319.5294 & 1921.5409 \tabularnewline
91 & 0.0384 & -0.0117 & 0.001 & 30632132.8573 & 2552677.7381 & 1597.7102 \tabularnewline
92 & 0.0419 & 0.0142 & 0.0012 & 45005042.0468 & 3750420.1706 & 1936.6002 \tabularnewline
93 & 0.0403 & 0.0079 & 7e-04 & 17025388.8923 & 1418782.4077 & 1191.1265 \tabularnewline
94 & 0.042 & -4e-04 & 0 & 42705.8034 & 3558.817 & 59.6558 \tabularnewline
95 & 0.0452 & -0.0097 & 8e-04 & 25654113.5022 & 2137842.7918 & 1462.1364 \tabularnewline
96 & 0.0491 & 0.001 & 1e-04 & 236000.2897 & 19666.6908 & 140.238 \tabularnewline
97 & 0.0532 & 0.0301 & 0.0025 & 214463546.367 & 17871962.1973 & 4227.5244 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35138&T=2

[TABLE]
[ROW][C]Univariate ARIMA Extrapolation Forecast Performance[/C][/ROW]
[ROW][C]time[/C][C]% S.E.[/C][C]PE[/C][C]MAPE[/C][C]Sq.E[/C][C]MSE[/C][C]RMSE[/C][/ROW]
[ROW][C]86[/C][C]0.0135[/C][C]0.0145[/C][C]0.0012[/C][C]54022920.4659[/C][C]4501910.0388[/C][C]2121.7705[/C][/ROW]
[ROW][C]87[/C][C]0.0204[/C][C]0.0167[/C][C]0.0014[/C][C]72189128.7979[/C][C]6015760.7332[/C][C]2452.7048[/C][/ROW]
[ROW][C]88[/C][C]0.0254[/C][C]0.0111[/C][C]9e-04[/C][C]30993314.9993[/C][C]2582776.2499[/C][C]1607.1018[/C][/ROW]
[ROW][C]89[/C][C]0.0302[/C][C]0.0043[/C][C]4e-04[/C][C]4537568.4733[/C][C]378130.7061[/C][C]614.9233[/C][/ROW]
[ROW][C]90[/C][C]0.0344[/C][C]0.0138[/C][C]0.0011[/C][C]44307834.3528[/C][C]3692319.5294[/C][C]1921.5409[/C][/ROW]
[ROW][C]91[/C][C]0.0384[/C][C]-0.0117[/C][C]0.001[/C][C]30632132.8573[/C][C]2552677.7381[/C][C]1597.7102[/C][/ROW]
[ROW][C]92[/C][C]0.0419[/C][C]0.0142[/C][C]0.0012[/C][C]45005042.0468[/C][C]3750420.1706[/C][C]1936.6002[/C][/ROW]
[ROW][C]93[/C][C]0.0403[/C][C]0.0079[/C][C]7e-04[/C][C]17025388.8923[/C][C]1418782.4077[/C][C]1191.1265[/C][/ROW]
[ROW][C]94[/C][C]0.042[/C][C]-4e-04[/C][C]0[/C][C]42705.8034[/C][C]3558.817[/C][C]59.6558[/C][/ROW]
[ROW][C]95[/C][C]0.0452[/C][C]-0.0097[/C][C]8e-04[/C][C]25654113.5022[/C][C]2137842.7918[/C][C]1462.1364[/C][/ROW]
[ROW][C]96[/C][C]0.0491[/C][C]0.001[/C][C]1e-04[/C][C]236000.2897[/C][C]19666.6908[/C][C]140.238[/C][/ROW]
[ROW][C]97[/C][C]0.0532[/C][C]0.0301[/C][C]0.0025[/C][C]214463546.367[/C][C]17871962.1973[/C][C]4227.5244[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35138&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35138&T=2

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
860.01350.01450.001254022920.46594501910.03882121.7705
870.02040.01670.001472189128.79796015760.73322452.7048
880.02540.01119e-0430993314.99932582776.24991607.1018
890.03020.00434e-044537568.4733378130.7061614.9233
900.03440.01380.001144307834.35283692319.52941921.5409
910.0384-0.01170.00130632132.85732552677.73811597.7102
920.04190.01420.001245005042.04683750420.17061936.6002
930.04030.00797e-0417025388.89231418782.40771191.1265
940.042-4e-04042705.80343558.81759.6558
950.0452-0.00978e-0425654113.50222137842.79181462.1364
960.04910.0011e-04236000.289719666.6908140.238
970.05320.03010.0025214463546.36717871962.19734227.5244



Parameters (Session):
par1 = FALSE ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 1 ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 1 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
R code (references can be found in the software module):
par1 <- as.numeric(par1) #cut off periods
par2 <- as.numeric(par2) #lambda
par3 <- as.numeric(par3) #degree of non-seasonal differencing
par4 <- as.numeric(par4) #degree of seasonal differencing
par5 <- as.numeric(par5) #seasonal period
par6 <- as.numeric(par6) #p
par7 <- as.numeric(par7) #q
par8 <- as.numeric(par8) #P
par9 <- as.numeric(par9) #Q
if (par10 == 'TRUE') par10 <- TRUE
if (par10 == 'FALSE') par10 <- FALSE
if (par2 == 0) x <- log(x)
if (par2 != 0) x <- x^par2
lx <- length(x)
first <- lx - 2*par1
nx <- lx - par1
nx1 <- nx + 1
fx <- lx - nx
if (fx < 1) {
fx <- par5
nx1 <- lx + fx - 1
first <- lx - 2*fx
}
first <- 1
if (fx < 3) fx <- round(lx/10,0)
(arima.out <- arima(x[1:nx], order=c(par6,par3,par7), seasonal=list(order=c(par8,par4,par9), period=par5), include.mean=par10, method='ML'))
(forecast <- predict(arima.out,fx))
(lb <- forecast$pred - 1.96 * forecast$se)
(ub <- forecast$pred + 1.96 * forecast$se)
if (par2 == 0) {
x <- exp(x)
forecast$pred <- exp(forecast$pred)
lb <- exp(lb)
ub <- exp(ub)
}
if (par2 != 0) {
x <- x^(1/par2)
forecast$pred <- forecast$pred^(1/par2)
lb <- lb^(1/par2)
ub <- ub^(1/par2)
}
if (par2 < 0) {
olb <- lb
lb <- ub
ub <- olb
}
(actandfor <- c(x[1:nx], forecast$pred))
(perc.se <- (ub-forecast$pred)/1.96/forecast$pred)
bitmap(file='test1.png')
opar <- par(mar=c(4,4,2,2),las=1)
ylim <- c( min(x[first:nx],lb), max(x[first:nx],ub))
plot(x,ylim=ylim,type='n',xlim=c(first,lx))
usr <- par('usr')
rect(usr[1],usr[3],nx+1,usr[4],border=NA,col='lemonchiffon')
rect(nx1,usr[3],usr[2],usr[4],border=NA,col='lavender')
abline(h= (-3:3)*2 , col ='gray', lty =3)
polygon( c(nx1:lx,lx:nx1), c(lb,rev(ub)), col = 'orange', lty=2,border=NA)
lines(nx1:lx, lb , lty=2)
lines(nx1:lx, ub , lty=2)
lines(x, lwd=2)
lines(nx1:lx, forecast$pred , lwd=2 , col ='white')
box()
par(opar)
dev.off()
prob.dec <- array(NA, dim=fx)
prob.sdec <- array(NA, dim=fx)
prob.ldec <- array(NA, dim=fx)
prob.pval <- array(NA, dim=fx)
perf.pe <- array(0, dim=fx)
perf.mape <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.rmse <- array(0, dim=fx)
for (i in 1:fx) {
locSD <- (ub[i] - forecast$pred[i]) / 1.96
perf.pe[i] = (x[nx+i] - forecast$pred[i]) / forecast$pred[i]
perf.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
prob.dec[i] = pnorm((x[nx+i-1] - forecast$pred[i]) / locSD)
prob.sdec[i] = pnorm((x[nx+i-par5] - forecast$pred[i]) / locSD)
prob.ldec[i] = pnorm((x[nx] - forecast$pred[i]) / locSD)
prob.pval[i] = pnorm(abs(x[nx+i] - forecast$pred[i]) / locSD)
}
perf.mape = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
bitmap(file='test2.png')
plot(forecast$pred, pch=19, type='b',main='ARIMA Extrapolation Forecast', ylab='Forecast and 95% CI', xlab='time',ylim=c(min(lb),max(ub)))
dum <- forecast$pred
dum[1:12] <- x[(nx+1):lx]
lines(dum, lty=1)
lines(ub,lty=3)
lines(lb,lty=3)
dev.off()
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Univariate ARIMA Extrapolation Forecast',9,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'time',1,header=TRUE)
a<-table.element(a,'Y[t]',1,header=TRUE)
a<-table.element(a,'F[t]',1,header=TRUE)
a<-table.element(a,'95% LB',1,header=TRUE)
a<-table.element(a,'95% UB',1,header=TRUE)
a<-table.element(a,'p-value
(H0: Y[t] = F[t])',1,header=TRUE)
a<-table.element(a,'P(F[t]>Y[t-1])',1,header=TRUE)
a<-table.element(a,'P(F[t]>Y[t-s])',1,header=TRUE)
mylab <- paste('P(F[t]>Y[',nx,sep='')
mylab <- paste(mylab,'])',sep='')
a<-table.element(a,mylab,1,header=TRUE)
a<-table.row.end(a)
for (i in (nx-par5):nx) {
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
a<-table.element(a,x[i])
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.element(a,'-')
a<-table.row.end(a)
}
for (i in 1:fx) {
a<-table.row.start(a)
a<-table.element(a,nx+i,header=TRUE)
a<-table.element(a,round(x[nx+i],4))
a<-table.element(a,round(forecast$pred[i],4))
a<-table.element(a,round(lb[i],4))
a<-table.element(a,round(ub[i],4))
a<-table.element(a,round((1-prob.pval[i]),4))
a<-table.element(a,round((1-prob.dec[i]),4))
a<-table.element(a,round((1-prob.sdec[i]),4))
a<-table.element(a,round((1-prob.ldec[i]),4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Univariate ARIMA Extrapolation Forecast Performance',7,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'time',1,header=TRUE)
a<-table.element(a,'% S.E.',1,header=TRUE)
a<-table.element(a,'PE',1,header=TRUE)
a<-table.element(a,'MAPE',1,header=TRUE)
a<-table.element(a,'Sq.E',1,header=TRUE)
a<-table.element(a,'MSE',1,header=TRUE)
a<-table.element(a,'RMSE',1,header=TRUE)
a<-table.row.end(a)
for (i in 1:fx) {
a<-table.row.start(a)
a<-table.element(a,nx+i,header=TRUE)
a<-table.element(a,round(perc.se[i],4))
a<-table.element(a,round(perf.pe[i],4))
a<-table.element(a,round(perf.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[i],4))
a<-table.element(a,round(perf.rmse[i],4))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')