Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationMon, 10 Dec 2007 09:51:30 -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/10/t1197304646rbmx13xnik2mtrd.htm/, Retrieved Mon, 06 May 2024 19:07:56 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2997, Retrieved Mon, 06 May 2024 19:07:56 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact253
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [arma forecasting ...] [2007-12-10 16:51:30] [372f82c86cdcc50abc807b137b6a3bca] [Current]
Feedback Forum

Post a new message
Dataseries X:
105,6
97,4
0,9
0
-2,5
4
1
-3,8
5,4
-2,3
1
-0,5
-1,8
3,4
11,1
6
8,3
6,7
-2,2
5,9
8
6,7
15,5
7,9
8,9
21,1
-10
0,3
7,8
0,2
4
15,8
2,6
6,6
4,5
-3,8
6,8
6,8
8,1
1,2
-0,6
3,8
7,7
-5,5
-10
-1,1
-1,1
-3,9
0,3
-12,5
2,3
6,9
10,8
-2,2
8,2
3,8
4,1
5,1
0,7
12,4
6
3,3
-111
-112,4
-130,6
-109,1
-118,8
-123,9
-101,6
-112,8
-128
-129,6




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2997&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 time3 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[60])
48-3.9-------
490.3-------
50-12.5-------
512.3-------
526.9-------
5310.8-------
54-2.2-------
558.2-------
563.8-------
574.1-------
585.1-------
590.7-------
6012.4-------
61618.0992-13.491149.68950.22640.63820.86530.6382
623.310.2462-31.647152.13940.37260.57870.85640.4599
63-11110.4394-35.86256.740700.61880.63480.4669
64-112.46.0733-41.571853.7184010.48640.3973
65-130.65.2605-42.665953.1869010.41040.3852
66-109.11.2261-46.727349.1794010.55570.3239
67-118.87.3344-40.619155.2879010.48590.418
68-123.9-0.8291-48.787147.129010.4250.2944
69-101.6-3.9479-51.910844.015010.37110.252
70-112.81.6624-46.303149.6278010.44410.3304
71-128-0.1074-48.073747.859010.48680.3046
72-129.62.4125-45.554150.379010.34160.3416

