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 computationSun, 02 Dec 2012 07:02:50 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2012/Dec/02/t1354449791g1hpafkkdaggjtl.htm/, Retrieved Fri, 26 Apr 2024 16:15:59 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=195459, Retrieved Fri, 26 Apr 2024 16:15:59 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact90
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMPD      [ARIMA Forecasting] [ws9] [2012-12-02 12:02:50] [2bcb0f1dab9cffb75c9fd882cacbd29a] [Current]
Feedback Forum

Post a new message
Dataseries X:
88.1
101.7
114.8
103.4
96.4
110
71.1
79.4
119.2
99.1
113.2
103.6
97.5
102.4
120.8
89.5
101.7
112.5
72.4
84.7
117.2
112.8
111.3
102.3
95.2
103
116.4
95.1
100.7
112.4
75.3
93.3
118.6
118.7
110.7
113.3
89.5
106.3
115.1
105.7
95.8
114.7
79.6
80.6
125
127.5
99.5
104.3
90
96
108.9
95.8
87.2
108.4
74.9
80.8
119.1
107.9
106.9
96.8
93.7
95.2
112.7
98.5
91.5
112
76.7
84.7
114.9
108.4
104.6
111.3
90.8
109.1
121
95.2
110.5
102.4
86.7
99.1
126
110.3
104.6
103.1
102




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time4 seconds
R Server'Herman Ole Andreas Wold' @ wold.wessa.net

\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 & 4 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ wold.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=195459&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]4 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ wold.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=195459&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=195459&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 time4 seconds
R Server'Herman Ole Andreas Wold' @ wold.wessa.net







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[73])
6193.7-------
6295.2-------
63112.7-------
6498.5-------
6591.5-------
66112-------
6776.7-------
6884.7-------
69114.9-------
70108.4-------
71104.6-------
72111.3-------
7390.8-------
74109.1101.873391.9187111.54370.07150.98760.91190.9876
75121116.5808106.9635125.96540.1780.94090.79121
7695.299.07488.7238109.10890.224600.54460.947
77110.597.436586.9132107.62860.0060.66640.87320.8991
78102.4112.8143102.7487122.61690.01870.67820.56471
7986.775.550664.044186.55160.023500.41890.0033
8099.185.110574.030595.77240.00510.38510.53010.1478
81126118.5372108.5705128.25830.066210.76831
82110.3113.5369103.4282123.38220.25970.00650.84681
83104.6107.209796.9153117.21520.30460.27250.69540.9993
84103.1109.07798.8404119.03270.11970.81090.33080.9998
8510291.335980.6176101.68860.02170.0130.54040.5404

