Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationTue, 11 Dec 2007 07:11: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/2007/Dec/11/t11973817752cg12elcz9sykcv.htm/, Retrieved Sun, 28 Apr 2024 22:50:55 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3114, Retrieved Sun, 28 Apr 2024 22:50:55 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact230
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [arima] [2007-12-11 14:11:18] [9bbf43209035234637c4ce5aaffd9fad] [Current]
Feedback Forum

Post a new message
Dataseries X:
587
-665
613
316
151
463
-262
56
138
399
211
932
1461
722
1348
-227
505
1415
126
48
189
894
753
-100
-672
521
-31
992
1750
31
240
1188
1070
120
491
1412
1577
565
813
-32
-415
-20
473
-214
-204
568
-319
-1086




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3114&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 time18 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[36])
24-100-------
25-672-------
26521-------
27-31-------
28992-------
291750-------
3031-------
31240-------
321188-------
331070-------
34120-------
35491-------
361412-------
371577625.8712-816.53932068.28170.09810.14270.96110.1427
38565528.9461-1008.29742066.18970.48170.09070.5040.1301
39813755.3059-812.48232323.09410.47130.5940.83720.2058
40-32314.2849-1263.62281892.19260.33350.26780.19990.0864
41-4151110.6731-470.61662691.96280.02930.92170.21410.3544
42-20751.8863-830.53692334.30960.16950.92580.8140.2068
43473186.1274-1396.67611768.93090.36120.60070.47340.0645
44-214581.3602-1001.57092164.29130.16240.55340.22630.1519
45-204606.2133-976.76072189.18720.15790.84510.28290.1592
46568528.1031-1054.88522111.09150.48030.81770.69330.1369
47-319630.2892-952.7042213.28230.11990.53070.56850.1666
48-1086611.9178-971.0772194.91260.01780.87550.16090.1609

