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:53:19 -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/t1198082139agvf1cjy48xdtp6.htm/, Retrieved Mon, 06 May 2024 13:20:15 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4685, Retrieved Mon, 06 May 2024 13:20:15 +0000
QR Codes:

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

Post a new message
Dataseries X:
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
1.01
1.02
1.04
1.06
1.06
1.06
1.06
1.06
1.02
0.98
0.99
0.99
0.94
0.96
0.98
1.01
1.01
1.02
1.04
1.03




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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 & 3 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=4685&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]3 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=4685&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4685&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 time3 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.06-------
571.08-------
581.09-------
591.04-------
601-------
611.01-------
621.02-------
631.04-------
641.06-------
651.06-------
661.06-------
671.06-------
681.06-------
691.021.061.00821.11290.0690.50030.22950.5003
700.981.060.97671.14610.03420.8190.24740.5002
710.991.060.95451.170.10590.92320.63940.5002
720.991.060.93641.18970.1450.8550.81780.5001
730.941.060.92081.2070.05470.82480.74770.5001
740.961.060.90691.22250.11380.92610.68530.5001
750.981.060.89431.23680.18750.86620.58780.5001
761.011.060.88271.25010.3030.79530.50010.5001
771.011.060.87181.26270.31420.68580.50010.5001
781.021.060.86161.27450.35730.67620.50010.5001
791.041.060.8521.28580.4310.63590.50010.5001
801.031.060.84291.29660.40180.56590.50010.5001