\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[73]) \tabularnewline
61 & 93.7 & - & - & - & - & - & - & - \tabularnewline
62 & 95.2 & - & - & - & - & - & - & - \tabularnewline
63 & 112.7 & - & - & - & - & - & - & - \tabularnewline
64 & 98.5 & - & - & - & - & - & - & - \tabularnewline
65 & 91.5 & - & - & - & - & - & - & - \tabularnewline
66 & 112 & - & - & - & - & - & - & - \tabularnewline
67 & 76.7 & - & - & - & - & - & - & - \tabularnewline
68 & 84.7 & - & - & - & - & - & - & - \tabularnewline
69 & 114.9 & - & - & - & - & - & - & - \tabularnewline
70 & 108.4 & - & - & - & - & - & - & - \tabularnewline
71 & 104.6 & - & - & - & - & - & - & - \tabularnewline
72 & 111.3 & - & - & - & - & - & - & - \tabularnewline
73 & 90.8 & - & - & - & - & - & - & - \tabularnewline
74 & 109.1 & 101.8733 & 91.9187 & 111.5437 & 0.0715 & 0.9876 & 0.9119 & 0.9876 \tabularnewline
75 & 121 & 116.5808 & 106.9635 & 125.9654 & 0.178 & 0.9409 & 0.7912 & 1 \tabularnewline
76 & 95.2 & 99.074 & 88.7238 & 109.1089 & 0.2246 & 0 & 0.5446 & 0.947 \tabularnewline
77 & 110.5 & 97.4365 & 86.9132 & 107.6286 & 0.006 & 0.6664 & 0.8732 & 0.8991 \tabularnewline
78 & 102.4 & 112.8143 & 102.7487 & 122.6169 & 0.0187 & 0.6782 & 0.5647 & 1 \tabularnewline
79 & 86.7 & 75.5506 & 64.0441 & 86.5516 & 0.0235 & 0 & 0.4189 & 0.0033 \tabularnewline
80 & 99.1 & 85.1105 & 74.0305 & 95.7724 & 0.0051 & 0.3851 & 0.5301 & 0.1478 \tabularnewline
81 & 126 & 118.5372 & 108.5705 & 128.2583 & 0.0662 & 1 & 0.7683 & 1 \tabularnewline
82 & 110.3 & 113.5369 & 103.4282 & 123.3822 & 0.2597 & 0.0065 & 0.8468 & 1 \tabularnewline
83 & 104.6 & 107.2097 & 96.9153 & 117.2152 & 0.3046 & 0.2725 & 0.6954 & 0.9993 \tabularnewline
84 & 103.1 & 109.077 & 98.8404 & 119.0327 & 0.1197 & 0.8109 & 0.3308 & 0.9998 \tabularnewline
85 & 102 & 91.3359 & 80.6176 & 101.6886 & 0.0217 & 0.013 & 0.5404 & 0.5404 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=195459&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[73])[/C][/ROW]
[ROW][C]61[/C][C]93.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]95.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]112.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]98.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]91.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]112[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]76.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]84.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]114.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]108.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]104.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]111.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]90.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]109.1[/C][C]101.8733[/C][C]91.9187[/C][C]111.5437[/C][C]0.0715[/C][C]0.9876[/C][C]0.9119[/C][C]0.9876[/C][/ROW]
[ROW][C]75[/C][C]121[/C][C]116.5808[/C][C]106.9635[/C][C]125.9654[/C][C]0.178[/C][C]0.9409[/C][C]0.7912[/C][C]1[/C][/ROW]
[ROW][C]76[/C][C]95.2[/C][C]99.074[/C][C]88.7238[/C][C]109.1089[/C][C]0.2246[/C][C]0[/C][C]0.5446[/C][C]0.947[/C][/ROW]
[ROW][C]77[/C][C]110.5[/C][C]97.4365[/C][C]86.9132[/C][C]107.6286[/C][C]0.006[/C][C]0.6664[/C][C]0.8732[/C][C]0.8991[/C][/ROW]
[ROW][C]78[/C][C]102.4[/C][C]112.8143[/C][C]102.7487[/C][C]122.6169[/C][C]0.0187[/C][C]0.6782[/C][C]0.5647[/C][C]1[/C][/ROW]
[ROW][C]79[/C][C]86.7[/C][C]75.5506[/C][C]64.0441[/C][C]86.5516[/C][C]0.0235[/C][C]0[/C][C]0.4189[/C][C]0.0033[/C][/ROW]
[ROW][C]80[/C][C]99.1[/C][C]85.1105[/C][C]74.0305[/C][C]95.7724[/C][C]0.0051[/C][C]0.3851[/C][C]0.5301[/C][C]0.1478[/C][/ROW]
[ROW][C]81[/C][C]126[/C][C]118.5372[/C][C]108.5705[/C][C]128.2583[/C][C]0.0662[/C][C]1[/C][C]0.7683[/C][C]1[/C][/ROW]
[ROW][C]82[/C][C]110.3[/C][C]113.5369[/C][C]103.4282[/C][C]123.3822[/C][C]0.2597[/C][C]0.0065[/C][C]0.8468[/C][C]1[/C][/ROW]
[ROW][C]83[/C][C]104.6[/C][C]107.2097[/C][C]96.9153[/C][C]117.2152[/C][C]0.3046[/C][C]0.2725[/C][C]0.6954[/C][C]0.9993[/C][/ROW]
[ROW][C]84[/C][C]103.1[/C][C]109.077[/C][C]98.8404[/C][C]119.0327[/C][C]0.1197[/C][C]0.8109[/C][C]0.3308[/C][C]0.9998[/C][/ROW]
[ROW][C]85[/C][C]102[/C][C]91.3359[/C][C]80.6176[/C][C]101.6886[/C][C]0.0217[/C][C]0.013[/C][C]0.5404[/C][C]0.5404[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=195459&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=195459&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[73])
6193.7-------
6295.2-------
63112.7-------
6498.5-------
6591.5-------
66112-------
6776.7-------
6884.7-------
69114.9-------
70108.4-------
71104.6-------
72111.3-------
7390.8-------
74109.1101.873391.9187111.54370.07150.98760.91190.9876
75121116.5808106.9635125.96540.1780.94090.79121
7695.299.07488.7238109.10890.224600.54460.947
77110.597.436586.9132107.62860.0060.66640.87320.8991
78102.4112.8143102.7487122.61690.01870.67820.56471
7986.775.550664.044186.55160.023500.41890.0033
8099.185.110574.030595.77240.00510.38510.53010.1478
81126118.5372108.5705128.25830.066210.76831
82110.3113.5369103.4282123.38220.25970.00650.84681
83104.6107.209796.9153117.21520.30460.27250.69540.9993
84103.1109.07798.8404119.03270.11970.81090.33080.9998
8510291.335980.6176101.68860.02170.0130.54040.5404







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
740.04840.0709052.225600
750.04110.03790.054419.529635.87765.9898
760.0517-0.03910.049315.007728.9215.3778
770.05340.13410.0705170.654564.35438.0221
780.0443-0.09230.0749108.457273.17498.5542
790.07430.14760.087124.309881.69749.0387
800.06390.16440.098195.706697.98449.8987
810.04180.0630.093755.693292.6989.628
820.0442-0.02850.086410.477783.56249.1412
830.0476-0.02430.08026.810675.88728.7113
840.0466-0.05480.077935.724772.23618.4992
850.05780.11680.0811113.72375.69338.7002

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
74 & 0.0484 & 0.0709 & 0 & 52.2256 & 0 & 0 \tabularnewline
75 & 0.0411 & 0.0379 & 0.0544 & 19.5296 & 35.8776 & 5.9898 \tabularnewline
76 & 0.0517 & -0.0391 & 0.0493 & 15.0077 & 28.921 & 5.3778 \tabularnewline
77 & 0.0534 & 0.1341 & 0.0705 & 170.6545 & 64.3543 & 8.0221 \tabularnewline
78 & 0.0443 & -0.0923 & 0.0749 & 108.4572 & 73.1749 & 8.5542 \tabularnewline
79 & 0.0743 & 0.1476 & 0.087 & 124.3098 & 81.6974 & 9.0387 \tabularnewline
80 & 0.0639 & 0.1644 & 0.098 & 195.7066 & 97.9844 & 9.8987 \tabularnewline
81 & 0.0418 & 0.063 & 0.0937 & 55.6932 & 92.698 & 9.628 \tabularnewline
82 & 0.0442 & -0.0285 & 0.0864 & 10.4777 & 83.5624 & 9.1412 \tabularnewline
83 & 0.0476 & -0.0243 & 0.0802 & 6.8106 & 75.8872 & 8.7113 \tabularnewline
84 & 0.0466 & -0.0548 & 0.0779 & 35.7247 & 72.2361 & 8.4992 \tabularnewline
85 & 0.0578 & 0.1168 & 0.0811 & 113.723 & 75.6933 & 8.7002 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=195459&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]74[/C][C]0.0484[/C][C]0.0709[/C][C]0[/C][C]52.2256[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]75[/C][C]0.0411[/C][C]0.0379[/C][C]0.0544[/C][C]19.5296[/C][C]35.8776[/C][C]5.9898[/C][/ROW]
[ROW][C]76[/C][C]0.0517[/C][C]-0.0391[/C][C]0.0493[/C][C]15.0077[/C][C]28.921[/C][C]5.3778[/C][/ROW]
[ROW][C]77[/C][C]0.0534[/C][C]0.1341[/C][C]0.0705[/C][C]170.6545[/C][C]64.3543[/C][C]8.0221[/C][/ROW]
[ROW][C]78[/C][C]0.0443[/C][C]-0.0923[/C][C]0.0749[/C][C]108.4572[/C][C]73.1749[/C][C]8.5542[/C][/ROW]
[ROW][C]79[/C][C]0.0743[/C][C]0.1476[/C][C]0.087[/C][C]124.3098[/C][C]81.6974[/C][C]9.0387[/C][/ROW]
[ROW][C]80[/C][C]0.0639[/C][C]0.1644[/C][C]0.098[/C][C]195.7066[/C][C]97.9844[/C][C]9.8987[/C][/ROW]
[ROW][C]81[/C][C]0.0418[/C][C]0.063[/C][C]0.0937[/C][C]55.6932[/C][C]92.698[/C][C]9.628[/C][/ROW]
[ROW][C]82[/C][C]0.0442[/C][C]-0.0285[/C][C]0.0864[/C][C]10.4777[/C][C]83.5624[/C][C]9.1412[/C][/ROW]
[ROW][C]83[/C][C]0.0476[/C][C]-0.0243[/C][C]0.0802[/C][C]6.8106[/C][C]75.8872[/C][C]8.7113[/C][/ROW]
[ROW][C]84[/C][C]0.0466[/C][C]-0.0548[/C][C]0.0779[/C][C]35.7247[/C][C]72.2361[/C][C]8.4992[/C][/ROW]
[ROW][C]85[/C][C]0.0578[/C][C]0.1168[/C][C]0.0811[/C][C]113.723[/C][C]75.6933[/C][C]8.7002[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=195459&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=195459&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
740.04840.0709052.225600
750.04110.03790.054419.529635.87765.9898
760.0517-0.03910.049315.007728.9215.3778
770.05340.13410.0705170.654564.35438.0221
780.0443-0.09230.0749108.457273.17498.5542
790.07430.14760.087124.309881.69749.0387
800.06390.16440.098195.706697.98449.8987
810.04180.0630.093755.693292.6989.628
820.0442-0.02850.086410.477783.56249.1412
830.0476-0.02430.08026.810675.88728.7113
840.0466-0.05480.077935.724772.23618.4992
850.05780.11680.0811113.72375.69338.7002



Parameters (Session):
par1 = 12 ; par2 = 1.3 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 1 ; par10 = TRUE ;
Parameters (R input):
par1 = 12 ; par2 = 1.3 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 2 ; par9 = 1 ; par10 = TRUE ;
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,par1))
(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.mape1 <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.mse1 <- 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.se[i] = (x[nx+i] - forecast$pred[i])^2
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[1] = abs(perf.pe[1])
perf.mse[1] = abs(perf.se[1])
for (i in 2:fx) {
perf.mape[i] = perf.mape[i-1] + abs(perf.pe[i])
perf.mape1[i] = perf.mape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
}
perf.rmse = sqrt(perf.mse1)
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:par1] <- 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.mape1[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse1[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')