Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 24 Dec 2008 05:24:08 -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/24/t1230121474sm5te0pbvav7a81.htm/, Retrieved Fri, 17 May 2024 03:42:22 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=36524, Retrieved Fri, 17 May 2024 03:42:22 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact191
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Paper24] [2008-12-23 12:07:10] [8ac58ef7b35dc5a117bc162cf16850e9]
-         [ARIMA Forecasting] [Paper 24] [2008-12-24 12:24:08] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
65,1
72,5
70,6
81,9
72
70,9
71,1
65,1
78,1
92
77,8
63,3
56,2
79,2
69
66,1
77,5
69,3
70,2
70,2
78,2
85,4
82,4
61,2
52,2
85,3
79,9
72,2
85,7
75,5
69,2
77,6
85,3
77
89,9
60
54,3
84
69,9
75,1
81,7
69,9
68,3
77,3
77,4
85,3
91
60,6
57,6
93,8
78,7
80,3
89,8
77,5
71,7
83,2
86,2
100,7
100,8
57,1
62,5
79,7
80,3
92,4
91,8
85,8
84,2
93,1
101,2




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=36524&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=36524&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36524&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[57])
4577.4-------
4685.3-------
4791-------
4860.6-------
4957.6-------
5093.8-------
5178.7-------
5280.3-------
5389.8-------
5477.5-------
5571.7-------
5683.2-------
5786.2-------
58100.788.055477.906698.20420.00730.640.70270.64
59100.895.276885.1242105.42940.14320.14760.79550.9601
6057.165.816355.598776.03380.047300.84150
6162.559.723848.079171.36850.32010.67060.63960
6279.796.772885.12108.42560.00210.69150.9623
6380.381.859270.137893.58060.39720.6410.70130.234
6492.481.876969.746694.00730.04450.60060.60060.2424
6591.891.816679.6774103.95580.49890.46250.62760.8178
6685.879.45267.267191.63680.15360.02350.62320.1389
6784.272.838660.524385.15290.03530.01960.57190.0167
6893.184.548372.226996.86980.08690.52210.58490.3964
69101.287.427475.080999.77380.01440.18390.57720.5772