\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.06 & - & - & - & - & - & - & - \tabularnewline
57 & 1.08 & - & - & - & - & - & - & - \tabularnewline
58 & 1.09 & - & - & - & - & - & - & - \tabularnewline
59 & 1.04 & - & - & - & - & - & - & - \tabularnewline
60 & 1 & - & - & - & - & - & - & - \tabularnewline
61 & 1.01 & - & - & - & - & - & - & - \tabularnewline
62 & 1.02 & - & - & - & - & - & - & - \tabularnewline
63 & 1.04 & - & - & - & - & - & - & - \tabularnewline
64 & 1.06 & - & - & - & - & - & - & - \tabularnewline
65 & 1.06 & - & - & - & - & - & - & - \tabularnewline
66 & 1.06 & - & - & - & - & - & - & - \tabularnewline
67 & 1.06 & - & - & - & - & - & - & - \tabularnewline
68 & 1.06 & - & - & - & - & - & - & - \tabularnewline
69 & 1.02 & 1.06 & 1.0082 & 1.1129 & 0.069 & 0.5003 & 0.2295 & 0.5003 \tabularnewline
70 & 0.98 & 1.06 & 0.9767 & 1.1461 & 0.0342 & 0.819 & 0.2474 & 0.5002 \tabularnewline
71 & 0.99 & 1.06 & 0.9545 & 1.17 & 0.1059 & 0.9232 & 0.6394 & 0.5002 \tabularnewline
72 & 0.99 & 1.06 & 0.9364 & 1.1897 & 0.145 & 0.855 & 0.8178 & 0.5001 \tabularnewline
73 & 0.94 & 1.06 & 0.9208 & 1.207 & 0.0547 & 0.8248 & 0.7477 & 0.5001 \tabularnewline
74 & 0.96 & 1.06 & 0.9069 & 1.2225 & 0.1138 & 0.9261 & 0.6853 & 0.5001 \tabularnewline
75 & 0.98 & 1.06 & 0.8943 & 1.2368 & 0.1875 & 0.8662 & 0.5878 & 0.5001 \tabularnewline
76 & 1.01 & 1.06 & 0.8827 & 1.2501 & 0.303 & 0.7953 & 0.5001 & 0.5001 \tabularnewline
77 & 1.01 & 1.06 & 0.8718 & 1.2627 & 0.3142 & 0.6858 & 0.5001 & 0.5001 \tabularnewline
78 & 1.02 & 1.06 & 0.8616 & 1.2745 & 0.3573 & 0.6762 & 0.5001 & 0.5001 \tabularnewline
79 & 1.04 & 1.06 & 0.852 & 1.2858 & 0.431 & 0.6359 & 0.5001 & 0.5001 \tabularnewline
80 & 1.03 & 1.06 & 0.8429 & 1.2966 & 0.4018 & 0.5659 & 0.5001 & 0.5001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4685&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.06[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]1.08[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]1.09[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]1.04[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]1.01[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]1.02[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]1.04[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]1.06[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]1.06[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]1.06[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]1.06[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]1.06[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]1.02[/C][C]1.06[/C][C]1.0082[/C][C]1.1129[/C][C]0.069[/C][C]0.5003[/C][C]0.2295[/C][C]0.5003[/C][/ROW]
[ROW][C]70[/C][C]0.98[/C][C]1.06[/C][C]0.9767[/C][C]1.1461[/C][C]0.0342[/C][C]0.819[/C][C]0.2474[/C][C]0.5002[/C][/ROW]
[ROW][C]71[/C][C]0.99[/C][C]1.06[/C][C]0.9545[/C][C]1.17[/C][C]0.1059[/C][C]0.9232[/C][C]0.6394[/C][C]0.5002[/C][/ROW]
[ROW][C]72[/C][C]0.99[/C][C]1.06[/C][C]0.9364[/C][C]1.1897[/C][C]0.145[/C][C]0.855[/C][C]0.8178[/C][C]0.5001[/C][/ROW]
[ROW][C]73[/C][C]0.94[/C][C]1.06[/C][C]0.9208[/C][C]1.207[/C][C]0.0547[/C][C]0.8248[/C][C]0.7477[/C][C]0.5001[/C][/ROW]
[ROW][C]74[/C][C]0.96[/C][C]1.06[/C][C]0.9069[/C][C]1.2225[/C][C]0.1138[/C][C]0.9261[/C][C]0.6853[/C][C]0.5001[/C][/ROW]
[ROW][C]75[/C][C]0.98[/C][C]1.06[/C][C]0.8943[/C][C]1.2368[/C][C]0.1875[/C][C]0.8662[/C][C]0.5878[/C][C]0.5001[/C][/ROW]
[ROW][C]76[/C][C]1.01[/C][C]1.06[/C][C]0.8827[/C][C]1.2501[/C][C]0.303[/C][C]0.7953[/C][C]0.5001[/C][C]0.5001[/C][/ROW]
[ROW][C]77[/C][C]1.01[/C][C]1.06[/C][C]0.8718[/C][C]1.2627[/C][C]0.3142[/C][C]0.6858[/C][C]0.5001[/C][C]0.5001[/C][/ROW]
[ROW][C]78[/C][C]1.02[/C][C]1.06[/C][C]0.8616[/C][C]1.2745[/C][C]0.3573[/C][C]0.6762[/C][C]0.5001[/C][C]0.5001[/C][/ROW]
[ROW][C]79[/C][C]1.04[/C][C]1.06[/C][C]0.852[/C][C]1.2858[/C][C]0.431[/C][C]0.6359[/C][C]0.5001[/C][C]0.5001[/C][/ROW]
[ROW][C]80[/C][C]1.03[/C][C]1.06[/C][C]0.8429[/C][C]1.2966[/C][C]0.4018[/C][C]0.5659[/C][C]0.5001[/C][C]0.5001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4685&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4685&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.06-------
571.08-------
581.09-------
591.04-------
601-------
611.01-------
621.02-------
631.04-------
641.06-------
651.06-------
661.06-------
671.06-------
681.06-------
691.021.061.00821.11290.0690.50030.22950.5003
700.981.060.97671.14610.03420.8190.24740.5002
710.991.060.95451.170.10590.92320.63940.5002
720.991.060.93641.18970.1450.8550.81780.5001
730.941.060.92081.2070.05470.82480.74770.5001
740.961.060.90691.22250.11380.92610.68530.5001
750.981.060.89431.23680.18750.86620.58780.5001
761.011.060.88271.25010.3030.79530.50010.5001
771.011.060.87181.26270.31420.68580.50010.5001
781.021.060.86161.27450.35730.67620.50010.5001
791.041.060.8521.28580.4310.63590.50010.5001
801.031.060.84291.29660.40180.56590.50010.5001







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
690.0255-0.03780.00310.00161e-040.0116
700.0414-0.07550.00630.00645e-040.0231
710.0529-0.06610.00550.00494e-040.0202
720.0624-0.06610.00550.00494e-040.0202
730.0707-0.11320.00940.01440.00120.0346
740.0782-0.09440.00790.018e-040.0289
750.0851-0.07550.00630.00645e-040.0231
760.0915-0.04720.00390.00252e-040.0144
770.0975-0.04720.00390.00252e-040.0144
780.1032-0.03780.00310.00161e-040.0116
790.1087-0.01890.00164e-0400.0058
800.1139-0.02830.00249e-041e-040.0087

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
69 & 0.0255 & -0.0378 & 0.0031 & 0.0016 & 1e-04 & 0.0116 \tabularnewline
70 & 0.0414 & -0.0755 & 0.0063 & 0.0064 & 5e-04 & 0.0231 \tabularnewline
71 & 0.0529 & -0.0661 & 0.0055 & 0.0049 & 4e-04 & 0.0202 \tabularnewline
72 & 0.0624 & -0.0661 & 0.0055 & 0.0049 & 4e-04 & 0.0202 \tabularnewline
73 & 0.0707 & -0.1132 & 0.0094 & 0.0144 & 0.0012 & 0.0346 \tabularnewline
74 & 0.0782 & -0.0944 & 0.0079 & 0.01 & 8e-04 & 0.0289 \tabularnewline
75 & 0.0851 & -0.0755 & 0.0063 & 0.0064 & 5e-04 & 0.0231 \tabularnewline
76 & 0.0915 & -0.0472 & 0.0039 & 0.0025 & 2e-04 & 0.0144 \tabularnewline
77 & 0.0975 & -0.0472 & 0.0039 & 0.0025 & 2e-04 & 0.0144 \tabularnewline
78 & 0.1032 & -0.0378 & 0.0031 & 0.0016 & 1e-04 & 0.0116 \tabularnewline
79 & 0.1087 & -0.0189 & 0.0016 & 4e-04 & 0 & 0.0058 \tabularnewline
80 & 0.1139 & -0.0283 & 0.0024 & 9e-04 & 1e-04 & 0.0087 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4685&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.0255[/C][C]-0.0378[/C][C]0.0031[/C][C]0.0016[/C][C]1e-04[/C][C]0.0116[/C][/ROW]
[ROW][C]70[/C][C]0.0414[/C][C]-0.0755[/C][C]0.0063[/C][C]0.0064[/C][C]5e-04[/C][C]0.0231[/C][/ROW]
[ROW][C]71[/C][C]0.0529[/C][C]-0.0661[/C][C]0.0055[/C][C]0.0049[/C][C]4e-04[/C][C]0.0202[/C][/ROW]
[ROW][C]72[/C][C]0.0624[/C][C]-0.0661[/C][C]0.0055[/C][C]0.0049[/C][C]4e-04[/C][C]0.0202[/C][/ROW]
[ROW][C]73[/C][C]0.0707[/C][C]-0.1132[/C][C]0.0094[/C][C]0.0144[/C][C]0.0012[/C][C]0.0346[/C][/ROW]
[ROW][C]74[/C][C]0.0782[/C][C]-0.0944[/C][C]0.0079[/C][C]0.01[/C][C]8e-04[/C][C]0.0289[/C][/ROW]
[ROW][C]75[/C][C]0.0851[/C][C]-0.0755[/C][C]0.0063[/C][C]0.0064[/C][C]5e-04[/C][C]0.0231[/C][/ROW]
[ROW][C]76[/C][C]0.0915[/C][C]-0.0472[/C][C]0.0039[/C][C]0.0025[/C][C]2e-04[/C][C]0.0144[/C][/ROW]
[ROW][C]77[/C][C]0.0975[/C][C]-0.0472[/C][C]0.0039[/C][C]0.0025[/C][C]2e-04[/C][C]0.0144[/C][/ROW]
[ROW][C]78[/C][C]0.1032[/C][C]-0.0378[/C][C]0.0031[/C][C]0.0016[/C][C]1e-04[/C][C]0.0116[/C][/ROW]
[ROW][C]79[/C][C]0.1087[/C][C]-0.0189[/C][C]0.0016[/C][C]4e-04[/C][C]0[/C][C]0.0058[/C][/ROW]
[ROW][C]80[/C][C]0.1139[/C][C]-0.0283[/C][C]0.0024[/C][C]9e-04[/C][C]1e-04[/C][C]0.0087[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4685&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4685&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.0255-0.03780.00310.00161e-040.0116
700.0414-0.07550.00630.00645e-040.0231
710.0529-0.06610.00550.00494e-040.0202
720.0624-0.06610.00550.00494e-040.0202
730.0707-0.11320.00940.01440.00120.0346
740.0782-0.09440.00790.018e-040.0289
750.0851-0.07550.00630.00645e-040.0231
760.0915-0.04720.00390.00252e-040.0144
770.0975-0.04720.00390.00252e-040.0144
780.1032-0.03780.00310.00161e-040.0116
790.1087-0.01890.00164e-0400.0058
800.1139-0.02830.00249e-041e-040.0087



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