Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationMon, 17 Dec 2007 04:23:35 -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/17/t1197889640y1mk42souy5yynz.htm/, Retrieved Sat, 04 May 2024 04:03:09 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4357, Retrieved Sat, 04 May 2024 04:03:09 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact182
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [arima forecast ve...] [2007-12-17 11:23:35] [e24e91da8d334fb8882bf413603fde71] [Current]
Feedback Forum

Post a new message
Dataseries X:
101.17
101.93
102.05
102.08
102.14
102.15
95.42
95.43
95.43
95.43
95.43
95.57
95.71
94.58
94.6
94.61
94.62
94.66
94.66
94.69
94.79
94.79
94.79
94.79
94.8
95.46
95.49
95.74
95.74
95.74
95.75
95.83
95.83
95.84
95.81
95.81
95.8
97.06
97.15
97.14
97.48
97.48
97.48
97.5
97.63
97.86
97.87
97.87
97.84
98.72
100.49
100.54
100.54
100.54
100.55
100.59
100.60
100.62
100.68
100.68




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time8 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 & 8 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4357&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]8 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=4357&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4357&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 time8 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[48])
3695.81-------
3795.8-------
3897.06-------
3997.15-------
4097.14-------
4197.48-------
4297.48-------
4397.48-------
4497.5-------
4597.63-------
4697.86-------
4797.87-------
4897.87-------
4997.8497.73395.469399.99670.46310.45280.95290.4528
5098.7298.965195.7758102.15430.44010.75540.87920.7495
51100.4999.168495.1217103.21510.26110.5860.83590.7353
52100.5499.095894.1241104.06750.28460.29130.77970.6855
53100.5499.315793.6476104.98390.3360.3360.73720.6914
54100.5499.388393.2295105.54710.3570.3570.72820.6855
55100.5599.519292.843106.19530.38110.38220.72530.6859
56100.5999.475292.2229106.72750.38160.38570.70330.6678
57100.699.538891.8106107.2670.39390.39490.68580.6639
58100.6299.815191.7038107.92640.42290.42480.68170.6808
59100.6899.870491.347108.39380.42620.43160.67720.6772
60100.6899.81290.8456108.77840.42480.42480.66440.6644

