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 computationSun, 14 Dec 2008 15:37: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/14/t1229294307nrlxi8k2mujhs6j.htm/, Retrieved Wed, 15 May 2024 15:57:12 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33582, Retrieved Wed, 15 May 2024 15:57:12 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact181
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Central Tendency] [Central tendency:...] [2008-12-12 12:54:43] [73d6180dc45497329efd1b6934a84aba]
- RMP   [ARIMA Backward Selection] [ARIMA goudprijs] [2008-12-14 20:12:57] [73d6180dc45497329efd1b6934a84aba]
- RMP       [ARIMA Forecasting] [ARIMA forecast: P...] [2008-12-14 22:37:34] [e81ac192d6ae6d77191d83851a692999] [Current]
-   P         [ARIMA Forecasting] [Arima forecasting...] [2008-12-19 23:12:59] [6816386b1f3c2f6c0c9f2aa1e5bc9362]
Feedback Forum

Post a new message
Dataseries X:
10070
10137
9984
9732
9103
9155
9308
9394
9948
10177
10002
9728
10002
10063
10018
9960
10236
10893
10756
10940
10997
10827
10166
10186
10457
10368
10244
10511
10812
10738
10171
9721
9897
9828
9924
10371
10846
10413
10709
10662
10570
10297
10635
10872
10296
10383
10431
10574
10653
10805
10872
10625
10407
10463
10556
10646
10702
11353
11346
11451
11964
12574
13031
13812
14544
14931
14886
16005
17064
15168
16050
15839
15137
14954
15648
15305
15579
16348
15928
16171
15937
15713
15594
15683
16438
17032
17696
17745
19394
20148
20108
18584
18441
18391
19178
18079
18483
19644
19195




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33582&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]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33582&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33582&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 time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







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[87])
7515648-------
7615305-------
7715579-------
7816348-------
7915928-------
8016171-------
8115937-------
8215713-------
8315594-------
8415683-------
8516438-------
8617032-------
8717696-------
881774517924.654717083.416618765.89280.33780.702910.7029
891939418094.443416889.784619299.10220.01720.715210.7416
902014818289.302516814.379119764.22590.00680.07110.99510.7848
912010818358.537316520.99420196.08070.0310.02810.99520.7601
921858418407.095616261.140220553.05090.43580.06020.97940.742
931844118464.217816051.855220876.58030.49250.46120.980.7337
941839118485.174615802.676821167.67230.47260.51290.97860.7179
951917818499.071215569.049921429.09240.32490.52880.9740.7044
961807918515.798615358.614121672.98310.39310.34050.96070.6946
971848318522.139215145.817421898.4610.49090.60150.88680.6842
981964418526.119514943.319622108.91930.27040.50940.79310.6751
991919518531.012714753.330522308.6950.36520.28180.66760.6676