\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[57]) \tabularnewline
45 & 77.4 & - & - & - & - & - & - & - \tabularnewline
46 & 85.3 & - & - & - & - & - & - & - \tabularnewline
47 & 91 & - & - & - & - & - & - & - \tabularnewline
48 & 60.6 & - & - & - & - & - & - & - \tabularnewline
49 & 57.6 & - & - & - & - & - & - & - \tabularnewline
50 & 93.8 & - & - & - & - & - & - & - \tabularnewline
51 & 78.7 & - & - & - & - & - & - & - \tabularnewline
52 & 80.3 & - & - & - & - & - & - & - \tabularnewline
53 & 89.8 & - & - & - & - & - & - & - \tabularnewline
54 & 77.5 & - & - & - & - & - & - & - \tabularnewline
55 & 71.7 & - & - & - & - & - & - & - \tabularnewline
56 & 83.2 & - & - & - & - & - & - & - \tabularnewline
57 & 86.2 & - & - & - & - & - & - & - \tabularnewline
58 & 100.7 & 88.0554 & 77.9066 & 98.2042 & 0.0073 & 0.64 & 0.7027 & 0.64 \tabularnewline
59 & 100.8 & 95.2768 & 85.1242 & 105.4294 & 0.1432 & 0.1476 & 0.7955 & 0.9601 \tabularnewline
60 & 57.1 & 65.8163 & 55.5987 & 76.0338 & 0.0473 & 0 & 0.8415 & 0 \tabularnewline
61 & 62.5 & 59.7238 & 48.0791 & 71.3685 & 0.3201 & 0.6706 & 0.6396 & 0 \tabularnewline
62 & 79.7 & 96.7728 & 85.12 & 108.4256 & 0.002 & 1 & 0.6915 & 0.9623 \tabularnewline
63 & 80.3 & 81.8592 & 70.1378 & 93.5806 & 0.3972 & 0.641 & 0.7013 & 0.234 \tabularnewline
64 & 92.4 & 81.8769 & 69.7466 & 94.0073 & 0.0445 & 0.6006 & 0.6006 & 0.2424 \tabularnewline
65 & 91.8 & 91.8166 & 79.6774 & 103.9558 & 0.4989 & 0.4625 & 0.6276 & 0.8178 \tabularnewline
66 & 85.8 & 79.452 & 67.2671 & 91.6368 & 0.1536 & 0.0235 & 0.6232 & 0.1389 \tabularnewline
67 & 84.2 & 72.8386 & 60.5243 & 85.1529 & 0.0353 & 0.0196 & 0.5719 & 0.0167 \tabularnewline
68 & 93.1 & 84.5483 & 72.2269 & 96.8698 & 0.0869 & 0.5221 & 0.5849 & 0.3964 \tabularnewline
69 & 101.2 & 87.4274 & 75.0809 & 99.7738 & 0.0144 & 0.1839 & 0.5772 & 0.5772 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36524&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[57])[/C][/ROW]
[ROW][C]45[/C][C]77.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]85.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]91[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]60.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]57.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]93.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]78.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]80.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]89.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]77.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]71.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]83.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]86.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]100.7[/C][C]88.0554[/C][C]77.9066[/C][C]98.2042[/C][C]0.0073[/C][C]0.64[/C][C]0.7027[/C][C]0.64[/C][/ROW]
[ROW][C]59[/C][C]100.8[/C][C]95.2768[/C][C]85.1242[/C][C]105.4294[/C][C]0.1432[/C][C]0.1476[/C][C]0.7955[/C][C]0.9601[/C][/ROW]
[ROW][C]60[/C][C]57.1[/C][C]65.8163[/C][C]55.5987[/C][C]76.0338[/C][C]0.0473[/C][C]0[/C][C]0.8415[/C][C]0[/C][/ROW]
[ROW][C]61[/C][C]62.5[/C][C]59.7238[/C][C]48.0791[/C][C]71.3685[/C][C]0.3201[/C][C]0.6706[/C][C]0.6396[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]79.7[/C][C]96.7728[/C][C]85.12[/C][C]108.4256[/C][C]0.002[/C][C]1[/C][C]0.6915[/C][C]0.9623[/C][/ROW]
[ROW][C]63[/C][C]80.3[/C][C]81.8592[/C][C]70.1378[/C][C]93.5806[/C][C]0.3972[/C][C]0.641[/C][C]0.7013[/C][C]0.234[/C][/ROW]
[ROW][C]64[/C][C]92.4[/C][C]81.8769[/C][C]69.7466[/C][C]94.0073[/C][C]0.0445[/C][C]0.6006[/C][C]0.6006[/C][C]0.2424[/C][/ROW]
[ROW][C]65[/C][C]91.8[/C][C]91.8166[/C][C]79.6774[/C][C]103.9558[/C][C]0.4989[/C][C]0.4625[/C][C]0.6276[/C][C]0.8178[/C][/ROW]
[ROW][C]66[/C][C]85.8[/C][C]79.452[/C][C]67.2671[/C][C]91.6368[/C][C]0.1536[/C][C]0.0235[/C][C]0.6232[/C][C]0.1389[/C][/ROW]
[ROW][C]67[/C][C]84.2[/C][C]72.8386[/C][C]60.5243[/C][C]85.1529[/C][C]0.0353[/C][C]0.0196[/C][C]0.5719[/C][C]0.0167[/C][/ROW]
[ROW][C]68[/C][C]93.1[/C][C]84.5483[/C][C]72.2269[/C][C]96.8698[/C][C]0.0869[/C][C]0.5221[/C][C]0.5849[/C][C]0.3964[/C][/ROW]
[ROW][C]69[/C][C]101.2[/C][C]87.4274[/C][C]75.0809[/C][C]99.7738[/C][C]0.0144[/C][C]0.1839[/C][C]0.5772[/C][C]0.5772[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36524&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36524&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[57])
4577.4-------
4685.3-------
4791-------
4860.6-------
4957.6-------
5093.8-------
5178.7-------
5280.3-------
5389.8-------
5477.5-------
5571.7-------
5683.2-------
5786.2-------
58100.788.055477.906698.20420.00730.640.70270.64
59100.895.276885.1242105.42940.14320.14760.79550.9601
6057.165.816355.598776.03380.047300.84150
6162.559.723848.079171.36850.32010.67060.63960
6279.796.772885.12108.42560.00210.69150.9623
6380.381.859270.137893.58060.39720.6410.70130.234
6492.481.876969.746694.00730.04450.60060.60060.2424
6591.891.816679.6774103.95580.49890.46250.62760.8178
6685.879.45267.267191.63680.15360.02350.62320.1389
6784.272.838660.524385.15290.03530.01960.57190.0167
6893.184.548372.226996.86980.08690.52210.58490.3964
69101.287.427475.080999.77380.01440.18390.57720.5772







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
580.05880.14360.012159.885313.32383.6502
590.05440.0580.004830.50542.54211.5944
600.0792-0.13240.01175.97326.33112.5162
610.09950.04650.00397.70740.64230.8014
620.0614-0.17640.0147291.480324.294.9285
630.0731-0.0190.00162.4310.20260.4501
640.07560.12850.0107110.73529.22793.0378
650.0675-2e-0403e-0400.0048
660.07820.07990.006740.29763.35811.8325
670.08630.1560.013129.080910.75673.2797
680.07440.10110.008473.13086.09422.4687
690.07210.15750.0131189.685715.80713.9758

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
58 & 0.0588 & 0.1436 & 0.012 & 159.8853 & 13.3238 & 3.6502 \tabularnewline
59 & 0.0544 & 0.058 & 0.0048 & 30.5054 & 2.5421 & 1.5944 \tabularnewline
60 & 0.0792 & -0.1324 & 0.011 & 75.9732 & 6.3311 & 2.5162 \tabularnewline
61 & 0.0995 & 0.0465 & 0.0039 & 7.7074 & 0.6423 & 0.8014 \tabularnewline
62 & 0.0614 & -0.1764 & 0.0147 & 291.4803 & 24.29 & 4.9285 \tabularnewline
63 & 0.0731 & -0.019 & 0.0016 & 2.431 & 0.2026 & 0.4501 \tabularnewline
64 & 0.0756 & 0.1285 & 0.0107 & 110.7352 & 9.2279 & 3.0378 \tabularnewline
65 & 0.0675 & -2e-04 & 0 & 3e-04 & 0 & 0.0048 \tabularnewline
66 & 0.0782 & 0.0799 & 0.0067 & 40.2976 & 3.3581 & 1.8325 \tabularnewline
67 & 0.0863 & 0.156 & 0.013 & 129.0809 & 10.7567 & 3.2797 \tabularnewline
68 & 0.0744 & 0.1011 & 0.0084 & 73.1308 & 6.0942 & 2.4687 \tabularnewline
69 & 0.0721 & 0.1575 & 0.0131 & 189.6857 & 15.8071 & 3.9758 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=36524&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]58[/C][C]0.0588[/C][C]0.1436[/C][C]0.012[/C][C]159.8853[/C][C]13.3238[/C][C]3.6502[/C][/ROW]
[ROW][C]59[/C][C]0.0544[/C][C]0.058[/C][C]0.0048[/C][C]30.5054[/C][C]2.5421[/C][C]1.5944[/C][/ROW]
[ROW][C]60[/C][C]0.0792[/C][C]-0.1324[/C][C]0.011[/C][C]75.9732[/C][C]6.3311[/C][C]2.5162[/C][/ROW]
[ROW][C]61[/C][C]0.0995[/C][C]0.0465[/C][C]0.0039[/C][C]7.7074[/C][C]0.6423[/C][C]0.8014[/C][/ROW]
[ROW][C]62[/C][C]0.0614[/C][C]-0.1764[/C][C]0.0147[/C][C]291.4803[/C][C]24.29[/C][C]4.9285[/C][/ROW]
[ROW][C]63[/C][C]0.0731[/C][C]-0.019[/C][C]0.0016[/C][C]2.431[/C][C]0.2026[/C][C]0.4501[/C][/ROW]
[ROW][C]64[/C][C]0.0756[/C][C]0.1285[/C][C]0.0107[/C][C]110.7352[/C][C]9.2279[/C][C]3.0378[/C][/ROW]
[ROW][C]65[/C][C]0.0675[/C][C]-2e-04[/C][C]0[/C][C]3e-04[/C][C]0[/C][C]0.0048[/C][/ROW]
[ROW][C]66[/C][C]0.0782[/C][C]0.0799[/C][C]0.0067[/C][C]40.2976[/C][C]3.3581[/C][C]1.8325[/C][/ROW]
[ROW][C]67[/C][C]0.0863[/C][C]0.156[/C][C]0.013[/C][C]129.0809[/C][C]10.7567[/C][C]3.2797[/C][/ROW]
[ROW][C]68[/C][C]0.0744[/C][C]0.1011[/C][C]0.0084[/C][C]73.1308[/C][C]6.0942[/C][C]2.4687[/C][/ROW]
[ROW][C]69[/C][C]0.0721[/C][C]0.1575[/C][C]0.0131[/C][C]189.6857[/C][C]15.8071[/C][C]3.9758[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=36524&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=36524&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
580.05880.14360.012159.885313.32383.6502
590.05440.0580.004830.50542.54211.5944
600.0792-0.13240.01175.97326.33112.5162
610.09950.04650.00397.70740.64230.8014
620.0614-0.17640.0147291.480324.294.9285
630.0731-0.0190.00162.4310.20260.4501
640.07560.12850.0107110.73529.22793.0378
650.0675-2e-0403e-0400.0048
660.07820.07990.006740.29763.35811.8325
670.08630.1560.013129.080910.75673.2797
680.07440.10110.008473.13086.09422.4687
690.07210.15750.0131189.685715.80713.9758



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 0 ; par8 = 0 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 0 ; par8 = 0 ; par9 = 0 ; par10 = FALSE ; par11 = ; par12 = ; par13 = ; par14 = ; par15 = ; par16 = ; par17 = ; par18 = ; par19 = ; par20 = ;
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')