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 computationMon, 21 Dec 2009 10:10:18 -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/21/t126141564445axhjjmpxj5zvs.htm/, Retrieved Wed, 08 May 2024 02:12:27 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=70346, Retrieved Wed, 08 May 2024 02:12:27 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact137
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] [ARIMA FORECAST JD...] [2009-12-21 17:10:18] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
102.9
105.9
117.6
113.6
115.9
118.9
77.6
81.2
123.1
136.6
112.1
95.1
96.3
105.7
115.8
105.7
105.7
111.1
82.4
60
107.3
99.3
113.5
108.9
100.2
103.9
138.7
120.2
100.2
143.2
70.9
85.2
133
136.6
117.9
106.3
122.3
125.5
148.4
126.3
99.6
140.4
80.3
92.6
138.5
110.9
119.6
105
109
129.4
148.6
101.4
134.8
143.7
81.6
90.3
141.5
140.7
140.2
100.2
125.7
119.6
134.7
109
116.3
146.9
97.4
89.4
132.1
139.8
129
112.5
121.9
121.7
123.1
131.6
119.3
132.5
98.3
85.1
131.7
129.3
90.7
78.6
68.9
79.1
83.5
74.1
59.7
93.3
61.3
56.6
98.5




Summary of computational 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 computational 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=70346&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]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=70346&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70346&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 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[81])
69132.1-------
70139.8-------
71129-------
72112.5-------
73121.9-------
74121.7-------
75123.1-------
76131.6-------
77119.3-------
78132.5-------
7998.3-------
8085.1-------
81131.7-------
82129.3134.2358112.3919156.07960.32890.590.30880.59
8390.7128.9691106.8919151.04633e-040.48830.49890.4042
8478.6111.585889.2777133.89380.00190.96670.4680.0386
8568.9119.475497.0563141.894500.99980.41610.1426
8679.1124.2468101.6049146.8887010.58720.2594
8783.5140.704117.8415163.5665010.93440.7799
8874.1123.6897100.6087146.770700.99970.25090.2482
8959.7121.40498.1065144.7015010.57020.1932
9093.3142.104118.592165.6159010.78830.8071
9161.392.361168.6366116.08560.00510.46910.31186e-04
9256.691.689767.7545115.62480.0020.99360.70535e-04
9398.5137.8897113.7457162.03367e-0410.69230.6923

