Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationTue, 15 Jan 2008 10:46:23 -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/Jan/15/t1200418937u1g2shnt6tqhg0d.htm/, Retrieved Wed, 15 May 2024 00:43:03 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=7965, Retrieved Wed, 15 May 2024 00:43:03 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact310
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [s 0650692 paper] [2008-01-15 17:46:23] [011cc8cdd02d5893b5258ac3f5e21d83] [Current]
-  M D    [ARIMA Forecasting] [Arima forecasting] [2010-12-22 15:24:17] [fb3a7008aea9486db3846dc25434607b]
-  MPD    [ARIMA Forecasting] [Arima forecasting] [2010-12-22 15:59:33] [fb3a7008aea9486db3846dc25434607b]
-  MPD    [ARIMA Forecasting] [] [2010-12-22 16:26:53] [d7b28a0391ab3b2ddc9f9fba95a43f33]
Feedback Forum

Post a new message
Dataseries X:
0,73
0,74
0,75
0,74
0,76
0,76
0,78
0,79
0,89
0,88
0,88
0,84
0,76
0,77
0,76
0,77
0,78
0,79
0,78
0,76
0,78
0,76
0,74
0,73
0,72
0,71
0,73
0,75
0,75
0,72
0,72
0,72
0,74
0,78
0,74
0,74
0,75
0,78
0,81
0,75
0,7
0,71
0,71
0,73
0,74
0,74
0,75
0,74
0,74
0,73
0,76
0,8
0,83
0,81
0,83
0,88
0,89
0,93
0,91
0,9
0,86
0,88
0,93
0,98
0,97
1,03
1,06
1,06
1,08
1,09
1,04
1




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'George Udny Yule' @ 72.249.76.132

\begin{tabular}{lllllllll}
\hline
Summary of compuational 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 & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=7965&T=0

[TABLE]
[ROW][C]Summary of compuational 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]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=7965&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7965&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'George Udny Yule' @ 72.249.76.132







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[60])
480.74-------
490.74-------
500.73-------
510.76-------
520.8-------
530.83-------
540.81-------
550.83-------
560.88-------
570.89-------
580.93-------
590.91-------
600.9-------
610.860.8970.84340.95060.08810.456210.4562
620.880.90.82420.97570.30290.849310.4995
630.930.89780.8050.99050.24790.64620.99820.4811
640.980.89160.78440.99870.05280.2410.95310.4387
650.970.88630.76651.00610.08540.06260.82160.4114
661.030.89030.75911.02150.01840.11680.88480.4422
671.060.88760.74591.02930.00850.02440.78710.4318
681.060.88410.73261.03560.01140.01140.52110.4185
691.080.87940.71871.040.00720.01380.44840.4007
701.090.87410.70481.04350.00620.00860.2590.3824
711.040.87720.69951.05480.03620.00940.35860.4005
7210.87860.6931.06410.09970.0440.41040.4104

