Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 19 Dec 2007 09:51:35 -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/2007/Dec/19/t1198082033yvnej3t2x09khyu.htm/, Retrieved Tue, 07 May 2024 03:42:39 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4684, Retrieved Tue, 07 May 2024 03:42:39 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact196
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2007-12-19 16:51:35] [e2f7a6e26aa7cf06a3d27eb5298a4843] [Current]
Feedback Forum

Post a new message
Dataseries X:
1
1.04
1.02
1.07
1.12
1.08
1.02
1.01
1.04
0.98
0.95
0.94
0.94
0.96
0.97
1.03
1.01
0.99
1
1
1.02
1.01
0.99
0.98
1.01
1.03
1.03
1
0.96
0.97
0.98
1.02
1.04
1.01
1.01
1
1.01
1.02
1.03
1.06
1.12
1.12
1.13
1.13
1.13
1.17
1.14
1.08
1.07
1.12
1.14
1.21
1.2
1.23
1.29
1.31
1.37
1.35
1.26
1.26
1.28
1.28
1.27
1.35
1.37
1.37
1.4
1.4
1.28
1.23
1.23
1.25
1.21
1.22
1.29
1.32
1.36
1.36
1.37
1.32




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

\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 & 5 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=4684&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]5 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=4684&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4684&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 time5 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[68])
561.31-------
571.37-------
581.35-------
591.26-------
601.26-------
611.28-------
621.28-------
631.27-------
641.35-------
651.37-------
661.37-------
671.4-------
681.4-------
691.281.41791.34831.491e-040.6870.90370.687
701.231.41531.30661.53028e-040.98950.86740.603
711.231.39011.26281.52610.01050.98950.96960.4432
721.251.3841.23671.54310.04940.97110.93670.4218
731.211.38841.22471.56680.0250.93580.88310.4491
741.221.39311.21391.59020.04250.96580.86980.4728
751.291.39251.19981.60590.17330.94340.86970.4725
761.321.41951.21131.65150.20040.86290.72130.5653
771.361.42361.2031.6710.30720.79410.66440.5741
781.361.42631.19431.68830.30980.69020.66330.5781
791.371.43921.1951.71640.31230.71230.60920.6092
801.321.4411.18641.73160.20730.68390.60890.6089