\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[81]) \tabularnewline
69 & 132.1 & - & - & - & - & - & - & - \tabularnewline
70 & 139.8 & - & - & - & - & - & - & - \tabularnewline
71 & 129 & - & - & - & - & - & - & - \tabularnewline
72 & 112.5 & - & - & - & - & - & - & - \tabularnewline
73 & 121.9 & - & - & - & - & - & - & - \tabularnewline
74 & 121.7 & - & - & - & - & - & - & - \tabularnewline
75 & 123.1 & - & - & - & - & - & - & - \tabularnewline
76 & 131.6 & - & - & - & - & - & - & - \tabularnewline
77 & 119.3 & - & - & - & - & - & - & - \tabularnewline
78 & 132.5 & - & - & - & - & - & - & - \tabularnewline
79 & 98.3 & - & - & - & - & - & - & - \tabularnewline
80 & 85.1 & - & - & - & - & - & - & - \tabularnewline
81 & 131.7 & - & - & - & - & - & - & - \tabularnewline
82 & 129.3 & 134.2358 & 112.3919 & 156.0796 & 0.3289 & 0.59 & 0.3088 & 0.59 \tabularnewline
83 & 90.7 & 128.9691 & 106.8919 & 151.0463 & 3e-04 & 0.4883 & 0.4989 & 0.4042 \tabularnewline
84 & 78.6 & 111.5858 & 89.2777 & 133.8938 & 0.0019 & 0.9667 & 0.468 & 0.0386 \tabularnewline
85 & 68.9 & 119.4754 & 97.0563 & 141.8945 & 0 & 0.9998 & 0.4161 & 0.1426 \tabularnewline
86 & 79.1 & 124.2468 & 101.6049 & 146.8887 & 0 & 1 & 0.5872 & 0.2594 \tabularnewline
87 & 83.5 & 140.704 & 117.8415 & 163.5665 & 0 & 1 & 0.9344 & 0.7799 \tabularnewline
88 & 74.1 & 123.6897 & 100.6087 & 146.7707 & 0 & 0.9997 & 0.2509 & 0.2482 \tabularnewline
89 & 59.7 & 121.404 & 98.1065 & 144.7015 & 0 & 1 & 0.5702 & 0.1932 \tabularnewline
90 & 93.3 & 142.104 & 118.592 & 165.6159 & 0 & 1 & 0.7883 & 0.8071 \tabularnewline
91 & 61.3 & 92.3611 & 68.6366 & 116.0856 & 0.0051 & 0.4691 & 0.3118 & 6e-04 \tabularnewline
92 & 56.6 & 91.6897 & 67.7545 & 115.6248 & 0.002 & 0.9936 & 0.7053 & 5e-04 \tabularnewline
93 & 98.5 & 137.8897 & 113.7457 & 162.0336 & 7e-04 & 1 & 0.6923 & 0.6923 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=70346&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[81])[/C][/ROW]
[ROW][C]69[/C][C]132.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]139.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]129[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]112.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]121.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]121.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]123.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]131.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]119.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]132.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]98.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]85.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]131.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]129.3[/C][C]134.2358[/C][C]112.3919[/C][C]156.0796[/C][C]0.3289[/C][C]0.59[/C][C]0.3088[/C][C]0.59[/C][/ROW]
[ROW][C]83[/C][C]90.7[/C][C]128.9691[/C][C]106.8919[/C][C]151.0463[/C][C]3e-04[/C][C]0.4883[/C][C]0.4989[/C][C]0.4042[/C][/ROW]
[ROW][C]84[/C][C]78.6[/C][C]111.5858[/C][C]89.2777[/C][C]133.8938[/C][C]0.0019[/C][C]0.9667[/C][C]0.468[/C][C]0.0386[/C][/ROW]
[ROW][C]85[/C][C]68.9[/C][C]119.4754[/C][C]97.0563[/C][C]141.8945[/C][C]0[/C][C]0.9998[/C][C]0.4161[/C][C]0.1426[/C][/ROW]
[ROW][C]86[/C][C]79.1[/C][C]124.2468[/C][C]101.6049[/C][C]146.8887[/C][C]0[/C][C]1[/C][C]0.5872[/C][C]0.2594[/C][/ROW]
[ROW][C]87[/C][C]83.5[/C][C]140.704[/C][C]117.8415[/C][C]163.5665[/C][C]0[/C][C]1[/C][C]0.9344[/C][C]0.7799[/C][/ROW]
[ROW][C]88[/C][C]74.1[/C][C]123.6897[/C][C]100.6087[/C][C]146.7707[/C][C]0[/C][C]0.9997[/C][C]0.2509[/C][C]0.2482[/C][/ROW]
[ROW][C]89[/C][C]59.7[/C][C]121.404[/C][C]98.1065[/C][C]144.7015[/C][C]0[/C][C]1[/C][C]0.5702[/C][C]0.1932[/C][/ROW]
[ROW][C]90[/C][C]93.3[/C][C]142.104[/C][C]118.592[/C][C]165.6159[/C][C]0[/C][C]1[/C][C]0.7883[/C][C]0.8071[/C][/ROW]
[ROW][C]91[/C][C]61.3[/C][C]92.3611[/C][C]68.6366[/C][C]116.0856[/C][C]0.0051[/C][C]0.4691[/C][C]0.3118[/C][C]6e-04[/C][/ROW]
[ROW][C]92[/C][C]56.6[/C][C]91.6897[/C][C]67.7545[/C][C]115.6248[/C][C]0.002[/C][C]0.9936[/C][C]0.7053[/C][C]5e-04[/C][/ROW]
[ROW][C]93[/C][C]98.5[/C][C]137.8897[/C][C]113.7457[/C][C]162.0336[/C][C]7e-04[/C][C]1[/C][C]0.6923[/C][C]0.6923[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=70346&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70346&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[81])
69132.1-------
70139.8-------
71129-------
72112.5-------
73121.9-------
74121.7-------
75123.1-------
76131.6-------
77119.3-------
78132.5-------
7998.3-------
8085.1-------
81131.7-------
82129.3134.2358112.3919156.07960.32890.590.30880.59
8390.7128.9691106.8919151.04633e-040.48830.49890.4042
8478.6111.585889.2777133.89380.00190.96670.4680.0386
8568.9119.475497.0563141.894500.99980.41610.1426
8679.1124.2468101.6049146.8887010.58720.2594
8783.5140.704117.8415163.5665010.93440.7799
8874.1123.6897100.6087146.770700.99970.25090.2482
8959.7121.40498.1065144.7015010.57020.1932
9093.3142.104118.592165.6159010.78830.8071
9161.392.361168.6366116.08560.00510.46910.31186e-04
9256.691.689767.7545115.62480.0020.99360.70535e-04
9398.5137.8897113.7457162.03367e-0410.69230.6923







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
820.083-0.03680.003124.36182.03021.4248
830.0873-0.29670.02471464.5245122.043711.0473
840.102-0.29560.02461088.060890.67179.5222
850.0957-0.42330.03532557.8706213.155914.5999
860.093-0.36340.03032038.2357169.85313.0328
870.0829-0.40660.03393272.2937272.691116.5134
880.0952-0.40090.03342459.1367204.928114.3153
890.0979-0.50830.04243807.38317.281717.8124
900.0844-0.34340.02862381.8275198.485614.0885
910.1311-0.33630.028964.793380.39948.9666
920.1332-0.38270.03191231.2867102.607210.1295
930.0893-0.28570.02381551.5479129.295711.3708

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
82 & 0.083 & -0.0368 & 0.0031 & 24.3618 & 2.0302 & 1.4248 \tabularnewline
83 & 0.0873 & -0.2967 & 0.0247 & 1464.5245 & 122.0437 & 11.0473 \tabularnewline
84 & 0.102 & -0.2956 & 0.0246 & 1088.0608 & 90.6717 & 9.5222 \tabularnewline
85 & 0.0957 & -0.4233 & 0.0353 & 2557.8706 & 213.1559 & 14.5999 \tabularnewline
86 & 0.093 & -0.3634 & 0.0303 & 2038.2357 & 169.853 & 13.0328 \tabularnewline
87 & 0.0829 & -0.4066 & 0.0339 & 3272.2937 & 272.6911 & 16.5134 \tabularnewline
88 & 0.0952 & -0.4009 & 0.0334 & 2459.1367 & 204.9281 & 14.3153 \tabularnewline
89 & 0.0979 & -0.5083 & 0.0424 & 3807.38 & 317.2817 & 17.8124 \tabularnewline
90 & 0.0844 & -0.3434 & 0.0286 & 2381.8275 & 198.4856 & 14.0885 \tabularnewline
91 & 0.1311 & -0.3363 & 0.028 & 964.7933 & 80.3994 & 8.9666 \tabularnewline
92 & 0.1332 & -0.3827 & 0.0319 & 1231.2867 & 102.6072 & 10.1295 \tabularnewline
93 & 0.0893 & -0.2857 & 0.0238 & 1551.5479 & 129.2957 & 11.3708 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=70346&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]82[/C][C]0.083[/C][C]-0.0368[/C][C]0.0031[/C][C]24.3618[/C][C]2.0302[/C][C]1.4248[/C][/ROW]
[ROW][C]83[/C][C]0.0873[/C][C]-0.2967[/C][C]0.0247[/C][C]1464.5245[/C][C]122.0437[/C][C]11.0473[/C][/ROW]
[ROW][C]84[/C][C]0.102[/C][C]-0.2956[/C][C]0.0246[/C][C]1088.0608[/C][C]90.6717[/C][C]9.5222[/C][/ROW]
[ROW][C]85[/C][C]0.0957[/C][C]-0.4233[/C][C]0.0353[/C][C]2557.8706[/C][C]213.1559[/C][C]14.5999[/C][/ROW]
[ROW][C]86[/C][C]0.093[/C][C]-0.3634[/C][C]0.0303[/C][C]2038.2357[/C][C]169.853[/C][C]13.0328[/C][/ROW]
[ROW][C]87[/C][C]0.0829[/C][C]-0.4066[/C][C]0.0339[/C][C]3272.2937[/C][C]272.6911[/C][C]16.5134[/C][/ROW]
[ROW][C]88[/C][C]0.0952[/C][C]-0.4009[/C][C]0.0334[/C][C]2459.1367[/C][C]204.9281[/C][C]14.3153[/C][/ROW]
[ROW][C]89[/C][C]0.0979[/C][C]-0.5083[/C][C]0.0424[/C][C]3807.38[/C][C]317.2817[/C][C]17.8124[/C][/ROW]
[ROW][C]90[/C][C]0.0844[/C][C]-0.3434[/C][C]0.0286[/C][C]2381.8275[/C][C]198.4856[/C][C]14.0885[/C][/ROW]
[ROW][C]91[/C][C]0.1311[/C][C]-0.3363[/C][C]0.028[/C][C]964.7933[/C][C]80.3994[/C][C]8.9666[/C][/ROW]
[ROW][C]92[/C][C]0.1332[/C][C]-0.3827[/C][C]0.0319[/C][C]1231.2867[/C][C]102.6072[/C][C]10.1295[/C][/ROW]
[ROW][C]93[/C][C]0.0893[/C][C]-0.2857[/C][C]0.0238[/C][C]1551.5479[/C][C]129.2957[/C][C]11.3708[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=70346&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=70346&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
820.083-0.03680.003124.36182.03021.4248
830.0873-0.29670.02471464.5245122.043711.0473
840.102-0.29560.02461088.060890.67179.5222
850.0957-0.42330.03532557.8706213.155914.5999
860.093-0.36340.03032038.2357169.85313.0328
870.0829-0.40660.03393272.2937272.691116.5134
880.0952-0.40090.03342459.1367204.928114.3153
890.0979-0.50830.04243807.38317.281717.8124
900.0844-0.34340.02862381.8275198.485614.0885
910.1311-0.33630.028964.793380.39948.9666
920.1332-0.38270.03191231.2867102.607210.1295
930.0893-0.28570.02381551.5479129.295711.3708



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