\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[60]) \tabularnewline
48 & -3.9 & - & - & - & - & - & - & - \tabularnewline
49 & 0.3 & - & - & - & - & - & - & - \tabularnewline
50 & -12.5 & - & - & - & - & - & - & - \tabularnewline
51 & 2.3 & - & - & - & - & - & - & - \tabularnewline
52 & 6.9 & - & - & - & - & - & - & - \tabularnewline
53 & 10.8 & - & - & - & - & - & - & - \tabularnewline
54 & -2.2 & - & - & - & - & - & - & - \tabularnewline
55 & 8.2 & - & - & - & - & - & - & - \tabularnewline
56 & 3.8 & - & - & - & - & - & - & - \tabularnewline
57 & 4.1 & - & - & - & - & - & - & - \tabularnewline
58 & 5.1 & - & - & - & - & - & - & - \tabularnewline
59 & 0.7 & - & - & - & - & - & - & - \tabularnewline
60 & 12.4 & - & - & - & - & - & - & - \tabularnewline
61 & 6 & 18.0992 & -13.4911 & 49.6895 & 0.2264 & 0.6382 & 0.8653 & 0.6382 \tabularnewline
62 & 3.3 & 10.2462 & -31.6471 & 52.1394 & 0.3726 & 0.5787 & 0.8564 & 0.4599 \tabularnewline
63 & -111 & 10.4394 & -35.862 & 56.7407 & 0 & 0.6188 & 0.6348 & 0.4669 \tabularnewline
64 & -112.4 & 6.0733 & -41.5718 & 53.7184 & 0 & 1 & 0.4864 & 0.3973 \tabularnewline
65 & -130.6 & 5.2605 & -42.6659 & 53.1869 & 0 & 1 & 0.4104 & 0.3852 \tabularnewline
66 & -109.1 & 1.2261 & -46.7273 & 49.1794 & 0 & 1 & 0.5557 & 0.3239 \tabularnewline
67 & -118.8 & 7.3344 & -40.6191 & 55.2879 & 0 & 1 & 0.4859 & 0.418 \tabularnewline
68 & -123.9 & -0.8291 & -48.7871 & 47.129 & 0 & 1 & 0.425 & 0.2944 \tabularnewline
69 & -101.6 & -3.9479 & -51.9108 & 44.015 & 0 & 1 & 0.3711 & 0.252 \tabularnewline
70 & -112.8 & 1.6624 & -46.3031 & 49.6278 & 0 & 1 & 0.4441 & 0.3304 \tabularnewline
71 & -128 & -0.1074 & -48.0737 & 47.859 & 0 & 1 & 0.4868 & 0.3046 \tabularnewline
72 & -129.6 & 2.4125 & -45.5541 & 50.379 & 0 & 1 & 0.3416 & 0.3416 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2997&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[60])[/C][/ROW]
[ROW][C]48[/C][C]-3.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]0.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]-12.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]2.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]6.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]10.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]-2.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]8.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]3.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]4.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]5.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]0.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]12.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]6[/C][C]18.0992[/C][C]-13.4911[/C][C]49.6895[/C][C]0.2264[/C][C]0.6382[/C][C]0.8653[/C][C]0.6382[/C][/ROW]
[ROW][C]62[/C][C]3.3[/C][C]10.2462[/C][C]-31.6471[/C][C]52.1394[/C][C]0.3726[/C][C]0.5787[/C][C]0.8564[/C][C]0.4599[/C][/ROW]
[ROW][C]63[/C][C]-111[/C][C]10.4394[/C][C]-35.862[/C][C]56.7407[/C][C]0[/C][C]0.6188[/C][C]0.6348[/C][C]0.4669[/C][/ROW]
[ROW][C]64[/C][C]-112.4[/C][C]6.0733[/C][C]-41.5718[/C][C]53.7184[/C][C]0[/C][C]1[/C][C]0.4864[/C][C]0.3973[/C][/ROW]
[ROW][C]65[/C][C]-130.6[/C][C]5.2605[/C][C]-42.6659[/C][C]53.1869[/C][C]0[/C][C]1[/C][C]0.4104[/C][C]0.3852[/C][/ROW]
[ROW][C]66[/C][C]-109.1[/C][C]1.2261[/C][C]-46.7273[/C][C]49.1794[/C][C]0[/C][C]1[/C][C]0.5557[/C][C]0.3239[/C][/ROW]
[ROW][C]67[/C][C]-118.8[/C][C]7.3344[/C][C]-40.6191[/C][C]55.2879[/C][C]0[/C][C]1[/C][C]0.4859[/C][C]0.418[/C][/ROW]
[ROW][C]68[/C][C]-123.9[/C][C]-0.8291[/C][C]-48.7871[/C][C]47.129[/C][C]0[/C][C]1[/C][C]0.425[/C][C]0.2944[/C][/ROW]
[ROW][C]69[/C][C]-101.6[/C][C]-3.9479[/C][C]-51.9108[/C][C]44.015[/C][C]0[/C][C]1[/C][C]0.3711[/C][C]0.252[/C][/ROW]
[ROW][C]70[/C][C]-112.8[/C][C]1.6624[/C][C]-46.3031[/C][C]49.6278[/C][C]0[/C][C]1[/C][C]0.4441[/C][C]0.3304[/C][/ROW]
[ROW][C]71[/C][C]-128[/C][C]-0.1074[/C][C]-48.0737[/C][C]47.859[/C][C]0[/C][C]1[/C][C]0.4868[/C][C]0.3046[/C][/ROW]
[ROW][C]72[/C][C]-129.6[/C][C]2.4125[/C][C]-45.5541[/C][C]50.379[/C][C]0[/C][C]1[/C][C]0.3416[/C][C]0.3416[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2997&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2997&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[60])
48-3.9-------
490.3-------
50-12.5-------
512.3-------
526.9-------
5310.8-------
54-2.2-------
558.2-------
563.8-------
574.1-------
585.1-------
590.7-------
6012.4-------
61618.0992-13.491149.68950.22640.63820.86530.6382
623.310.2462-31.647152.13940.37260.57870.85640.4599
63-11110.4394-35.86256.740700.61880.63480.4669
64-112.46.0733-41.571853.7184010.48640.3973
65-130.65.2605-42.665953.1869010.41040.3852
66-109.11.2261-46.727349.1794010.55570.3239
67-118.87.3344-40.619155.2879010.48590.418
68-123.9-0.8291-48.787147.129010.4250.2944
69-101.6-3.9479-51.910844.015010.37110.252
70-112.81.6624-46.303149.6278010.44410.3304
71-128-0.1074-48.073747.859010.48680.3046
72-129.62.4125-45.554150.379010.34160.3416







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.8905-0.66850.0557146.390112.19923.4927
622.0861-0.67790.056548.24934.02082.0052
632.2629-11.63280.969414747.51841228.959935.0565
644.0025-19.50721.625614035.92871169.660734.2003
654.6483-25.82662.152218458.0731538.172839.2195
6619.9549-89.98387.498612171.84091014.320131.8484
673.3358-17.19771.433115909.88251325.823536.4119
68-29.5127148.442512.370215146.4511262.204235.5275
69-6.198524.73522.06139535.9334794.661128.1897
7014.7212-68.85465.737913101.6361091.80333.0424
71-227.9621191.317399.276416356.52891363.044136.9194
7210.1442-54.72074.560117427.29381452.274538.1087

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.8905 & -0.6685 & 0.0557 & 146.3901 & 12.1992 & 3.4927 \tabularnewline
62 & 2.0861 & -0.6779 & 0.0565 & 48.2493 & 4.0208 & 2.0052 \tabularnewline
63 & 2.2629 & -11.6328 & 0.9694 & 14747.5184 & 1228.9599 & 35.0565 \tabularnewline
64 & 4.0025 & -19.5072 & 1.6256 & 14035.9287 & 1169.6607 & 34.2003 \tabularnewline
65 & 4.6483 & -25.8266 & 2.1522 & 18458.073 & 1538.1728 & 39.2195 \tabularnewline
66 & 19.9549 & -89.9838 & 7.4986 & 12171.8409 & 1014.3201 & 31.8484 \tabularnewline
67 & 3.3358 & -17.1977 & 1.4331 & 15909.8825 & 1325.8235 & 36.4119 \tabularnewline
68 & -29.5127 & 148.4425 & 12.3702 & 15146.451 & 1262.2042 & 35.5275 \tabularnewline
69 & -6.1985 & 24.7352 & 2.0613 & 9535.9334 & 794.6611 & 28.1897 \tabularnewline
70 & 14.7212 & -68.8546 & 5.7379 & 13101.636 & 1091.803 & 33.0424 \tabularnewline
71 & -227.962 & 1191.3173 & 99.2764 & 16356.5289 & 1363.0441 & 36.9194 \tabularnewline
72 & 10.1442 & -54.7207 & 4.5601 & 17427.2938 & 1452.2745 & 38.1087 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2997&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]61[/C][C]0.8905[/C][C]-0.6685[/C][C]0.0557[/C][C]146.3901[/C][C]12.1992[/C][C]3.4927[/C][/ROW]
[ROW][C]62[/C][C]2.0861[/C][C]-0.6779[/C][C]0.0565[/C][C]48.2493[/C][C]4.0208[/C][C]2.0052[/C][/ROW]
[ROW][C]63[/C][C]2.2629[/C][C]-11.6328[/C][C]0.9694[/C][C]14747.5184[/C][C]1228.9599[/C][C]35.0565[/C][/ROW]
[ROW][C]64[/C][C]4.0025[/C][C]-19.5072[/C][C]1.6256[/C][C]14035.9287[/C][C]1169.6607[/C][C]34.2003[/C][/ROW]
[ROW][C]65[/C][C]4.6483[/C][C]-25.8266[/C][C]2.1522[/C][C]18458.073[/C][C]1538.1728[/C][C]39.2195[/C][/ROW]
[ROW][C]66[/C][C]19.9549[/C][C]-89.9838[/C][C]7.4986[/C][C]12171.8409[/C][C]1014.3201[/C][C]31.8484[/C][/ROW]
[ROW][C]67[/C][C]3.3358[/C][C]-17.1977[/C][C]1.4331[/C][C]15909.8825[/C][C]1325.8235[/C][C]36.4119[/C][/ROW]
[ROW][C]68[/C][C]-29.5127[/C][C]148.4425[/C][C]12.3702[/C][C]15146.451[/C][C]1262.2042[/C][C]35.5275[/C][/ROW]
[ROW][C]69[/C][C]-6.1985[/C][C]24.7352[/C][C]2.0613[/C][C]9535.9334[/C][C]794.6611[/C][C]28.1897[/C][/ROW]
[ROW][C]70[/C][C]14.7212[/C][C]-68.8546[/C][C]5.7379[/C][C]13101.636[/C][C]1091.803[/C][C]33.0424[/C][/ROW]
[ROW][C]71[/C][C]-227.962[/C][C]1191.3173[/C][C]99.2764[/C][C]16356.5289[/C][C]1363.0441[/C][C]36.9194[/C][/ROW]
[ROW][C]72[/C][C]10.1442[/C][C]-54.7207[/C][C]4.5601[/C][C]17427.2938[/C][C]1452.2745[/C][C]38.1087[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2997&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2997&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
610.8905-0.66850.0557146.390112.19923.4927
622.0861-0.67790.056548.24934.02082.0052
632.2629-11.63280.969414747.51841228.959935.0565
644.0025-19.50721.625614035.92871169.660734.2003
654.6483-25.82662.152218458.0731538.172839.2195
6619.9549-89.98387.498612171.84091014.320131.8484
673.3358-17.19771.433115909.88251325.823536.4119
68-29.5127148.442512.370215146.4511262.204235.5275
69-6.198524.73522.06139535.9334794.661128.1897
7014.7212-68.85465.737913101.6361091.80333.0424
71-227.9621191.317399.276416356.52891363.044136.9194
7210.1442-54.72074.560117427.29381452.274538.1087



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