\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[68]) \tabularnewline
56 & 1.31 & - & - & - & - & - & - & - \tabularnewline
57 & 1.37 & - & - & - & - & - & - & - \tabularnewline
58 & 1.35 & - & - & - & - & - & - & - \tabularnewline
59 & 1.26 & - & - & - & - & - & - & - \tabularnewline
60 & 1.26 & - & - & - & - & - & - & - \tabularnewline
61 & 1.28 & - & - & - & - & - & - & - \tabularnewline
62 & 1.28 & - & - & - & - & - & - & - \tabularnewline
63 & 1.27 & - & - & - & - & - & - & - \tabularnewline
64 & 1.35 & - & - & - & - & - & - & - \tabularnewline
65 & 1.37 & - & - & - & - & - & - & - \tabularnewline
66 & 1.37 & - & - & - & - & - & - & - \tabularnewline
67 & 1.4 & - & - & - & - & - & - & - \tabularnewline
68 & 1.4 & - & - & - & - & - & - & - \tabularnewline
69 & 1.28 & 1.4179 & 1.3483 & 1.49 & 1e-04 & 0.687 & 0.9037 & 0.687 \tabularnewline
70 & 1.23 & 1.4153 & 1.3066 & 1.5302 & 8e-04 & 0.9895 & 0.8674 & 0.603 \tabularnewline
71 & 1.23 & 1.3901 & 1.2628 & 1.5261 & 0.0105 & 0.9895 & 0.9696 & 0.4432 \tabularnewline
72 & 1.25 & 1.384 & 1.2367 & 1.5431 & 0.0494 & 0.9711 & 0.9367 & 0.4218 \tabularnewline
73 & 1.21 & 1.3884 & 1.2247 & 1.5668 & 0.025 & 0.9358 & 0.8831 & 0.4491 \tabularnewline
74 & 1.22 & 1.3931 & 1.2139 & 1.5902 & 0.0425 & 0.9658 & 0.8698 & 0.4728 \tabularnewline
75 & 1.29 & 1.3925 & 1.1998 & 1.6059 & 0.1733 & 0.9434 & 0.8697 & 0.4725 \tabularnewline
76 & 1.32 & 1.4195 & 1.2113 & 1.6515 & 0.2004 & 0.8629 & 0.7213 & 0.5653 \tabularnewline
77 & 1.36 & 1.4236 & 1.203 & 1.671 & 0.3072 & 0.7941 & 0.6644 & 0.5741 \tabularnewline
78 & 1.36 & 1.4263 & 1.1943 & 1.6883 & 0.3098 & 0.6902 & 0.6633 & 0.5781 \tabularnewline
79 & 1.37 & 1.4392 & 1.195 & 1.7164 & 0.3123 & 0.7123 & 0.6092 & 0.6092 \tabularnewline
80 & 1.32 & 1.441 & 1.1864 & 1.7316 & 0.2073 & 0.6839 & 0.6089 & 0.6089 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4684&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[68])[/C][/ROW]
[ROW][C]56[/C][C]1.31[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]1.37[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]1.35[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]1.26[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]1.26[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]1.28[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]1.28[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]1.27[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]1.35[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]1.37[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]1.37[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]1.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]1.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]1.28[/C][C]1.4179[/C][C]1.3483[/C][C]1.49[/C][C]1e-04[/C][C]0.687[/C][C]0.9037[/C][C]0.687[/C][/ROW]
[ROW][C]70[/C][C]1.23[/C][C]1.4153[/C][C]1.3066[/C][C]1.5302[/C][C]8e-04[/C][C]0.9895[/C][C]0.8674[/C][C]0.603[/C][/ROW]
[ROW][C]71[/C][C]1.23[/C][C]1.3901[/C][C]1.2628[/C][C]1.5261[/C][C]0.0105[/C][C]0.9895[/C][C]0.9696[/C][C]0.4432[/C][/ROW]
[ROW][C]72[/C][C]1.25[/C][C]1.384[/C][C]1.2367[/C][C]1.5431[/C][C]0.0494[/C][C]0.9711[/C][C]0.9367[/C][C]0.4218[/C][/ROW]
[ROW][C]73[/C][C]1.21[/C][C]1.3884[/C][C]1.2247[/C][C]1.5668[/C][C]0.025[/C][C]0.9358[/C][C]0.8831[/C][C]0.4491[/C][/ROW]
[ROW][C]74[/C][C]1.22[/C][C]1.3931[/C][C]1.2139[/C][C]1.5902[/C][C]0.0425[/C][C]0.9658[/C][C]0.8698[/C][C]0.4728[/C][/ROW]
[ROW][C]75[/C][C]1.29[/C][C]1.3925[/C][C]1.1998[/C][C]1.6059[/C][C]0.1733[/C][C]0.9434[/C][C]0.8697[/C][C]0.4725[/C][/ROW]
[ROW][C]76[/C][C]1.32[/C][C]1.4195[/C][C]1.2113[/C][C]1.6515[/C][C]0.2004[/C][C]0.8629[/C][C]0.7213[/C][C]0.5653[/C][/ROW]
[ROW][C]77[/C][C]1.36[/C][C]1.4236[/C][C]1.203[/C][C]1.671[/C][C]0.3072[/C][C]0.7941[/C][C]0.6644[/C][C]0.5741[/C][/ROW]
[ROW][C]78[/C][C]1.36[/C][C]1.4263[/C][C]1.1943[/C][C]1.6883[/C][C]0.3098[/C][C]0.6902[/C][C]0.6633[/C][C]0.5781[/C][/ROW]
[ROW][C]79[/C][C]1.37[/C][C]1.4392[/C][C]1.195[/C][C]1.7164[/C][C]0.3123[/C][C]0.7123[/C][C]0.6092[/C][C]0.6092[/C][/ROW]
[ROW][C]80[/C][C]1.32[/C][C]1.441[/C][C]1.1864[/C][C]1.7316[/C][C]0.2073[/C][C]0.6839[/C][C]0.6089[/C][C]0.6089[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4684&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4684&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[68])
561.31-------
571.37-------
581.35-------
591.26-------
601.26-------
611.28-------
621.28-------
631.27-------
641.35-------
651.37-------
661.37-------
671.4-------
681.4-------
691.281.41791.34831.491e-040.6870.90370.687
701.231.41531.30661.53028e-040.98950.86740.603
711.231.39011.26281.52610.01050.98950.96960.4432
721.251.3841.23671.54310.04940.97110.93670.4218
731.211.38841.22471.56680.0250.93580.88310.4491
741.221.39311.21391.59020.04250.96580.86980.4728
751.291.39251.19981.60590.17330.94340.86970.4725
761.321.41951.21131.65150.20040.86290.72130.5653
771.361.42361.2031.6710.30720.79410.66440.5741
781.361.42631.19431.68830.30980.69020.66330.5781
791.371.43921.1951.71640.31230.71230.60920.6092
801.321.4411.18641.73160.20730.68390.60890.6089







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
690.0259-0.09730.00810.0190.00160.0398
700.0414-0.13090.01090.03430.00290.0535
710.0499-0.11520.00960.02560.00210.0462
720.0587-0.09680.00810.0180.00150.0387
730.0656-0.12850.01070.03180.00270.0515
740.0722-0.12430.01040.030.00250.05
750.0782-0.07360.00610.01059e-040.0296
760.0834-0.07010.00580.00998e-040.0287
770.0887-0.04470.00370.0043e-040.0184
780.0937-0.04650.00390.00444e-040.0192
790.0983-0.04810.0040.00484e-040.02
800.1029-0.0840.0070.01460.00120.0349

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
69 & 0.0259 & -0.0973 & 0.0081 & 0.019 & 0.0016 & 0.0398 \tabularnewline
70 & 0.0414 & -0.1309 & 0.0109 & 0.0343 & 0.0029 & 0.0535 \tabularnewline
71 & 0.0499 & -0.1152 & 0.0096 & 0.0256 & 0.0021 & 0.0462 \tabularnewline
72 & 0.0587 & -0.0968 & 0.0081 & 0.018 & 0.0015 & 0.0387 \tabularnewline
73 & 0.0656 & -0.1285 & 0.0107 & 0.0318 & 0.0027 & 0.0515 \tabularnewline
74 & 0.0722 & -0.1243 & 0.0104 & 0.03 & 0.0025 & 0.05 \tabularnewline
75 & 0.0782 & -0.0736 & 0.0061 & 0.0105 & 9e-04 & 0.0296 \tabularnewline
76 & 0.0834 & -0.0701 & 0.0058 & 0.0099 & 8e-04 & 0.0287 \tabularnewline
77 & 0.0887 & -0.0447 & 0.0037 & 0.004 & 3e-04 & 0.0184 \tabularnewline
78 & 0.0937 & -0.0465 & 0.0039 & 0.0044 & 4e-04 & 0.0192 \tabularnewline
79 & 0.0983 & -0.0481 & 0.004 & 0.0048 & 4e-04 & 0.02 \tabularnewline
80 & 0.1029 & -0.084 & 0.007 & 0.0146 & 0.0012 & 0.0349 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4684&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]69[/C][C]0.0259[/C][C]-0.0973[/C][C]0.0081[/C][C]0.019[/C][C]0.0016[/C][C]0.0398[/C][/ROW]
[ROW][C]70[/C][C]0.0414[/C][C]-0.1309[/C][C]0.0109[/C][C]0.0343[/C][C]0.0029[/C][C]0.0535[/C][/ROW]
[ROW][C]71[/C][C]0.0499[/C][C]-0.1152[/C][C]0.0096[/C][C]0.0256[/C][C]0.0021[/C][C]0.0462[/C][/ROW]
[ROW][C]72[/C][C]0.0587[/C][C]-0.0968[/C][C]0.0081[/C][C]0.018[/C][C]0.0015[/C][C]0.0387[/C][/ROW]
[ROW][C]73[/C][C]0.0656[/C][C]-0.1285[/C][C]0.0107[/C][C]0.0318[/C][C]0.0027[/C][C]0.0515[/C][/ROW]
[ROW][C]74[/C][C]0.0722[/C][C]-0.1243[/C][C]0.0104[/C][C]0.03[/C][C]0.0025[/C][C]0.05[/C][/ROW]
[ROW][C]75[/C][C]0.0782[/C][C]-0.0736[/C][C]0.0061[/C][C]0.0105[/C][C]9e-04[/C][C]0.0296[/C][/ROW]
[ROW][C]76[/C][C]0.0834[/C][C]-0.0701[/C][C]0.0058[/C][C]0.0099[/C][C]8e-04[/C][C]0.0287[/C][/ROW]
[ROW][C]77[/C][C]0.0887[/C][C]-0.0447[/C][C]0.0037[/C][C]0.004[/C][C]3e-04[/C][C]0.0184[/C][/ROW]
[ROW][C]78[/C][C]0.0937[/C][C]-0.0465[/C][C]0.0039[/C][C]0.0044[/C][C]4e-04[/C][C]0.0192[/C][/ROW]
[ROW][C]79[/C][C]0.0983[/C][C]-0.0481[/C][C]0.004[/C][C]0.0048[/C][C]4e-04[/C][C]0.02[/C][/ROW]
[ROW][C]80[/C][C]0.1029[/C][C]-0.084[/C][C]0.007[/C][C]0.0146[/C][C]0.0012[/C][C]0.0349[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4684&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4684&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
690.0259-0.09730.00810.0190.00160.0398
700.0414-0.13090.01090.03430.00290.0535
710.0499-0.11520.00960.02560.00210.0462
720.0587-0.09680.00810.0180.00150.0387
730.0656-0.12850.01070.03180.00270.0515
740.0722-0.12430.01040.030.00250.05
750.0782-0.07360.00610.01059e-040.0296
760.0834-0.07010.00580.00998e-040.0287
770.0887-0.04470.00370.0043e-040.0184
780.0937-0.04650.00390.00444e-040.0192
790.0983-0.04810.0040.00484e-040.02
800.1029-0.0840.0070.01460.00120.0349



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