\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[60]) \tabularnewline
48 & 0.74 & - & - & - & - & - & - & - \tabularnewline
49 & 0.74 & - & - & - & - & - & - & - \tabularnewline
50 & 0.73 & - & - & - & - & - & - & - \tabularnewline
51 & 0.76 & - & - & - & - & - & - & - \tabularnewline
52 & 0.8 & - & - & - & - & - & - & - \tabularnewline
53 & 0.83 & - & - & - & - & - & - & - \tabularnewline
54 & 0.81 & - & - & - & - & - & - & - \tabularnewline
55 & 0.83 & - & - & - & - & - & - & - \tabularnewline
56 & 0.88 & - & - & - & - & - & - & - \tabularnewline
57 & 0.89 & - & - & - & - & - & - & - \tabularnewline
58 & 0.93 & - & - & - & - & - & - & - \tabularnewline
59 & 0.91 & - & - & - & - & - & - & - \tabularnewline
60 & 0.9 & - & - & - & - & - & - & - \tabularnewline
61 & 0.86 & 0.897 & 0.8434 & 0.9506 & 0.0881 & 0.4562 & 1 & 0.4562 \tabularnewline
62 & 0.88 & 0.9 & 0.8242 & 0.9757 & 0.3029 & 0.8493 & 1 & 0.4995 \tabularnewline
63 & 0.93 & 0.8978 & 0.805 & 0.9905 & 0.2479 & 0.6462 & 0.9982 & 0.4811 \tabularnewline
64 & 0.98 & 0.8916 & 0.7844 & 0.9987 & 0.0528 & 0.241 & 0.9531 & 0.4387 \tabularnewline
65 & 0.97 & 0.8863 & 0.7665 & 1.0061 & 0.0854 & 0.0626 & 0.8216 & 0.4114 \tabularnewline
66 & 1.03 & 0.8903 & 0.7591 & 1.0215 & 0.0184 & 0.1168 & 0.8848 & 0.4422 \tabularnewline
67 & 1.06 & 0.8876 & 0.7459 & 1.0293 & 0.0085 & 0.0244 & 0.7871 & 0.4318 \tabularnewline
68 & 1.06 & 0.8841 & 0.7326 & 1.0356 & 0.0114 & 0.0114 & 0.5211 & 0.4185 \tabularnewline
69 & 1.08 & 0.8794 & 0.7187 & 1.04 & 0.0072 & 0.0138 & 0.4484 & 0.4007 \tabularnewline
70 & 1.09 & 0.8741 & 0.7048 & 1.0435 & 0.0062 & 0.0086 & 0.259 & 0.3824 \tabularnewline
71 & 1.04 & 0.8772 & 0.6995 & 1.0548 & 0.0362 & 0.0094 & 0.3586 & 0.4005 \tabularnewline
72 & 1 & 0.8786 & 0.693 & 1.0641 & 0.0997 & 0.044 & 0.4104 & 0.4104 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=7965&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[60])[/C][/ROW]
[ROW][C]48[/C][C]0.74[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]0.74[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]0.73[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]0.76[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]0.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]0.83[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]0.81[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]0.83[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]0.88[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]0.89[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]0.93[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]0.91[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]0.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]0.86[/C][C]0.897[/C][C]0.8434[/C][C]0.9506[/C][C]0.0881[/C][C]0.4562[/C][C]1[/C][C]0.4562[/C][/ROW]
[ROW][C]62[/C][C]0.88[/C][C]0.9[/C][C]0.8242[/C][C]0.9757[/C][C]0.3029[/C][C]0.8493[/C][C]1[/C][C]0.4995[/C][/ROW]
[ROW][C]63[/C][C]0.93[/C][C]0.8978[/C][C]0.805[/C][C]0.9905[/C][C]0.2479[/C][C]0.6462[/C][C]0.9982[/C][C]0.4811[/C][/ROW]
[ROW][C]64[/C][C]0.98[/C][C]0.8916[/C][C]0.7844[/C][C]0.9987[/C][C]0.0528[/C][C]0.241[/C][C]0.9531[/C][C]0.4387[/C][/ROW]
[ROW][C]65[/C][C]0.97[/C][C]0.8863[/C][C]0.7665[/C][C]1.0061[/C][C]0.0854[/C][C]0.0626[/C][C]0.8216[/C][C]0.4114[/C][/ROW]
[ROW][C]66[/C][C]1.03[/C][C]0.8903[/C][C]0.7591[/C][C]1.0215[/C][C]0.0184[/C][C]0.1168[/C][C]0.8848[/C][C]0.4422[/C][/ROW]
[ROW][C]67[/C][C]1.06[/C][C]0.8876[/C][C]0.7459[/C][C]1.0293[/C][C]0.0085[/C][C]0.0244[/C][C]0.7871[/C][C]0.4318[/C][/ROW]
[ROW][C]68[/C][C]1.06[/C][C]0.8841[/C][C]0.7326[/C][C]1.0356[/C][C]0.0114[/C][C]0.0114[/C][C]0.5211[/C][C]0.4185[/C][/ROW]
[ROW][C]69[/C][C]1.08[/C][C]0.8794[/C][C]0.7187[/C][C]1.04[/C][C]0.0072[/C][C]0.0138[/C][C]0.4484[/C][C]0.4007[/C][/ROW]
[ROW][C]70[/C][C]1.09[/C][C]0.8741[/C][C]0.7048[/C][C]1.0435[/C][C]0.0062[/C][C]0.0086[/C][C]0.259[/C][C]0.3824[/C][/ROW]
[ROW][C]71[/C][C]1.04[/C][C]0.8772[/C][C]0.6995[/C][C]1.0548[/C][C]0.0362[/C][C]0.0094[/C][C]0.3586[/C][C]0.4005[/C][/ROW]
[ROW][C]72[/C][C]1[/C][C]0.8786[/C][C]0.693[/C][C]1.0641[/C][C]0.0997[/C][C]0.044[/C][C]0.4104[/C][C]0.4104[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=7965&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7965&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[60])
480.74-------
490.74-------
500.73-------
510.76-------
520.8-------
530.83-------
540.81-------
550.83-------
560.88-------
570.89-------
580.93-------
590.91-------
600.9-------
610.860.8970.84340.95060.08810.456210.4562
620.880.90.82420.97570.30290.849310.4995
630.930.89780.8050.99050.24790.64620.99820.4811
640.980.89160.78440.99870.05280.2410.95310.4387
650.970.88630.76651.00610.08540.06260.82160.4114
661.030.89030.75911.02150.01840.11680.88480.4422
671.060.88760.74591.02930.00850.02440.78710.4318
681.060.88410.73261.03560.01140.01140.52110.4185
691.080.87940.71871.040.00720.01380.44840.4007
701.090.87410.70481.04350.00620.00860.2590.3824
711.040.87720.69951.05480.03620.00940.35860.4005
7210.87860.6931.06410.09970.0440.41040.4104







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.0305-0.04120.00340.00141e-040.0107
620.043-0.02220.00184e-0400.0058
630.05270.03590.0030.0011e-040.0093
640.06130.09920.00830.00787e-040.0255
650.06890.09440.00790.0076e-040.0242
660.07520.1570.01310.01950.00160.0403
670.08150.19430.01620.02970.00250.0498
680.08740.1990.01660.03090.00260.0508
690.09320.22810.0190.04020.00340.0579
700.09880.24690.02060.04660.00390.0623
710.10330.18560.01550.02650.00220.047
720.10770.13820.01150.01470.00120.0351

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.0305 & -0.0412 & 0.0034 & 0.0014 & 1e-04 & 0.0107 \tabularnewline
62 & 0.043 & -0.0222 & 0.0018 & 4e-04 & 0 & 0.0058 \tabularnewline
63 & 0.0527 & 0.0359 & 0.003 & 0.001 & 1e-04 & 0.0093 \tabularnewline
64 & 0.0613 & 0.0992 & 0.0083 & 0.0078 & 7e-04 & 0.0255 \tabularnewline
65 & 0.0689 & 0.0944 & 0.0079 & 0.007 & 6e-04 & 0.0242 \tabularnewline
66 & 0.0752 & 0.157 & 0.0131 & 0.0195 & 0.0016 & 0.0403 \tabularnewline
67 & 0.0815 & 0.1943 & 0.0162 & 0.0297 & 0.0025 & 0.0498 \tabularnewline
68 & 0.0874 & 0.199 & 0.0166 & 0.0309 & 0.0026 & 0.0508 \tabularnewline
69 & 0.0932 & 0.2281 & 0.019 & 0.0402 & 0.0034 & 0.0579 \tabularnewline
70 & 0.0988 & 0.2469 & 0.0206 & 0.0466 & 0.0039 & 0.0623 \tabularnewline
71 & 0.1033 & 0.1856 & 0.0155 & 0.0265 & 0.0022 & 0.047 \tabularnewline
72 & 0.1077 & 0.1382 & 0.0115 & 0.0147 & 0.0012 & 0.0351 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=7965&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]61[/C][C]0.0305[/C][C]-0.0412[/C][C]0.0034[/C][C]0.0014[/C][C]1e-04[/C][C]0.0107[/C][/ROW]
[ROW][C]62[/C][C]0.043[/C][C]-0.0222[/C][C]0.0018[/C][C]4e-04[/C][C]0[/C][C]0.0058[/C][/ROW]
[ROW][C]63[/C][C]0.0527[/C][C]0.0359[/C][C]0.003[/C][C]0.001[/C][C]1e-04[/C][C]0.0093[/C][/ROW]
[ROW][C]64[/C][C]0.0613[/C][C]0.0992[/C][C]0.0083[/C][C]0.0078[/C][C]7e-04[/C][C]0.0255[/C][/ROW]
[ROW][C]65[/C][C]0.0689[/C][C]0.0944[/C][C]0.0079[/C][C]0.007[/C][C]6e-04[/C][C]0.0242[/C][/ROW]
[ROW][C]66[/C][C]0.0752[/C][C]0.157[/C][C]0.0131[/C][C]0.0195[/C][C]0.0016[/C][C]0.0403[/C][/ROW]
[ROW][C]67[/C][C]0.0815[/C][C]0.1943[/C][C]0.0162[/C][C]0.0297[/C][C]0.0025[/C][C]0.0498[/C][/ROW]
[ROW][C]68[/C][C]0.0874[/C][C]0.199[/C][C]0.0166[/C][C]0.0309[/C][C]0.0026[/C][C]0.0508[/C][/ROW]
[ROW][C]69[/C][C]0.0932[/C][C]0.2281[/C][C]0.019[/C][C]0.0402[/C][C]0.0034[/C][C]0.0579[/C][/ROW]
[ROW][C]70[/C][C]0.0988[/C][C]0.2469[/C][C]0.0206[/C][C]0.0466[/C][C]0.0039[/C][C]0.0623[/C][/ROW]
[ROW][C]71[/C][C]0.1033[/C][C]0.1856[/C][C]0.0155[/C][C]0.0265[/C][C]0.0022[/C][C]0.047[/C][/ROW]
[ROW][C]72[/C][C]0.1077[/C][C]0.1382[/C][C]0.0115[/C][C]0.0147[/C][C]0.0012[/C][C]0.0351[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=7965&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7965&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
610.0305-0.04120.00340.00141e-040.0107
620.043-0.02220.00184e-0400.0058
630.05270.03590.0030.0011e-040.0093
640.06130.09920.00830.00787e-040.0255
650.06890.09440.00790.0076e-040.0242
660.07520.1570.01310.01950.00160.0403
670.08150.19430.01620.02970.00250.0498
680.08740.1990.01660.03090.00260.0508
690.09320.22810.0190.04020.00340.0579
700.09880.24690.02060.04660.00390.0623
710.10330.18560.01550.02650.00220.047
720.10770.13820.01150.01470.00120.0351



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