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, 15 Dec 2008 11:40:46 -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/2008/Dec/15/t1229366517ypu7ybzo622oomq.htm/, Retrieved Wed, 15 May 2024 21:41:17 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33779, Retrieved Wed, 15 May 2024 21:41:17 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact221
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Univariate Data Series] [Airline data] [2007-10-18 09:58:47] [42daae401fd3def69a25014f2252b4c2]
F RMPD  [Variance Reduction Matrix] [] [2008-12-01 21:17:37] [cb714085b233acee8e8acd879ea442b6]
- RMPD      [ARIMA Forecasting] [] [2008-12-15 18:40:46] [787873b6436f665b5b192a0bdb2e43c9] [Current]
Feedback Forum

Post a new message
Dataseries X:
13.92
13.22
13.31
12.91
13.19
12.92
13.43
13.72
13.97
14.91
14.46
14.12
14.23
15.04
14.80
14.49
15.14
14.34
15.12
15.14
14.34
14.36
14.91
15.56
16.50
15.57
15.14
15.19
15.07
14.48
14.27
14.72
14.65
14.38
13.95
14.85
14.87
14.83
15.03
15.47
16.21
16.55
17.04
17.22
17.47
17.75
17.84
18.47
18.38
18.55
18.39
18.88
20.21
19.67
20.09
18.78
19.74
20.64
20.34
21.75
22.10
22.81
22.91
22.46
21.78
25.05
23.70
23.02
24.34
24.15
25.85
26.42
26.54
26.36
26.99
27.52
26.63
26.26
24.86
26.84
26.57
24.67
27.24
27.77
27.61
27.27
28.46
26.97
29.95
29.88
29.67
31.19
30.24
30.03
31.02
30.45
31.70
32.10
32.32
32.18
33.43
33.07
35.32
35.17
35.29
37.89
38.32
37.07
39.77
39.20
40.46
44.95
41.69
41.88
45.86




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=33779&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=33779&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33779&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[103])
9129.67-------
9231.19-------
9330.24-------
9430.03-------
9531.02-------
9630.45-------
9731.7-------
9832.1-------
9932.32-------
10032.18-------
10133.43-------
10233.07-------
10335.32-------
10435.1736.57932.880440.83720.25830.71890.99340.7189
10535.2935.603531.362440.62150.45130.56720.98190.5441
10637.8934.158329.6739.57070.08830.3410.93250.337
10738.3236.552731.221643.13030.29920.34510.95040.6433
10837.0736.509630.79343.68630.43920.31050.9510.6274
10939.7737.258431.023845.22480.26830.51850.91430.6833
11039.237.296630.712845.83950.33120.28520.88340.6749
11140.4638.245731.121747.64370.32210.42110.89170.7291
11244.9537.144329.981646.70050.05470.24820.84570.6459
11341.6939.994131.826251.11050.38250.19110.87640.7951
11441.8839.69931.319751.24230.35560.36770.86980.7714
11545.8641.085632.052553.72790.22960.4510.81430.8143