\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[36]) \tabularnewline
24 & -100 & - & - & - & - & - & - & - \tabularnewline
25 & -672 & - & - & - & - & - & - & - \tabularnewline
26 & 521 & - & - & - & - & - & - & - \tabularnewline
27 & -31 & - & - & - & - & - & - & - \tabularnewline
28 & 992 & - & - & - & - & - & - & - \tabularnewline
29 & 1750 & - & - & - & - & - & - & - \tabularnewline
30 & 31 & - & - & - & - & - & - & - \tabularnewline
31 & 240 & - & - & - & - & - & - & - \tabularnewline
32 & 1188 & - & - & - & - & - & - & - \tabularnewline
33 & 1070 & - & - & - & - & - & - & - \tabularnewline
34 & 120 & - & - & - & - & - & - & - \tabularnewline
35 & 491 & - & - & - & - & - & - & - \tabularnewline
36 & 1412 & - & - & - & - & - & - & - \tabularnewline
37 & 1577 & 625.8712 & -816.5393 & 2068.2817 & 0.0981 & 0.1427 & 0.9611 & 0.1427 \tabularnewline
38 & 565 & 528.9461 & -1008.2974 & 2066.1897 & 0.4817 & 0.0907 & 0.504 & 0.1301 \tabularnewline
39 & 813 & 755.3059 & -812.4823 & 2323.0941 & 0.4713 & 0.594 & 0.8372 & 0.2058 \tabularnewline
40 & -32 & 314.2849 & -1263.6228 & 1892.1926 & 0.3335 & 0.2678 & 0.1999 & 0.0864 \tabularnewline
41 & -415 & 1110.6731 & -470.6166 & 2691.9628 & 0.0293 & 0.9217 & 0.2141 & 0.3544 \tabularnewline
42 & -20 & 751.8863 & -830.5369 & 2334.3096 & 0.1695 & 0.9258 & 0.814 & 0.2068 \tabularnewline
43 & 473 & 186.1274 & -1396.6761 & 1768.9309 & 0.3612 & 0.6007 & 0.4734 & 0.0645 \tabularnewline
44 & -214 & 581.3602 & -1001.5709 & 2164.2913 & 0.1624 & 0.5534 & 0.2263 & 0.1519 \tabularnewline
45 & -204 & 606.2133 & -976.7607 & 2189.1872 & 0.1579 & 0.8451 & 0.2829 & 0.1592 \tabularnewline
46 & 568 & 528.1031 & -1054.8852 & 2111.0915 & 0.4803 & 0.8177 & 0.6933 & 0.1369 \tabularnewline
47 & -319 & 630.2892 & -952.704 & 2213.2823 & 0.1199 & 0.5307 & 0.5685 & 0.1666 \tabularnewline
48 & -1086 & 611.9178 & -971.077 & 2194.9126 & 0.0178 & 0.8755 & 0.1609 & 0.1609 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3114&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[36])[/C][/ROW]
[ROW][C]24[/C][C]-100[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]25[/C][C]-672[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]26[/C][C]521[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]27[/C][C]-31[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]28[/C][C]992[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]29[/C][C]1750[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]30[/C][C]31[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]31[/C][C]240[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]32[/C][C]1188[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]1070[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]120[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]491[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]1412[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]1577[/C][C]625.8712[/C][C]-816.5393[/C][C]2068.2817[/C][C]0.0981[/C][C]0.1427[/C][C]0.9611[/C][C]0.1427[/C][/ROW]
[ROW][C]38[/C][C]565[/C][C]528.9461[/C][C]-1008.2974[/C][C]2066.1897[/C][C]0.4817[/C][C]0.0907[/C][C]0.504[/C][C]0.1301[/C][/ROW]
[ROW][C]39[/C][C]813[/C][C]755.3059[/C][C]-812.4823[/C][C]2323.0941[/C][C]0.4713[/C][C]0.594[/C][C]0.8372[/C][C]0.2058[/C][/ROW]
[ROW][C]40[/C][C]-32[/C][C]314.2849[/C][C]-1263.6228[/C][C]1892.1926[/C][C]0.3335[/C][C]0.2678[/C][C]0.1999[/C][C]0.0864[/C][/ROW]
[ROW][C]41[/C][C]-415[/C][C]1110.6731[/C][C]-470.6166[/C][C]2691.9628[/C][C]0.0293[/C][C]0.9217[/C][C]0.2141[/C][C]0.3544[/C][/ROW]
[ROW][C]42[/C][C]-20[/C][C]751.8863[/C][C]-830.5369[/C][C]2334.3096[/C][C]0.1695[/C][C]0.9258[/C][C]0.814[/C][C]0.2068[/C][/ROW]
[ROW][C]43[/C][C]473[/C][C]186.1274[/C][C]-1396.6761[/C][C]1768.9309[/C][C]0.3612[/C][C]0.6007[/C][C]0.4734[/C][C]0.0645[/C][/ROW]
[ROW][C]44[/C][C]-214[/C][C]581.3602[/C][C]-1001.5709[/C][C]2164.2913[/C][C]0.1624[/C][C]0.5534[/C][C]0.2263[/C][C]0.1519[/C][/ROW]
[ROW][C]45[/C][C]-204[/C][C]606.2133[/C][C]-976.7607[/C][C]2189.1872[/C][C]0.1579[/C][C]0.8451[/C][C]0.2829[/C][C]0.1592[/C][/ROW]
[ROW][C]46[/C][C]568[/C][C]528.1031[/C][C]-1054.8852[/C][C]2111.0915[/C][C]0.4803[/C][C]0.8177[/C][C]0.6933[/C][C]0.1369[/C][/ROW]
[ROW][C]47[/C][C]-319[/C][C]630.2892[/C][C]-952.704[/C][C]2213.2823[/C][C]0.1199[/C][C]0.5307[/C][C]0.5685[/C][C]0.1666[/C][/ROW]
[ROW][C]48[/C][C]-1086[/C][C]611.9178[/C][C]-971.077[/C][C]2194.9126[/C][C]0.0178[/C][C]0.8755[/C][C]0.1609[/C][C]0.1609[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3114&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3114&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[36])
24-100-------
25-672-------
26521-------
27-31-------
28992-------
291750-------
3031-------
31240-------
321188-------
331070-------
34120-------
35491-------
361412-------
371577625.8712-816.53932068.28170.09810.14270.96110.1427
38565528.9461-1008.29742066.18970.48170.09070.5040.1301
39813755.3059-812.48232323.09410.47130.5940.83720.2058
40-32314.2849-1263.62281892.19260.33350.26780.19990.0864
41-4151110.6731-470.61662691.96280.02930.92170.21410.3544
42-20751.8863-830.53692334.30960.16950.92580.8140.2068
43473186.1274-1396.67611768.93090.36120.60070.47340.0645
44-214581.3602-1001.57092164.29130.16240.55340.22630.1519
45-204606.2133-976.76072189.18720.15790.84510.28290.1592
46568528.1031-1054.88522111.09150.48030.81770.69330.1369
47-319630.2892-952.7042213.28230.11990.53070.56850.1666
48-1086611.9178-971.0772194.91260.01780.87550.16090.1609







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
371.17581.51970.1266904645.952975387.1627274.5672
381.48280.06820.00571299.8809108.323410.4079
391.0590.07640.00643328.6069277.383916.6548
402.5615-1.10180.0918119913.21029992.767599.9638
410.7264-1.37360.11452327678.4756193973.2063440.4239
421.0738-1.02660.0855595808.498249650.7082222.8244
434.33871.54130.128482295.88986857.990882.813
441.3892-1.36810.114632597.875952716.4897229.6007
451.3323-1.33650.1114656445.582854703.7986233.8884
461.52930.07550.00631591.7595132.646611.5172
471.2814-1.50610.1255901149.92675095.8272274.0362
481.3199-2.77470.23122882924.8248240243.7354490.1466

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
37 & 1.1758 & 1.5197 & 0.1266 & 904645.9529 & 75387.1627 & 274.5672 \tabularnewline
38 & 1.4828 & 0.0682 & 0.0057 & 1299.8809 & 108.3234 & 10.4079 \tabularnewline
39 & 1.059 & 0.0764 & 0.0064 & 3328.6069 & 277.3839 & 16.6548 \tabularnewline
40 & 2.5615 & -1.1018 & 0.0918 & 119913.2102 & 9992.7675 & 99.9638 \tabularnewline
41 & 0.7264 & -1.3736 & 0.1145 & 2327678.4756 & 193973.2063 & 440.4239 \tabularnewline
42 & 1.0738 & -1.0266 & 0.0855 & 595808.4982 & 49650.7082 & 222.8244 \tabularnewline
43 & 4.3387 & 1.5413 & 0.1284 & 82295.8898 & 6857.9908 & 82.813 \tabularnewline
44 & 1.3892 & -1.3681 & 0.114 & 632597.8759 & 52716.4897 & 229.6007 \tabularnewline
45 & 1.3323 & -1.3365 & 0.1114 & 656445.5828 & 54703.7986 & 233.8884 \tabularnewline
46 & 1.5293 & 0.0755 & 0.0063 & 1591.7595 & 132.6466 & 11.5172 \tabularnewline
47 & 1.2814 & -1.5061 & 0.1255 & 901149.926 & 75095.8272 & 274.0362 \tabularnewline
48 & 1.3199 & -2.7747 & 0.2312 & 2882924.8248 & 240243.7354 & 490.1466 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3114&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]37[/C][C]1.1758[/C][C]1.5197[/C][C]0.1266[/C][C]904645.9529[/C][C]75387.1627[/C][C]274.5672[/C][/ROW]
[ROW][C]38[/C][C]1.4828[/C][C]0.0682[/C][C]0.0057[/C][C]1299.8809[/C][C]108.3234[/C][C]10.4079[/C][/ROW]
[ROW][C]39[/C][C]1.059[/C][C]0.0764[/C][C]0.0064[/C][C]3328.6069[/C][C]277.3839[/C][C]16.6548[/C][/ROW]
[ROW][C]40[/C][C]2.5615[/C][C]-1.1018[/C][C]0.0918[/C][C]119913.2102[/C][C]9992.7675[/C][C]99.9638[/C][/ROW]
[ROW][C]41[/C][C]0.7264[/C][C]-1.3736[/C][C]0.1145[/C][C]2327678.4756[/C][C]193973.2063[/C][C]440.4239[/C][/ROW]
[ROW][C]42[/C][C]1.0738[/C][C]-1.0266[/C][C]0.0855[/C][C]595808.4982[/C][C]49650.7082[/C][C]222.8244[/C][/ROW]
[ROW][C]43[/C][C]4.3387[/C][C]1.5413[/C][C]0.1284[/C][C]82295.8898[/C][C]6857.9908[/C][C]82.813[/C][/ROW]
[ROW][C]44[/C][C]1.3892[/C][C]-1.3681[/C][C]0.114[/C][C]632597.8759[/C][C]52716.4897[/C][C]229.6007[/C][/ROW]
[ROW][C]45[/C][C]1.3323[/C][C]-1.3365[/C][C]0.1114[/C][C]656445.5828[/C][C]54703.7986[/C][C]233.8884[/C][/ROW]
[ROW][C]46[/C][C]1.5293[/C][C]0.0755[/C][C]0.0063[/C][C]1591.7595[/C][C]132.6466[/C][C]11.5172[/C][/ROW]
[ROW][C]47[/C][C]1.2814[/C][C]-1.5061[/C][C]0.1255[/C][C]901149.926[/C][C]75095.8272[/C][C]274.0362[/C][/ROW]
[ROW][C]48[/C][C]1.3199[/C][C]-2.7747[/C][C]0.2312[/C][C]2882924.8248[/C][C]240243.7354[/C][C]490.1466[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3114&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3114&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
371.17581.51970.1266904645.952975387.1627274.5672
381.48280.06820.00571299.8809108.323410.4079
391.0590.07640.00643328.6069277.383916.6548
402.5615-1.10180.0918119913.21029992.767599.9638
410.7264-1.37360.11452327678.4756193973.2063440.4239
421.0738-1.02660.0855595808.498249650.7082222.8244
434.33871.54130.128482295.88986857.990882.813
441.3892-1.36810.114632597.875952716.4897229.6007
451.3323-1.33650.1114656445.582854703.7986233.8884
461.52930.07550.00631591.7595132.646611.5172
471.2814-1.50610.1255901149.92675095.8272274.0362
481.3199-2.77470.23122882924.8248240243.7354490.1466



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