Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationFri, 14 Dec 2007 15:45: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/2007/Dec/14/t1197671361uyvxm4y4kddkxun.htm/, Retrieved Fri, 03 May 2024 02:36:29 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3984, Retrieved Fri, 03 May 2024 02:36:29 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact181
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Forecasting BTW v...] [2007-12-14 22:45:08] [757ef2b8266f339cc1cb96dcaefa4cf0] [Current]
Feedback Forum

Post a new message
Dataseries X:
106,0
100,9
114,3
101,2
109,2
111,6
91,7
93,7
105,7
109,5
105,3
102,8
100,6
97,6
110,3
107,2
107,2
108,1
97,1
92,2
112,2
111,6
115,7
111,3
104,2
103,2
112,7
106,4
102,6
110,6
95,2
89,0
112,5
116,8
107,2
113,6
101,8
102,6
122,7
110,3
110,5
121,6
100,3
100,7
123,4
127,1
124,1
131,2
111,6
114,2
130,1
125,9
119,0
133,8
107,5
113,5
134,4
126,8
135,6
139,9
129,8
131,0
153,1
134,1
144,1
155,9
123,3
128,1
144,3
153,0
149,9
150,9
141,0
138,9
157,4
142,9
151,7
161,0
138,6
136,0
151,9




Summary of compuational 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 compuational 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=3984&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]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=3984&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3984&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 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[69])
57134.4-------
58126.8-------
59135.6-------
60139.9-------
61129.8-------
62131-------
63153.1-------
64134.1-------
65144.1-------
66155.9-------
67123.3-------
68128.1-------
69144.3-------
70153146.2323136.6518155.81270.08310.653710.6537
71149.9148.5779138.8002158.35550.39550.18770.99540.8044
72150.9154.6107143.7921165.42920.25070.80330.99620.9691
73141140.5223129.0914151.95320.46740.03760.9670.2586
74138.9142.3545130.2371154.47180.28820.58670.96690.3765
75157.4161.967149.236174.6980.2410.99980.91390.9967
76142.9148.8501135.5217162.17850.19080.10430.9850.7483
77151.7152.1397138.2436166.03580.47530.90380.87160.8656
78161165.1314150.6886179.57430.28750.96580.89490.9977
79138.6135.0313120.0622150.00050.32023e-040.93770.1125
80136140.3077124.8299155.78550.29270.58560.93890.3066
81151.9158.373142.4028174.34310.21350.9970.95790.9579