\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[103]) \tabularnewline
91 & 29.67 & - & - & - & - & - & - & - \tabularnewline
92 & 31.19 & - & - & - & - & - & - & - \tabularnewline
93 & 30.24 & - & - & - & - & - & - & - \tabularnewline
94 & 30.03 & - & - & - & - & - & - & - \tabularnewline
95 & 31.02 & - & - & - & - & - & - & - \tabularnewline
96 & 30.45 & - & - & - & - & - & - & - \tabularnewline
97 & 31.7 & - & - & - & - & - & - & - \tabularnewline
98 & 32.1 & - & - & - & - & - & - & - \tabularnewline
99 & 32.32 & - & - & - & - & - & - & - \tabularnewline
100 & 32.18 & - & - & - & - & - & - & - \tabularnewline
101 & 33.43 & - & - & - & - & - & - & - \tabularnewline
102 & 33.07 & - & - & - & - & - & - & - \tabularnewline
103 & 35.32 & - & - & - & - & - & - & - \tabularnewline
104 & 35.17 & 36.579 & 32.8804 & 40.8372 & 0.2583 & 0.7189 & 0.9934 & 0.7189 \tabularnewline
105 & 35.29 & 35.6035 & 31.3624 & 40.6215 & 0.4513 & 0.5672 & 0.9819 & 0.5441 \tabularnewline
106 & 37.89 & 34.1583 & 29.67 & 39.5707 & 0.0883 & 0.341 & 0.9325 & 0.337 \tabularnewline
107 & 38.32 & 36.5527 & 31.2216 & 43.1303 & 0.2992 & 0.3451 & 0.9504 & 0.6433 \tabularnewline
108 & 37.07 & 36.5096 & 30.793 & 43.6863 & 0.4392 & 0.3105 & 0.951 & 0.6274 \tabularnewline
109 & 39.77 & 37.2584 & 31.0238 & 45.2248 & 0.2683 & 0.5185 & 0.9143 & 0.6833 \tabularnewline
110 & 39.2 & 37.2966 & 30.7128 & 45.8395 & 0.3312 & 0.2852 & 0.8834 & 0.6749 \tabularnewline
111 & 40.46 & 38.2457 & 31.1217 & 47.6437 & 0.3221 & 0.4211 & 0.8917 & 0.7291 \tabularnewline
112 & 44.95 & 37.1443 & 29.9816 & 46.7005 & 0.0547 & 0.2482 & 0.8457 & 0.6459 \tabularnewline
113 & 41.69 & 39.9941 & 31.8262 & 51.1105 & 0.3825 & 0.1911 & 0.8764 & 0.7951 \tabularnewline
114 & 41.88 & 39.699 & 31.3197 & 51.2423 & 0.3556 & 0.3677 & 0.8698 & 0.7714 \tabularnewline
115 & 45.86 & 41.0856 & 32.0525 & 53.7279 & 0.2296 & 0.451 & 0.8143 & 0.8143 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33779&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[103])[/C][/ROW]
[ROW][C]91[/C][C]29.67[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]92[/C][C]31.19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]93[/C][C]30.24[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]30.03[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]31.02[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]30.45[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]31.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]32.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]32.32[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]32.18[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]33.43[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]33.07[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]35.32[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]35.17[/C][C]36.579[/C][C]32.8804[/C][C]40.8372[/C][C]0.2583[/C][C]0.7189[/C][C]0.9934[/C][C]0.7189[/C][/ROW]
[ROW][C]105[/C][C]35.29[/C][C]35.6035[/C][C]31.3624[/C][C]40.6215[/C][C]0.4513[/C][C]0.5672[/C][C]0.9819[/C][C]0.5441[/C][/ROW]
[ROW][C]106[/C][C]37.89[/C][C]34.1583[/C][C]29.67[/C][C]39.5707[/C][C]0.0883[/C][C]0.341[/C][C]0.9325[/C][C]0.337[/C][/ROW]
[ROW][C]107[/C][C]38.32[/C][C]36.5527[/C][C]31.2216[/C][C]43.1303[/C][C]0.2992[/C][C]0.3451[/C][C]0.9504[/C][C]0.6433[/C][/ROW]
[ROW][C]108[/C][C]37.07[/C][C]36.5096[/C][C]30.793[/C][C]43.6863[/C][C]0.4392[/C][C]0.3105[/C][C]0.951[/C][C]0.6274[/C][/ROW]
[ROW][C]109[/C][C]39.77[/C][C]37.2584[/C][C]31.0238[/C][C]45.2248[/C][C]0.2683[/C][C]0.5185[/C][C]0.9143[/C][C]0.6833[/C][/ROW]
[ROW][C]110[/C][C]39.2[/C][C]37.2966[/C][C]30.7128[/C][C]45.8395[/C][C]0.3312[/C][C]0.2852[/C][C]0.8834[/C][C]0.6749[/C][/ROW]
[ROW][C]111[/C][C]40.46[/C][C]38.2457[/C][C]31.1217[/C][C]47.6437[/C][C]0.3221[/C][C]0.4211[/C][C]0.8917[/C][C]0.7291[/C][/ROW]
[ROW][C]112[/C][C]44.95[/C][C]37.1443[/C][C]29.9816[/C][C]46.7005[/C][C]0.0547[/C][C]0.2482[/C][C]0.8457[/C][C]0.6459[/C][/ROW]
[ROW][C]113[/C][C]41.69[/C][C]39.9941[/C][C]31.8262[/C][C]51.1105[/C][C]0.3825[/C][C]0.1911[/C][C]0.8764[/C][C]0.7951[/C][/ROW]
[ROW][C]114[/C][C]41.88[/C][C]39.699[/C][C]31.3197[/C][C]51.2423[/C][C]0.3556[/C][C]0.3677[/C][C]0.8698[/C][C]0.7714[/C][/ROW]
[ROW][C]115[/C][C]45.86[/C][C]41.0856[/C][C]32.0525[/C][C]53.7279[/C][C]0.2296[/C][C]0.451[/C][C]0.8143[/C][C]0.8143[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33779&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33779&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[103])
9129.67-------
9231.19-------
9330.24-------
9430.03-------
9531.02-------
9630.45-------
9731.7-------
9832.1-------
9932.32-------
10032.18-------
10133.43-------
10233.07-------
10335.32-------
10435.1736.57932.880440.83720.25830.71890.99340.7189
10535.2935.603531.362440.62150.45130.56720.98190.5441
10637.8934.158329.6739.57070.08830.3410.93250.337
10738.3236.552731.221643.13030.29920.34510.95040.6433
10837.0736.509630.79343.68630.43920.31050.9510.6274
10939.7737.258431.023845.22480.26830.51850.91430.6833
11039.237.296630.712845.83950.33120.28520.88340.6749
11140.4638.245731.121747.64370.32210.42110.89170.7291
11244.9537.144329.981646.70050.05470.24820.84570.6459
11341.6939.994131.826251.11050.38250.19110.87640.7951
11441.8839.69931.319751.24230.35560.36770.86980.7714
11545.8641.085632.052553.72790.22960.4510.81430.8143







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1040.0594-0.03850.00321.98540.16540.4068
1050.0719-0.00887e-040.09830.00820.0905
1060.08080.10920.009113.92581.16051.0773
1070.09180.04840.0043.12350.26030.5102
1080.10030.01530.00130.3140.02620.1618
1090.10910.06740.00566.30830.52570.725
1100.11690.0510.00433.62290.30190.5495
1110.12540.05790.00484.90310.40860.6392
1120.13130.21010.017560.92865.07742.2533
1130.14180.04240.00352.87610.23970.4896
1140.14840.05490.00464.75670.39640.6296
1150.1570.11620.009722.79461.89951.3782

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
104 & 0.0594 & -0.0385 & 0.0032 & 1.9854 & 0.1654 & 0.4068 \tabularnewline
105 & 0.0719 & -0.0088 & 7e-04 & 0.0983 & 0.0082 & 0.0905 \tabularnewline
106 & 0.0808 & 0.1092 & 0.0091 & 13.9258 & 1.1605 & 1.0773 \tabularnewline
107 & 0.0918 & 0.0484 & 0.004 & 3.1235 & 0.2603 & 0.5102 \tabularnewline
108 & 0.1003 & 0.0153 & 0.0013 & 0.314 & 0.0262 & 0.1618 \tabularnewline
109 & 0.1091 & 0.0674 & 0.0056 & 6.3083 & 0.5257 & 0.725 \tabularnewline
110 & 0.1169 & 0.051 & 0.0043 & 3.6229 & 0.3019 & 0.5495 \tabularnewline
111 & 0.1254 & 0.0579 & 0.0048 & 4.9031 & 0.4086 & 0.6392 \tabularnewline
112 & 0.1313 & 0.2101 & 0.0175 & 60.9286 & 5.0774 & 2.2533 \tabularnewline
113 & 0.1418 & 0.0424 & 0.0035 & 2.8761 & 0.2397 & 0.4896 \tabularnewline
114 & 0.1484 & 0.0549 & 0.0046 & 4.7567 & 0.3964 & 0.6296 \tabularnewline
115 & 0.157 & 0.1162 & 0.0097 & 22.7946 & 1.8995 & 1.3782 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33779&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]104[/C][C]0.0594[/C][C]-0.0385[/C][C]0.0032[/C][C]1.9854[/C][C]0.1654[/C][C]0.4068[/C][/ROW]
[ROW][C]105[/C][C]0.0719[/C][C]-0.0088[/C][C]7e-04[/C][C]0.0983[/C][C]0.0082[/C][C]0.0905[/C][/ROW]
[ROW][C]106[/C][C]0.0808[/C][C]0.1092[/C][C]0.0091[/C][C]13.9258[/C][C]1.1605[/C][C]1.0773[/C][/ROW]
[ROW][C]107[/C][C]0.0918[/C][C]0.0484[/C][C]0.004[/C][C]3.1235[/C][C]0.2603[/C][C]0.5102[/C][/ROW]
[ROW][C]108[/C][C]0.1003[/C][C]0.0153[/C][C]0.0013[/C][C]0.314[/C][C]0.0262[/C][C]0.1618[/C][/ROW]
[ROW][C]109[/C][C]0.1091[/C][C]0.0674[/C][C]0.0056[/C][C]6.3083[/C][C]0.5257[/C][C]0.725[/C][/ROW]
[ROW][C]110[/C][C]0.1169[/C][C]0.051[/C][C]0.0043[/C][C]3.6229[/C][C]0.3019[/C][C]0.5495[/C][/ROW]
[ROW][C]111[/C][C]0.1254[/C][C]0.0579[/C][C]0.0048[/C][C]4.9031[/C][C]0.4086[/C][C]0.6392[/C][/ROW]
[ROW][C]112[/C][C]0.1313[/C][C]0.2101[/C][C]0.0175[/C][C]60.9286[/C][C]5.0774[/C][C]2.2533[/C][/ROW]
[ROW][C]113[/C][C]0.1418[/C][C]0.0424[/C][C]0.0035[/C][C]2.8761[/C][C]0.2397[/C][C]0.4896[/C][/ROW]
[ROW][C]114[/C][C]0.1484[/C][C]0.0549[/C][C]0.0046[/C][C]4.7567[/C][C]0.3964[/C][C]0.6296[/C][/ROW]
[ROW][C]115[/C][C]0.157[/C][C]0.1162[/C][C]0.0097[/C][C]22.7946[/C][C]1.8995[/C][C]1.3782[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33779&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33779&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
1040.0594-0.03850.00321.98540.16540.4068
1050.0719-0.00887e-040.09830.00820.0905
1060.08080.10920.009113.92581.16051.0773
1070.09180.04840.0043.12350.26030.5102
1080.10030.01530.00130.3140.02620.1618
1090.10910.06740.00566.30830.52570.725
1100.11690.0510.00433.62290.30190.5495
1110.12540.05790.00484.90310.40860.6392
1120.13130.21010.017560.92865.07742.2533
1130.14180.04240.00352.87610.23970.4896
1140.14840.05490.00464.75670.39640.6296
1150.1570.11620.009722.79461.89951.3782



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