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, 18 Dec 2009 02:44: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/2009/Dec/18/t12611296021nfrm110ulxx22t.htm/, Retrieved Sat, 27 Apr 2024 17:48:06 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=69197, Retrieved Sat, 27 Apr 2024 17:48:06 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact141
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Paper - Arima For...] [2008-12-14 14:14:00] [7a664918911e34206ce9d0436dd7c1c8]
-   P   [ARIMA Forecasting] [ARIMA forecasting...] [2008-12-15 14:52:51] [12d343c4448a5f9e527bb31caeac580b]
-  MPD      [ARIMA Forecasting] [Paper ARIMA forec...] [2009-12-18 09:44:08] [d1081bd6cdf1fed9ed45c42dbd523bf1] [Current]
Feedback Forum

Post a new message
Dataseries X:
7.6
8.3
8.4
8.4
8.4
8.4
8.6
8.9
8.8
8.3
7.5
7.2
7.4
8.8
9.3
9.3
8.7
8.2
8.3
8.5
8.6
8.5
8.2
8.1
7.9
8.6
8.7
8.7
8.5
8.4
8.5
8.7
8.7
8.6
8.5
8.3
8
8.2
8.1
8.1
8
7.9
7.9
8
8
7.9
8
7.7
7.2
7.5
7.3
7
7
7
7.2
7.3
7.1
6.8
6.4
6.1
6.5
7.7
7.9
7.5
6.9
6.6
6.9
7.7
8
8
7.7
7.3
7.4




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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 & 2 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69197&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]2 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=69197&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69197&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 time2 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[61])
497.2-------
507.5-------
517.3-------
527-------
537-------
547-------
557.2-------
567.3-------
577.1-------
586.8-------
596.4-------
606.1-------
616.5-------
627.77.58537.21117.95940.273910.67241
637.97.60036.89838.30230.20140.39040.79910.9989
647.56.97616.08087.87130.12570.02160.47910.8513
656.96.34415.39087.29750.12660.00870.08880.3743
666.65.91654.95996.87320.08070.0220.01320.116
676.96.08635.12897.04370.04790.14650.01130.1985
687.76.52655.56887.48420.00820.22230.05670.5217
6986.76575.78837.7430.00670.03050.25130.7029
7086.73585.69627.77530.00860.00860.45180.6717
717.76.33615.21897.45340.00840.00180.45540.3869
727.35.81364.64416.9830.00648e-040.31560.125
737.45.82674.63657.0170.00480.00760.13380.1338