\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[87]) \tabularnewline
75 & 15648 & - & - & - & - & - & - & - \tabularnewline
76 & 15305 & - & - & - & - & - & - & - \tabularnewline
77 & 15579 & - & - & - & - & - & - & - \tabularnewline
78 & 16348 & - & - & - & - & - & - & - \tabularnewline
79 & 15928 & - & - & - & - & - & - & - \tabularnewline
80 & 16171 & - & - & - & - & - & - & - \tabularnewline
81 & 15937 & - & - & - & - & - & - & - \tabularnewline
82 & 15713 & - & - & - & - & - & - & - \tabularnewline
83 & 15594 & - & - & - & - & - & - & - \tabularnewline
84 & 15683 & - & - & - & - & - & - & - \tabularnewline
85 & 16438 & - & - & - & - & - & - & - \tabularnewline
86 & 17032 & - & - & - & - & - & - & - \tabularnewline
87 & 17696 & - & - & - & - & - & - & - \tabularnewline
88 & 17745 & 17924.6547 & 17083.4166 & 18765.8928 & 0.3378 & 0.7029 & 1 & 0.7029 \tabularnewline
89 & 19394 & 18094.4434 & 16889.7846 & 19299.1022 & 0.0172 & 0.7152 & 1 & 0.7416 \tabularnewline
90 & 20148 & 18289.3025 & 16814.3791 & 19764.2259 & 0.0068 & 0.0711 & 0.9951 & 0.7848 \tabularnewline
91 & 20108 & 18358.5373 & 16520.994 & 20196.0807 & 0.031 & 0.0281 & 0.9952 & 0.7601 \tabularnewline
92 & 18584 & 18407.0956 & 16261.1402 & 20553.0509 & 0.4358 & 0.0602 & 0.9794 & 0.742 \tabularnewline
93 & 18441 & 18464.2178 & 16051.8552 & 20876.5803 & 0.4925 & 0.4612 & 0.98 & 0.7337 \tabularnewline
94 & 18391 & 18485.1746 & 15802.6768 & 21167.6723 & 0.4726 & 0.5129 & 0.9786 & 0.7179 \tabularnewline
95 & 19178 & 18499.0712 & 15569.0499 & 21429.0924 & 0.3249 & 0.5288 & 0.974 & 0.7044 \tabularnewline
96 & 18079 & 18515.7986 & 15358.6141 & 21672.9831 & 0.3931 & 0.3405 & 0.9607 & 0.6946 \tabularnewline
97 & 18483 & 18522.1392 & 15145.8174 & 21898.461 & 0.4909 & 0.6015 & 0.8868 & 0.6842 \tabularnewline
98 & 19644 & 18526.1195 & 14943.3196 & 22108.9193 & 0.2704 & 0.5094 & 0.7931 & 0.6751 \tabularnewline
99 & 19195 & 18531.0127 & 14753.3305 & 22308.695 & 0.3652 & 0.2818 & 0.6676 & 0.6676 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33582&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[87])[/C][/ROW]
[ROW][C]75[/C][C]15648[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]15305[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]15579[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]16348[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]15928[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]16171[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]15937[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]15713[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]15594[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]15683[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]16438[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]17032[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]17696[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]17745[/C][C]17924.6547[/C][C]17083.4166[/C][C]18765.8928[/C][C]0.3378[/C][C]0.7029[/C][C]1[/C][C]0.7029[/C][/ROW]
[ROW][C]89[/C][C]19394[/C][C]18094.4434[/C][C]16889.7846[/C][C]19299.1022[/C][C]0.0172[/C][C]0.7152[/C][C]1[/C][C]0.7416[/C][/ROW]
[ROW][C]90[/C][C]20148[/C][C]18289.3025[/C][C]16814.3791[/C][C]19764.2259[/C][C]0.0068[/C][C]0.0711[/C][C]0.9951[/C][C]0.7848[/C][/ROW]
[ROW][C]91[/C][C]20108[/C][C]18358.5373[/C][C]16520.994[/C][C]20196.0807[/C][C]0.031[/C][C]0.0281[/C][C]0.9952[/C][C]0.7601[/C][/ROW]
[ROW][C]92[/C][C]18584[/C][C]18407.0956[/C][C]16261.1402[/C][C]20553.0509[/C][C]0.4358[/C][C]0.0602[/C][C]0.9794[/C][C]0.742[/C][/ROW]
[ROW][C]93[/C][C]18441[/C][C]18464.2178[/C][C]16051.8552[/C][C]20876.5803[/C][C]0.4925[/C][C]0.4612[/C][C]0.98[/C][C]0.7337[/C][/ROW]
[ROW][C]94[/C][C]18391[/C][C]18485.1746[/C][C]15802.6768[/C][C]21167.6723[/C][C]0.4726[/C][C]0.5129[/C][C]0.9786[/C][C]0.7179[/C][/ROW]
[ROW][C]95[/C][C]19178[/C][C]18499.0712[/C][C]15569.0499[/C][C]21429.0924[/C][C]0.3249[/C][C]0.5288[/C][C]0.974[/C][C]0.7044[/C][/ROW]
[ROW][C]96[/C][C]18079[/C][C]18515.7986[/C][C]15358.6141[/C][C]21672.9831[/C][C]0.3931[/C][C]0.3405[/C][C]0.9607[/C][C]0.6946[/C][/ROW]
[ROW][C]97[/C][C]18483[/C][C]18522.1392[/C][C]15145.8174[/C][C]21898.461[/C][C]0.4909[/C][C]0.6015[/C][C]0.8868[/C][C]0.6842[/C][/ROW]
[ROW][C]98[/C][C]19644[/C][C]18526.1195[/C][C]14943.3196[/C][C]22108.9193[/C][C]0.2704[/C][C]0.5094[/C][C]0.7931[/C][C]0.6751[/C][/ROW]
[ROW][C]99[/C][C]19195[/C][C]18531.0127[/C][C]14753.3305[/C][C]22308.695[/C][C]0.3652[/C][C]0.2818[/C][C]0.6676[/C][C]0.6676[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33582&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33582&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[87])
7515648-------
7615305-------
7715579-------
7816348-------
7915928-------
8016171-------
8115937-------
8215713-------
8315594-------
8415683-------
8516438-------
8617032-------
8717696-------
881774517924.654717083.416618765.89280.33780.702910.7029
891939418094.443416889.784619299.10220.01720.715210.7416
902014818289.302516814.379119764.22590.00680.07110.99510.7848
912010818358.537316520.99420196.08070.0310.02810.99520.7601
921858418407.095616261.140220553.05090.43580.06020.97940.742
931844118464.217816051.855220876.58030.49250.46120.980.7337
941839118485.174615802.676821167.67230.47260.51290.97860.7179
951917818499.071215569.049921429.09240.32490.52880.9740.7044
961807918515.798615358.614121672.98310.39310.34050.96070.6946
971848318522.139215145.817421898.4610.49090.60150.88680.6842
981964418526.119514943.319622108.91930.27040.50940.79310.6751
991919518531.012714753.330522308.6950.36520.28180.66760.6676







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
880.0239-0.018e-0432275.80822689.650751.8618
890.0340.07180.0061688847.3654140737.2805375.1497
900.04110.10160.00853454756.4287896.3667536.5598
910.05110.09530.00793060619.5933255051.6328505.0264
920.05950.00968e-0431295.17342607.931151.0679
930.0667-0.00131e-04539.064544.9226.7024
940.074-0.00514e-048868.846739.070527.1859
950.08080.03670.0031460944.34538412.0287195.9899
960.087-0.02360.002190793.010815899.4176126.0929
970.093-0.00212e-041531.877127.656411.2985
980.09870.06030.0051249656.9184104138.0765322.7043
990.1040.03580.003440879.071136739.9226191.6766

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
88 & 0.0239 & -0.01 & 8e-04 & 32275.8082 & 2689.6507 & 51.8618 \tabularnewline
89 & 0.034 & 0.0718 & 0.006 & 1688847.3654 & 140737.2805 & 375.1497 \tabularnewline
90 & 0.0411 & 0.1016 & 0.0085 & 3454756.4 & 287896.3667 & 536.5598 \tabularnewline
91 & 0.0511 & 0.0953 & 0.0079 & 3060619.5933 & 255051.6328 & 505.0264 \tabularnewline
92 & 0.0595 & 0.0096 & 8e-04 & 31295.1734 & 2607.9311 & 51.0679 \tabularnewline
93 & 0.0667 & -0.0013 & 1e-04 & 539.0645 & 44.922 & 6.7024 \tabularnewline
94 & 0.074 & -0.0051 & 4e-04 & 8868.846 & 739.0705 & 27.1859 \tabularnewline
95 & 0.0808 & 0.0367 & 0.0031 & 460944.345 & 38412.0287 & 195.9899 \tabularnewline
96 & 0.087 & -0.0236 & 0.002 & 190793.0108 & 15899.4176 & 126.0929 \tabularnewline
97 & 0.093 & -0.0021 & 2e-04 & 1531.877 & 127.6564 & 11.2985 \tabularnewline
98 & 0.0987 & 0.0603 & 0.005 & 1249656.9184 & 104138.0765 & 322.7043 \tabularnewline
99 & 0.104 & 0.0358 & 0.003 & 440879.0711 & 36739.9226 & 191.6766 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33582&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]88[/C][C]0.0239[/C][C]-0.01[/C][C]8e-04[/C][C]32275.8082[/C][C]2689.6507[/C][C]51.8618[/C][/ROW]
[ROW][C]89[/C][C]0.034[/C][C]0.0718[/C][C]0.006[/C][C]1688847.3654[/C][C]140737.2805[/C][C]375.1497[/C][/ROW]
[ROW][C]90[/C][C]0.0411[/C][C]0.1016[/C][C]0.0085[/C][C]3454756.4[/C][C]287896.3667[/C][C]536.5598[/C][/ROW]
[ROW][C]91[/C][C]0.0511[/C][C]0.0953[/C][C]0.0079[/C][C]3060619.5933[/C][C]255051.6328[/C][C]505.0264[/C][/ROW]
[ROW][C]92[/C][C]0.0595[/C][C]0.0096[/C][C]8e-04[/C][C]31295.1734[/C][C]2607.9311[/C][C]51.0679[/C][/ROW]
[ROW][C]93[/C][C]0.0667[/C][C]-0.0013[/C][C]1e-04[/C][C]539.0645[/C][C]44.922[/C][C]6.7024[/C][/ROW]
[ROW][C]94[/C][C]0.074[/C][C]-0.0051[/C][C]4e-04[/C][C]8868.846[/C][C]739.0705[/C][C]27.1859[/C][/ROW]
[ROW][C]95[/C][C]0.0808[/C][C]0.0367[/C][C]0.0031[/C][C]460944.345[/C][C]38412.0287[/C][C]195.9899[/C][/ROW]
[ROW][C]96[/C][C]0.087[/C][C]-0.0236[/C][C]0.002[/C][C]190793.0108[/C][C]15899.4176[/C][C]126.0929[/C][/ROW]
[ROW][C]97[/C][C]0.093[/C][C]-0.0021[/C][C]2e-04[/C][C]1531.877[/C][C]127.6564[/C][C]11.2985[/C][/ROW]
[ROW][C]98[/C][C]0.0987[/C][C]0.0603[/C][C]0.005[/C][C]1249656.9184[/C][C]104138.0765[/C][C]322.7043[/C][/ROW]
[ROW][C]99[/C][C]0.104[/C][C]0.0358[/C][C]0.003[/C][C]440879.0711[/C][C]36739.9226[/C][C]191.6766[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33582&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33582&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
880.0239-0.018e-0432275.80822689.650751.8618
890.0340.07180.0061688847.3654140737.2805375.1497
900.04110.10160.00853454756.4287896.3667536.5598
910.05110.09530.00793060619.5933255051.6328505.0264
920.05950.00968e-0431295.17342607.931151.0679
930.0667-0.00131e-04539.064544.9226.7024
940.074-0.00514e-048868.846739.070527.1859
950.08080.03670.0031460944.34538412.0287195.9899
960.087-0.02360.002190793.010815899.4176126.0929
970.093-0.00212e-041531.877127.656411.2985
980.09870.06030.0051249656.9184104138.0765322.7043
990.1040.03580.003440879.071136739.9226191.6766



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 3 ; par7 = 0 ; par8 = 0 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 3 ; par7 = 0 ; par8 = 0 ; par9 = 0 ; 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')