\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[48]) \tabularnewline
36 & 95.81 & - & - & - & - & - & - & - \tabularnewline
37 & 95.8 & - & - & - & - & - & - & - \tabularnewline
38 & 97.06 & - & - & - & - & - & - & - \tabularnewline
39 & 97.15 & - & - & - & - & - & - & - \tabularnewline
40 & 97.14 & - & - & - & - & - & - & - \tabularnewline
41 & 97.48 & - & - & - & - & - & - & - \tabularnewline
42 & 97.48 & - & - & - & - & - & - & - \tabularnewline
43 & 97.48 & - & - & - & - & - & - & - \tabularnewline
44 & 97.5 & - & - & - & - & - & - & - \tabularnewline
45 & 97.63 & - & - & - & - & - & - & - \tabularnewline
46 & 97.86 & - & - & - & - & - & - & - \tabularnewline
47 & 97.87 & - & - & - & - & - & - & - \tabularnewline
48 & 97.87 & - & - & - & - & - & - & - \tabularnewline
49 & 97.84 & 97.733 & 95.4693 & 99.9967 & 0.4631 & 0.4528 & 0.9529 & 0.4528 \tabularnewline
50 & 98.72 & 98.9651 & 95.7758 & 102.1543 & 0.4401 & 0.7554 & 0.8792 & 0.7495 \tabularnewline
51 & 100.49 & 99.1684 & 95.1217 & 103.2151 & 0.2611 & 0.586 & 0.8359 & 0.7353 \tabularnewline
52 & 100.54 & 99.0958 & 94.1241 & 104.0675 & 0.2846 & 0.2913 & 0.7797 & 0.6855 \tabularnewline
53 & 100.54 & 99.3157 & 93.6476 & 104.9839 & 0.336 & 0.336 & 0.7372 & 0.6914 \tabularnewline
54 & 100.54 & 99.3883 & 93.2295 & 105.5471 & 0.357 & 0.357 & 0.7282 & 0.6855 \tabularnewline
55 & 100.55 & 99.5192 & 92.843 & 106.1953 & 0.3811 & 0.3822 & 0.7253 & 0.6859 \tabularnewline
56 & 100.59 & 99.4752 & 92.2229 & 106.7275 & 0.3816 & 0.3857 & 0.7033 & 0.6678 \tabularnewline
57 & 100.6 & 99.5388 & 91.8106 & 107.267 & 0.3939 & 0.3949 & 0.6858 & 0.6639 \tabularnewline
58 & 100.62 & 99.8151 & 91.7038 & 107.9264 & 0.4229 & 0.4248 & 0.6817 & 0.6808 \tabularnewline
59 & 100.68 & 99.8704 & 91.347 & 108.3938 & 0.4262 & 0.4316 & 0.6772 & 0.6772 \tabularnewline
60 & 100.68 & 99.812 & 90.8456 & 108.7784 & 0.4248 & 0.4248 & 0.6644 & 0.6644 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4357&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[48])[/C][/ROW]
[ROW][C]36[/C][C]95.81[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]95.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]97.06[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]97.15[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]97.14[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]97.48[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]97.48[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]97.48[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]97.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]97.63[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]97.86[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]97.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]97.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]97.84[/C][C]97.733[/C][C]95.4693[/C][C]99.9967[/C][C]0.4631[/C][C]0.4528[/C][C]0.9529[/C][C]0.4528[/C][/ROW]
[ROW][C]50[/C][C]98.72[/C][C]98.9651[/C][C]95.7758[/C][C]102.1543[/C][C]0.4401[/C][C]0.7554[/C][C]0.8792[/C][C]0.7495[/C][/ROW]
[ROW][C]51[/C][C]100.49[/C][C]99.1684[/C][C]95.1217[/C][C]103.2151[/C][C]0.2611[/C][C]0.586[/C][C]0.8359[/C][C]0.7353[/C][/ROW]
[ROW][C]52[/C][C]100.54[/C][C]99.0958[/C][C]94.1241[/C][C]104.0675[/C][C]0.2846[/C][C]0.2913[/C][C]0.7797[/C][C]0.6855[/C][/ROW]
[ROW][C]53[/C][C]100.54[/C][C]99.3157[/C][C]93.6476[/C][C]104.9839[/C][C]0.336[/C][C]0.336[/C][C]0.7372[/C][C]0.6914[/C][/ROW]
[ROW][C]54[/C][C]100.54[/C][C]99.3883[/C][C]93.2295[/C][C]105.5471[/C][C]0.357[/C][C]0.357[/C][C]0.7282[/C][C]0.6855[/C][/ROW]
[ROW][C]55[/C][C]100.55[/C][C]99.5192[/C][C]92.843[/C][C]106.1953[/C][C]0.3811[/C][C]0.3822[/C][C]0.7253[/C][C]0.6859[/C][/ROW]
[ROW][C]56[/C][C]100.59[/C][C]99.4752[/C][C]92.2229[/C][C]106.7275[/C][C]0.3816[/C][C]0.3857[/C][C]0.7033[/C][C]0.6678[/C][/ROW]
[ROW][C]57[/C][C]100.6[/C][C]99.5388[/C][C]91.8106[/C][C]107.267[/C][C]0.3939[/C][C]0.3949[/C][C]0.6858[/C][C]0.6639[/C][/ROW]
[ROW][C]58[/C][C]100.62[/C][C]99.8151[/C][C]91.7038[/C][C]107.9264[/C][C]0.4229[/C][C]0.4248[/C][C]0.6817[/C][C]0.6808[/C][/ROW]
[ROW][C]59[/C][C]100.68[/C][C]99.8704[/C][C]91.347[/C][C]108.3938[/C][C]0.4262[/C][C]0.4316[/C][C]0.6772[/C][C]0.6772[/C][/ROW]
[ROW][C]60[/C][C]100.68[/C][C]99.812[/C][C]90.8456[/C][C]108.7784[/C][C]0.4248[/C][C]0.4248[/C][C]0.6644[/C][C]0.6644[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4357&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4357&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[48])
3695.81-------
3795.8-------
3897.06-------
3997.15-------
4097.14-------
4197.48-------
4297.48-------
4397.48-------
4497.5-------
4597.63-------
4697.86-------
4797.87-------
4897.87-------
4997.8497.73395.469399.99670.46310.45280.95290.4528
5098.7298.965195.7758102.15430.44010.75540.87920.7495
51100.4999.168495.1217103.21510.26110.5860.83590.7353
52100.5499.095894.1241104.06750.28460.29130.77970.6855
53100.5499.315793.6476104.98390.3360.3360.73720.6914
54100.5499.388393.2295105.54710.3570.3570.72820.6855
55100.5599.519292.843106.19530.38110.38220.72530.6859
56100.5999.475292.2229106.72750.38160.38570.70330.6678
57100.699.538891.8106107.2670.39390.39490.68580.6639
58100.6299.815191.7038107.92640.42290.42480.68170.6808
59100.6899.870491.347108.39380.42620.43160.67720.6772
60100.6899.81290.8456108.77840.42480.42480.66440.6644







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.01180.00111e-040.01140.0010.0309
500.0164-0.00252e-040.06010.0050.0707
510.02080.01330.00111.74660.14560.3815
520.02560.01460.00122.08570.17380.4169
530.02910.01230.0011.49880.12490.3534
540.03160.01160.0011.32640.11050.3325
550.03420.01049e-041.06260.08860.2976
560.03720.01129e-041.24280.10360.3218
570.03960.01079e-041.12620.09390.3064
580.04150.00817e-040.64780.0540.2323
590.04350.00817e-040.65540.05460.2337
600.04580.00877e-040.75340.06280.2506

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0118 & 0.0011 & 1e-04 & 0.0114 & 0.001 & 0.0309 \tabularnewline
50 & 0.0164 & -0.0025 & 2e-04 & 0.0601 & 0.005 & 0.0707 \tabularnewline
51 & 0.0208 & 0.0133 & 0.0011 & 1.7466 & 0.1456 & 0.3815 \tabularnewline
52 & 0.0256 & 0.0146 & 0.0012 & 2.0857 & 0.1738 & 0.4169 \tabularnewline
53 & 0.0291 & 0.0123 & 0.001 & 1.4988 & 0.1249 & 0.3534 \tabularnewline
54 & 0.0316 & 0.0116 & 0.001 & 1.3264 & 0.1105 & 0.3325 \tabularnewline
55 & 0.0342 & 0.0104 & 9e-04 & 1.0626 & 0.0886 & 0.2976 \tabularnewline
56 & 0.0372 & 0.0112 & 9e-04 & 1.2428 & 0.1036 & 0.3218 \tabularnewline
57 & 0.0396 & 0.0107 & 9e-04 & 1.1262 & 0.0939 & 0.3064 \tabularnewline
58 & 0.0415 & 0.0081 & 7e-04 & 0.6478 & 0.054 & 0.2323 \tabularnewline
59 & 0.0435 & 0.0081 & 7e-04 & 0.6554 & 0.0546 & 0.2337 \tabularnewline
60 & 0.0458 & 0.0087 & 7e-04 & 0.7534 & 0.0628 & 0.2506 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4357&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]49[/C][C]0.0118[/C][C]0.0011[/C][C]1e-04[/C][C]0.0114[/C][C]0.001[/C][C]0.0309[/C][/ROW]
[ROW][C]50[/C][C]0.0164[/C][C]-0.0025[/C][C]2e-04[/C][C]0.0601[/C][C]0.005[/C][C]0.0707[/C][/ROW]
[ROW][C]51[/C][C]0.0208[/C][C]0.0133[/C][C]0.0011[/C][C]1.7466[/C][C]0.1456[/C][C]0.3815[/C][/ROW]
[ROW][C]52[/C][C]0.0256[/C][C]0.0146[/C][C]0.0012[/C][C]2.0857[/C][C]0.1738[/C][C]0.4169[/C][/ROW]
[ROW][C]53[/C][C]0.0291[/C][C]0.0123[/C][C]0.001[/C][C]1.4988[/C][C]0.1249[/C][C]0.3534[/C][/ROW]
[ROW][C]54[/C][C]0.0316[/C][C]0.0116[/C][C]0.001[/C][C]1.3264[/C][C]0.1105[/C][C]0.3325[/C][/ROW]
[ROW][C]55[/C][C]0.0342[/C][C]0.0104[/C][C]9e-04[/C][C]1.0626[/C][C]0.0886[/C][C]0.2976[/C][/ROW]
[ROW][C]56[/C][C]0.0372[/C][C]0.0112[/C][C]9e-04[/C][C]1.2428[/C][C]0.1036[/C][C]0.3218[/C][/ROW]
[ROW][C]57[/C][C]0.0396[/C][C]0.0107[/C][C]9e-04[/C][C]1.1262[/C][C]0.0939[/C][C]0.3064[/C][/ROW]
[ROW][C]58[/C][C]0.0415[/C][C]0.0081[/C][C]7e-04[/C][C]0.6478[/C][C]0.054[/C][C]0.2323[/C][/ROW]
[ROW][C]59[/C][C]0.0435[/C][C]0.0081[/C][C]7e-04[/C][C]0.6554[/C][C]0.0546[/C][C]0.2337[/C][/ROW]
[ROW][C]60[/C][C]0.0458[/C][C]0.0087[/C][C]7e-04[/C][C]0.7534[/C][C]0.0628[/C][C]0.2506[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4357&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4357&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
490.01180.00111e-040.01140.0010.0309
500.0164-0.00252e-040.06010.0050.0707
510.02080.01330.00111.74660.14560.3815
520.02560.01460.00122.08570.17380.4169
530.02910.01230.0011.49880.12490.3534
540.03160.01160.0011.32640.11050.3325
550.03420.01049e-041.06260.08860.2976
560.03720.01129e-041.24280.10360.3218
570.03960.01079e-041.12620.09390.3064
580.04150.00817e-040.64780.0540.2323
590.04350.00817e-040.65540.05460.2337
600.04580.00877e-040.75340.06280.2506



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