\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[61]) \tabularnewline
49 & 7.2 & - & - & - & - & - & - & - \tabularnewline
50 & 7.5 & - & - & - & - & - & - & - \tabularnewline
51 & 7.3 & - & - & - & - & - & - & - \tabularnewline
52 & 7 & - & - & - & - & - & - & - \tabularnewline
53 & 7 & - & - & - & - & - & - & - \tabularnewline
54 & 7 & - & - & - & - & - & - & - \tabularnewline
55 & 7.2 & - & - & - & - & - & - & - \tabularnewline
56 & 7.3 & - & - & - & - & - & - & - \tabularnewline
57 & 7.1 & - & - & - & - & - & - & - \tabularnewline
58 & 6.8 & - & - & - & - & - & - & - \tabularnewline
59 & 6.4 & - & - & - & - & - & - & - \tabularnewline
60 & 6.1 & - & - & - & - & - & - & - \tabularnewline
61 & 6.5 & - & - & - & - & - & - & - \tabularnewline
62 & 7.7 & 7.5853 & 7.2111 & 7.9594 & 0.2739 & 1 & 0.6724 & 1 \tabularnewline
63 & 7.9 & 7.6003 & 6.8983 & 8.3023 & 0.2014 & 0.3904 & 0.7991 & 0.9989 \tabularnewline
64 & 7.5 & 6.9761 & 6.0808 & 7.8713 & 0.1257 & 0.0216 & 0.4791 & 0.8513 \tabularnewline
65 & 6.9 & 6.3441 & 5.3908 & 7.2975 & 0.1266 & 0.0087 & 0.0888 & 0.3743 \tabularnewline
66 & 6.6 & 5.9165 & 4.9599 & 6.8732 & 0.0807 & 0.022 & 0.0132 & 0.116 \tabularnewline
67 & 6.9 & 6.0863 & 5.1289 & 7.0437 & 0.0479 & 0.1465 & 0.0113 & 0.1985 \tabularnewline
68 & 7.7 & 6.5265 & 5.5688 & 7.4842 & 0.0082 & 0.2223 & 0.0567 & 0.5217 \tabularnewline
69 & 8 & 6.7657 & 5.7883 & 7.743 & 0.0067 & 0.0305 & 0.2513 & 0.7029 \tabularnewline
70 & 8 & 6.7358 & 5.6962 & 7.7753 & 0.0086 & 0.0086 & 0.4518 & 0.6717 \tabularnewline
71 & 7.7 & 6.3361 & 5.2189 & 7.4534 & 0.0084 & 0.0018 & 0.4554 & 0.3869 \tabularnewline
72 & 7.3 & 5.8136 & 4.6441 & 6.983 & 0.0064 & 8e-04 & 0.3156 & 0.125 \tabularnewline
73 & 7.4 & 5.8267 & 4.6365 & 7.017 & 0.0048 & 0.0076 & 0.1338 & 0.1338 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69197&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[61])[/C][/ROW]
[ROW][C]49[/C][C]7.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]7.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]7.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]7.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]7.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]7.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]6.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]6.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]6.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]6.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]7.7[/C][C]7.5853[/C][C]7.2111[/C][C]7.9594[/C][C]0.2739[/C][C]1[/C][C]0.6724[/C][C]1[/C][/ROW]
[ROW][C]63[/C][C]7.9[/C][C]7.6003[/C][C]6.8983[/C][C]8.3023[/C][C]0.2014[/C][C]0.3904[/C][C]0.7991[/C][C]0.9989[/C][/ROW]
[ROW][C]64[/C][C]7.5[/C][C]6.9761[/C][C]6.0808[/C][C]7.8713[/C][C]0.1257[/C][C]0.0216[/C][C]0.4791[/C][C]0.8513[/C][/ROW]
[ROW][C]65[/C][C]6.9[/C][C]6.3441[/C][C]5.3908[/C][C]7.2975[/C][C]0.1266[/C][C]0.0087[/C][C]0.0888[/C][C]0.3743[/C][/ROW]
[ROW][C]66[/C][C]6.6[/C][C]5.9165[/C][C]4.9599[/C][C]6.8732[/C][C]0.0807[/C][C]0.022[/C][C]0.0132[/C][C]0.116[/C][/ROW]
[ROW][C]67[/C][C]6.9[/C][C]6.0863[/C][C]5.1289[/C][C]7.0437[/C][C]0.0479[/C][C]0.1465[/C][C]0.0113[/C][C]0.1985[/C][/ROW]
[ROW][C]68[/C][C]7.7[/C][C]6.5265[/C][C]5.5688[/C][C]7.4842[/C][C]0.0082[/C][C]0.2223[/C][C]0.0567[/C][C]0.5217[/C][/ROW]
[ROW][C]69[/C][C]8[/C][C]6.7657[/C][C]5.7883[/C][C]7.743[/C][C]0.0067[/C][C]0.0305[/C][C]0.2513[/C][C]0.7029[/C][/ROW]
[ROW][C]70[/C][C]8[/C][C]6.7358[/C][C]5.6962[/C][C]7.7753[/C][C]0.0086[/C][C]0.0086[/C][C]0.4518[/C][C]0.6717[/C][/ROW]
[ROW][C]71[/C][C]7.7[/C][C]6.3361[/C][C]5.2189[/C][C]7.4534[/C][C]0.0084[/C][C]0.0018[/C][C]0.4554[/C][C]0.3869[/C][/ROW]
[ROW][C]72[/C][C]7.3[/C][C]5.8136[/C][C]4.6441[/C][C]6.983[/C][C]0.0064[/C][C]8e-04[/C][C]0.3156[/C][C]0.125[/C][/ROW]
[ROW][C]73[/C][C]7.4[/C][C]5.8267[/C][C]4.6365[/C][C]7.017[/C][C]0.0048[/C][C]0.0076[/C][C]0.1338[/C][C]0.1338[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69197&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69197&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[61])
497.2-------
507.5-------
517.3-------
527-------
537-------
547-------
557.2-------
567.3-------
577.1-------
586.8-------
596.4-------
606.1-------
616.5-------
627.77.58537.21117.95940.273910.67241
637.97.60036.89838.30230.20140.39040.79910.9989
647.56.97616.08087.87130.12570.02160.47910.8513
656.96.34415.39087.29750.12660.00870.08880.3743
666.65.91654.95996.87320.08070.0220.01320.116
676.96.08635.12897.04370.04790.14650.01130.1985
687.76.52655.56887.48420.00820.22230.05670.5217
6986.76575.78837.7430.00670.03050.25130.7029
7086.73585.69627.77530.00860.00860.45180.6717
717.76.33615.21897.45340.00840.00180.45540.3869
727.35.81364.64416.9830.00648e-040.31560.125
737.45.82674.63657.0170.00480.00760.13380.1338







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
620.02520.01510.00130.01320.00110.0331
630.04710.03940.00330.08980.00750.0865
640.06550.07510.00630.27450.02290.1512
650.07670.08760.00730.3090.02570.1605
660.08250.11550.00960.46710.03890.1973
670.08030.13370.01110.6620.05520.2349
680.07490.17980.0151.3770.11470.3387
690.07370.18240.01521.52360.1270.3563
700.07870.18770.01561.59830.13320.365
710.090.21520.01791.86010.1550.3937
720.10260.25570.02132.20950.18410.4291
730.10420.270.02252.47510.20630.4542

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
62 & 0.0252 & 0.0151 & 0.0013 & 0.0132 & 0.0011 & 0.0331 \tabularnewline
63 & 0.0471 & 0.0394 & 0.0033 & 0.0898 & 0.0075 & 0.0865 \tabularnewline
64 & 0.0655 & 0.0751 & 0.0063 & 0.2745 & 0.0229 & 0.1512 \tabularnewline
65 & 0.0767 & 0.0876 & 0.0073 & 0.309 & 0.0257 & 0.1605 \tabularnewline
66 & 0.0825 & 0.1155 & 0.0096 & 0.4671 & 0.0389 & 0.1973 \tabularnewline
67 & 0.0803 & 0.1337 & 0.0111 & 0.662 & 0.0552 & 0.2349 \tabularnewline
68 & 0.0749 & 0.1798 & 0.015 & 1.377 & 0.1147 & 0.3387 \tabularnewline
69 & 0.0737 & 0.1824 & 0.0152 & 1.5236 & 0.127 & 0.3563 \tabularnewline
70 & 0.0787 & 0.1877 & 0.0156 & 1.5983 & 0.1332 & 0.365 \tabularnewline
71 & 0.09 & 0.2152 & 0.0179 & 1.8601 & 0.155 & 0.3937 \tabularnewline
72 & 0.1026 & 0.2557 & 0.0213 & 2.2095 & 0.1841 & 0.4291 \tabularnewline
73 & 0.1042 & 0.27 & 0.0225 & 2.4751 & 0.2063 & 0.4542 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69197&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]62[/C][C]0.0252[/C][C]0.0151[/C][C]0.0013[/C][C]0.0132[/C][C]0.0011[/C][C]0.0331[/C][/ROW]
[ROW][C]63[/C][C]0.0471[/C][C]0.0394[/C][C]0.0033[/C][C]0.0898[/C][C]0.0075[/C][C]0.0865[/C][/ROW]
[ROW][C]64[/C][C]0.0655[/C][C]0.0751[/C][C]0.0063[/C][C]0.2745[/C][C]0.0229[/C][C]0.1512[/C][/ROW]
[ROW][C]65[/C][C]0.0767[/C][C]0.0876[/C][C]0.0073[/C][C]0.309[/C][C]0.0257[/C][C]0.1605[/C][/ROW]
[ROW][C]66[/C][C]0.0825[/C][C]0.1155[/C][C]0.0096[/C][C]0.4671[/C][C]0.0389[/C][C]0.1973[/C][/ROW]
[ROW][C]67[/C][C]0.0803[/C][C]0.1337[/C][C]0.0111[/C][C]0.662[/C][C]0.0552[/C][C]0.2349[/C][/ROW]
[ROW][C]68[/C][C]0.0749[/C][C]0.1798[/C][C]0.015[/C][C]1.377[/C][C]0.1147[/C][C]0.3387[/C][/ROW]
[ROW][C]69[/C][C]0.0737[/C][C]0.1824[/C][C]0.0152[/C][C]1.5236[/C][C]0.127[/C][C]0.3563[/C][/ROW]
[ROW][C]70[/C][C]0.0787[/C][C]0.1877[/C][C]0.0156[/C][C]1.5983[/C][C]0.1332[/C][C]0.365[/C][/ROW]
[ROW][C]71[/C][C]0.09[/C][C]0.2152[/C][C]0.0179[/C][C]1.8601[/C][C]0.155[/C][C]0.3937[/C][/ROW]
[ROW][C]72[/C][C]0.1026[/C][C]0.2557[/C][C]0.0213[/C][C]2.2095[/C][C]0.1841[/C][C]0.4291[/C][/ROW]
[ROW][C]73[/C][C]0.1042[/C][C]0.27[/C][C]0.0225[/C][C]2.4751[/C][C]0.2063[/C][C]0.4542[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69197&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69197&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
620.02520.01510.00130.01320.00110.0331
630.04710.03940.00330.08980.00750.0865
640.06550.07510.00630.27450.02290.1512
650.07670.08760.00730.3090.02570.1605
660.08250.11550.00960.46710.03890.1973
670.08030.13370.01110.6620.05520.2349
680.07490.17980.0151.3770.11470.3387
690.07370.18240.01521.52360.1270.3563
700.07870.18770.01561.59830.13320.365
710.090.21520.01791.86010.1550.3937
720.10260.25570.02132.20950.18410.4291
730.10420.270.02252.47510.20630.4542



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