\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[69]) \tabularnewline
57 & 134.4 & - & - & - & - & - & - & - \tabularnewline
58 & 126.8 & - & - & - & - & - & - & - \tabularnewline
59 & 135.6 & - & - & - & - & - & - & - \tabularnewline
60 & 139.9 & - & - & - & - & - & - & - \tabularnewline
61 & 129.8 & - & - & - & - & - & - & - \tabularnewline
62 & 131 & - & - & - & - & - & - & - \tabularnewline
63 & 153.1 & - & - & - & - & - & - & - \tabularnewline
64 & 134.1 & - & - & - & - & - & - & - \tabularnewline
65 & 144.1 & - & - & - & - & - & - & - \tabularnewline
66 & 155.9 & - & - & - & - & - & - & - \tabularnewline
67 & 123.3 & - & - & - & - & - & - & - \tabularnewline
68 & 128.1 & - & - & - & - & - & - & - \tabularnewline
69 & 144.3 & - & - & - & - & - & - & - \tabularnewline
70 & 153 & 146.2323 & 136.6518 & 155.8127 & 0.0831 & 0.6537 & 1 & 0.6537 \tabularnewline
71 & 149.9 & 148.5779 & 138.8002 & 158.3555 & 0.3955 & 0.1877 & 0.9954 & 0.8044 \tabularnewline
72 & 150.9 & 154.6107 & 143.7921 & 165.4292 & 0.2507 & 0.8033 & 0.9962 & 0.9691 \tabularnewline
73 & 141 & 140.5223 & 129.0914 & 151.9532 & 0.4674 & 0.0376 & 0.967 & 0.2586 \tabularnewline
74 & 138.9 & 142.3545 & 130.2371 & 154.4718 & 0.2882 & 0.5867 & 0.9669 & 0.3765 \tabularnewline
75 & 157.4 & 161.967 & 149.236 & 174.698 & 0.241 & 0.9998 & 0.9139 & 0.9967 \tabularnewline
76 & 142.9 & 148.8501 & 135.5217 & 162.1785 & 0.1908 & 0.1043 & 0.985 & 0.7483 \tabularnewline
77 & 151.7 & 152.1397 & 138.2436 & 166.0358 & 0.4753 & 0.9038 & 0.8716 & 0.8656 \tabularnewline
78 & 161 & 165.1314 & 150.6886 & 179.5743 & 0.2875 & 0.9658 & 0.8949 & 0.9977 \tabularnewline
79 & 138.6 & 135.0313 & 120.0622 & 150.0005 & 0.3202 & 3e-04 & 0.9377 & 0.1125 \tabularnewline
80 & 136 & 140.3077 & 124.8299 & 155.7855 & 0.2927 & 0.5856 & 0.9389 & 0.3066 \tabularnewline
81 & 151.9 & 158.373 & 142.4028 & 174.3431 & 0.2135 & 0.997 & 0.9579 & 0.9579 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3984&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[69])[/C][/ROW]
[ROW][C]57[/C][C]134.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]126.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]135.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]139.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]129.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]131[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]153.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]134.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]144.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]155.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]123.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]128.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]144.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]153[/C][C]146.2323[/C][C]136.6518[/C][C]155.8127[/C][C]0.0831[/C][C]0.6537[/C][C]1[/C][C]0.6537[/C][/ROW]
[ROW][C]71[/C][C]149.9[/C][C]148.5779[/C][C]138.8002[/C][C]158.3555[/C][C]0.3955[/C][C]0.1877[/C][C]0.9954[/C][C]0.8044[/C][/ROW]
[ROW][C]72[/C][C]150.9[/C][C]154.6107[/C][C]143.7921[/C][C]165.4292[/C][C]0.2507[/C][C]0.8033[/C][C]0.9962[/C][C]0.9691[/C][/ROW]
[ROW][C]73[/C][C]141[/C][C]140.5223[/C][C]129.0914[/C][C]151.9532[/C][C]0.4674[/C][C]0.0376[/C][C]0.967[/C][C]0.2586[/C][/ROW]
[ROW][C]74[/C][C]138.9[/C][C]142.3545[/C][C]130.2371[/C][C]154.4718[/C][C]0.2882[/C][C]0.5867[/C][C]0.9669[/C][C]0.3765[/C][/ROW]
[ROW][C]75[/C][C]157.4[/C][C]161.967[/C][C]149.236[/C][C]174.698[/C][C]0.241[/C][C]0.9998[/C][C]0.9139[/C][C]0.9967[/C][/ROW]
[ROW][C]76[/C][C]142.9[/C][C]148.8501[/C][C]135.5217[/C][C]162.1785[/C][C]0.1908[/C][C]0.1043[/C][C]0.985[/C][C]0.7483[/C][/ROW]
[ROW][C]77[/C][C]151.7[/C][C]152.1397[/C][C]138.2436[/C][C]166.0358[/C][C]0.4753[/C][C]0.9038[/C][C]0.8716[/C][C]0.8656[/C][/ROW]
[ROW][C]78[/C][C]161[/C][C]165.1314[/C][C]150.6886[/C][C]179.5743[/C][C]0.2875[/C][C]0.9658[/C][C]0.8949[/C][C]0.9977[/C][/ROW]
[ROW][C]79[/C][C]138.6[/C][C]135.0313[/C][C]120.0622[/C][C]150.0005[/C][C]0.3202[/C][C]3e-04[/C][C]0.9377[/C][C]0.1125[/C][/ROW]
[ROW][C]80[/C][C]136[/C][C]140.3077[/C][C]124.8299[/C][C]155.7855[/C][C]0.2927[/C][C]0.5856[/C][C]0.9389[/C][C]0.3066[/C][/ROW]
[ROW][C]81[/C][C]151.9[/C][C]158.373[/C][C]142.4028[/C][C]174.3431[/C][C]0.2135[/C][C]0.997[/C][C]0.9579[/C][C]0.9579[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3984&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3984&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[69])
57134.4-------
58126.8-------
59135.6-------
60139.9-------
61129.8-------
62131-------
63153.1-------
64134.1-------
65144.1-------
66155.9-------
67123.3-------
68128.1-------
69144.3-------
70153146.2323136.6518155.81270.08310.653710.6537
71149.9148.5779138.8002158.35550.39550.18770.99540.8044
72150.9154.6107143.7921165.42920.25070.80330.99620.9691
73141140.5223129.0914151.95320.46740.03760.9670.2586
74138.9142.3545130.2371154.47180.28820.58670.96690.3765
75157.4161.967149.236174.6980.2410.99980.91390.9967
76142.9148.8501135.5217162.17850.19080.10430.9850.7483
77151.7152.1397138.2436166.03580.47530.90380.87160.8656
78161165.1314150.6886179.57430.28750.96580.89490.9977
79138.6135.0313120.0622150.00050.32023e-040.93770.1125
80136140.3077124.8299155.78550.29270.58560.93890.3066
81151.9158.373142.4028174.34310.21350.9970.95790.9579







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
700.03340.04630.003945.80243.81691.9537
710.03360.00897e-041.7480.14570.3817
720.0357-0.0240.00213.76931.14741.0712
730.04150.00343e-040.22820.0190.1379
740.0434-0.02430.00211.93320.99440.9972
750.0401-0.02820.002320.85741.73811.3184
760.0457-0.040.003335.4042.95031.7177
770.0466-0.00292e-040.19330.01610.1269
780.0446-0.0250.002117.06891.42241.1926
790.05660.02640.002212.73531.06131.0302
800.0563-0.03070.002618.55651.54641.2435
810.0514-0.04090.003441.89953.49161.8686

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
70 & 0.0334 & 0.0463 & 0.0039 & 45.8024 & 3.8169 & 1.9537 \tabularnewline
71 & 0.0336 & 0.0089 & 7e-04 & 1.748 & 0.1457 & 0.3817 \tabularnewline
72 & 0.0357 & -0.024 & 0.002 & 13.7693 & 1.1474 & 1.0712 \tabularnewline
73 & 0.0415 & 0.0034 & 3e-04 & 0.2282 & 0.019 & 0.1379 \tabularnewline
74 & 0.0434 & -0.0243 & 0.002 & 11.9332 & 0.9944 & 0.9972 \tabularnewline
75 & 0.0401 & -0.0282 & 0.0023 & 20.8574 & 1.7381 & 1.3184 \tabularnewline
76 & 0.0457 & -0.04 & 0.0033 & 35.404 & 2.9503 & 1.7177 \tabularnewline
77 & 0.0466 & -0.0029 & 2e-04 & 0.1933 & 0.0161 & 0.1269 \tabularnewline
78 & 0.0446 & -0.025 & 0.0021 & 17.0689 & 1.4224 & 1.1926 \tabularnewline
79 & 0.0566 & 0.0264 & 0.0022 & 12.7353 & 1.0613 & 1.0302 \tabularnewline
80 & 0.0563 & -0.0307 & 0.0026 & 18.5565 & 1.5464 & 1.2435 \tabularnewline
81 & 0.0514 & -0.0409 & 0.0034 & 41.8995 & 3.4916 & 1.8686 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3984&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]70[/C][C]0.0334[/C][C]0.0463[/C][C]0.0039[/C][C]45.8024[/C][C]3.8169[/C][C]1.9537[/C][/ROW]
[ROW][C]71[/C][C]0.0336[/C][C]0.0089[/C][C]7e-04[/C][C]1.748[/C][C]0.1457[/C][C]0.3817[/C][/ROW]
[ROW][C]72[/C][C]0.0357[/C][C]-0.024[/C][C]0.002[/C][C]13.7693[/C][C]1.1474[/C][C]1.0712[/C][/ROW]
[ROW][C]73[/C][C]0.0415[/C][C]0.0034[/C][C]3e-04[/C][C]0.2282[/C][C]0.019[/C][C]0.1379[/C][/ROW]
[ROW][C]74[/C][C]0.0434[/C][C]-0.0243[/C][C]0.002[/C][C]11.9332[/C][C]0.9944[/C][C]0.9972[/C][/ROW]
[ROW][C]75[/C][C]0.0401[/C][C]-0.0282[/C][C]0.0023[/C][C]20.8574[/C][C]1.7381[/C][C]1.3184[/C][/ROW]
[ROW][C]76[/C][C]0.0457[/C][C]-0.04[/C][C]0.0033[/C][C]35.404[/C][C]2.9503[/C][C]1.7177[/C][/ROW]
[ROW][C]77[/C][C]0.0466[/C][C]-0.0029[/C][C]2e-04[/C][C]0.1933[/C][C]0.0161[/C][C]0.1269[/C][/ROW]
[ROW][C]78[/C][C]0.0446[/C][C]-0.025[/C][C]0.0021[/C][C]17.0689[/C][C]1.4224[/C][C]1.1926[/C][/ROW]
[ROW][C]79[/C][C]0.0566[/C][C]0.0264[/C][C]0.0022[/C][C]12.7353[/C][C]1.0613[/C][C]1.0302[/C][/ROW]
[ROW][C]80[/C][C]0.0563[/C][C]-0.0307[/C][C]0.0026[/C][C]18.5565[/C][C]1.5464[/C][C]1.2435[/C][/ROW]
[ROW][C]81[/C][C]0.0514[/C][C]-0.0409[/C][C]0.0034[/C][C]41.8995[/C][C]3.4916[/C][C]1.8686[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3984&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3984&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
700.03340.04630.003945.80243.81691.9537
710.03360.00897e-041.7480.14570.3817
720.0357-0.0240.00213.76931.14741.0712
730.04150.00343e-040.22820.0190.1379
740.0434-0.02430.00211.93320.99440.9972
750.0401-0.02820.002320.85741.73811.3184
760.0457-0.040.003335.4042.95031.7177
770.0466-0.00292e-040.19330.01610.1269
780.0446-0.0250.002117.06891.42241.1926
790.05660.02640.002212.73531.06131.0302
800.0563-0.03070.002618.55651.54641.2435
810.0514-0.04090.003441.89953.49161.8686



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