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 computationTue, 07 Dec 2010 09:41:46 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/07/t1291714786gdpd9xrf39q1jro.htm/, Retrieved Fri, 03 May 2024 21:25:14 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=106079, Retrieved Fri, 03 May 2024 21:25:14 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact111
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]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
-   PD        [ARIMA Forecasting] [] [2010-12-07 09:41:46] [558c060a42ec367ec2c020fab85c25c7] [Current]
-   PD          [ARIMA Forecasting] [] [2010-12-21 18:26:12] [39e83c7b0ac936e906a817a1bb402750]
Feedback Forum

Post a new message
Dataseries X:
47,54
45,31
46,9
47,16
48,24
52,7
51,72
51,5
52,45
53
48,36
46,63
45,92
45,53
42,17
43,66
45,32
47,43
47,76
49,49
50,69
49,8
52,13
53,94
60,75
59,19
57,58
59,16
64,74
67,04
75,53
78,91
78,4
70,07
66,8
61,02
52,38
42,37
39,83
38,79
37,33
39,4
39,45
43,24
42,33
45,5
43,44
43,88
45,61
45,12
47,56
47,04
51,07
54,72
55,37
55,39
53,13
53,71
54,59
54,61




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 2 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106079&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]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106079&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106079&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 time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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])
3661.02-------
3752.38-------
3842.37-------
3939.83-------
4038.79-------
4137.33-------
4239.4-------
4339.45-------
4443.24-------
4542.33-------
4645.5-------
4743.44-------
4843.88-------
4945.6142.762436.845148.67980.17280.35567e-040.3556
5045.1243.266933.013753.52010.36160.32710.56810.4534
5147.5642.583327.77857.38850.2550.36850.64230.4318
5247.0443.008724.37961.63830.33570.3160.67140.4635
5351.0742.560520.241264.87980.22740.3470.6770.4539
5454.7242.886317.377568.39520.18160.26470.60560.4696
5555.3742.580614.029671.13150.190.20230.58510.4645
5655.3942.820511.559174.08190.21530.21570.48950.4735
5753.1342.60748.754376.46040.27120.22960.50640.4706
5853.7142.7816.560979.00110.27710.28770.44150.4763
5954.5942.63084.136381.12520.27130.28630.48360.4746
6054.6142.75542.144283.36660.28360.28390.47840.4784

\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 & 61.02 & - & - & - & - & - & - & - \tabularnewline
37 & 52.38 & - & - & - & - & - & - & - \tabularnewline
38 & 42.37 & - & - & - & - & - & - & - \tabularnewline
39 & 39.83 & - & - & - & - & - & - & - \tabularnewline
40 & 38.79 & - & - & - & - & - & - & - \tabularnewline
41 & 37.33 & - & - & - & - & - & - & - \tabularnewline
42 & 39.4 & - & - & - & - & - & - & - \tabularnewline
43 & 39.45 & - & - & - & - & - & - & - \tabularnewline
44 & 43.24 & - & - & - & - & - & - & - \tabularnewline
45 & 42.33 & - & - & - & - & - & - & - \tabularnewline
46 & 45.5 & - & - & - & - & - & - & - \tabularnewline
47 & 43.44 & - & - & - & - & - & - & - \tabularnewline
48 & 43.88 & - & - & - & - & - & - & - \tabularnewline
49 & 45.61 & 42.7624 & 36.8451 & 48.6798 & 0.1728 & 0.3556 & 7e-04 & 0.3556 \tabularnewline
50 & 45.12 & 43.2669 & 33.0137 & 53.5201 & 0.3616 & 0.3271 & 0.5681 & 0.4534 \tabularnewline
51 & 47.56 & 42.5833 & 27.778 & 57.3885 & 0.255 & 0.3685 & 0.6423 & 0.4318 \tabularnewline
52 & 47.04 & 43.0087 & 24.379 & 61.6383 & 0.3357 & 0.316 & 0.6714 & 0.4635 \tabularnewline
53 & 51.07 & 42.5605 & 20.2412 & 64.8798 & 0.2274 & 0.347 & 0.677 & 0.4539 \tabularnewline
54 & 54.72 & 42.8863 & 17.3775 & 68.3952 & 0.1816 & 0.2647 & 0.6056 & 0.4696 \tabularnewline
55 & 55.37 & 42.5806 & 14.0296 & 71.1315 & 0.19 & 0.2023 & 0.5851 & 0.4645 \tabularnewline
56 & 55.39 & 42.8205 & 11.5591 & 74.0819 & 0.2153 & 0.2157 & 0.4895 & 0.4735 \tabularnewline
57 & 53.13 & 42.6074 & 8.7543 & 76.4604 & 0.2712 & 0.2296 & 0.5064 & 0.4706 \tabularnewline
58 & 53.71 & 42.781 & 6.5609 & 79.0011 & 0.2771 & 0.2877 & 0.4415 & 0.4763 \tabularnewline
59 & 54.59 & 42.6308 & 4.1363 & 81.1252 & 0.2713 & 0.2863 & 0.4836 & 0.4746 \tabularnewline
60 & 54.61 & 42.7554 & 2.1442 & 83.3666 & 0.2836 & 0.2839 & 0.4784 & 0.4784 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106079&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]61.02[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]52.38[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]42.37[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]39.83[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]38.79[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]37.33[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]39.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]39.45[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]43.24[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]42.33[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]45.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]43.44[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]43.88[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]45.61[/C][C]42.7624[/C][C]36.8451[/C][C]48.6798[/C][C]0.1728[/C][C]0.3556[/C][C]7e-04[/C][C]0.3556[/C][/ROW]
[ROW][C]50[/C][C]45.12[/C][C]43.2669[/C][C]33.0137[/C][C]53.5201[/C][C]0.3616[/C][C]0.3271[/C][C]0.5681[/C][C]0.4534[/C][/ROW]
[ROW][C]51[/C][C]47.56[/C][C]42.5833[/C][C]27.778[/C][C]57.3885[/C][C]0.255[/C][C]0.3685[/C][C]0.6423[/C][C]0.4318[/C][/ROW]
[ROW][C]52[/C][C]47.04[/C][C]43.0087[/C][C]24.379[/C][C]61.6383[/C][C]0.3357[/C][C]0.316[/C][C]0.6714[/C][C]0.4635[/C][/ROW]
[ROW][C]53[/C][C]51.07[/C][C]42.5605[/C][C]20.2412[/C][C]64.8798[/C][C]0.2274[/C][C]0.347[/C][C]0.677[/C][C]0.4539[/C][/ROW]
[ROW][C]54[/C][C]54.72[/C][C]42.8863[/C][C]17.3775[/C][C]68.3952[/C][C]0.1816[/C][C]0.2647[/C][C]0.6056[/C][C]0.4696[/C][/ROW]
[ROW][C]55[/C][C]55.37[/C][C]42.5806[/C][C]14.0296[/C][C]71.1315[/C][C]0.19[/C][C]0.2023[/C][C]0.5851[/C][C]0.4645[/C][/ROW]
[ROW][C]56[/C][C]55.39[/C][C]42.8205[/C][C]11.5591[/C][C]74.0819[/C][C]0.2153[/C][C]0.2157[/C][C]0.4895[/C][C]0.4735[/C][/ROW]
[ROW][C]57[/C][C]53.13[/C][C]42.6074[/C][C]8.7543[/C][C]76.4604[/C][C]0.2712[/C][C]0.2296[/C][C]0.5064[/C][C]0.4706[/C][/ROW]
[ROW][C]58[/C][C]53.71[/C][C]42.781[/C][C]6.5609[/C][C]79.0011[/C][C]0.2771[/C][C]0.2877[/C][C]0.4415[/C][C]0.4763[/C][/ROW]
[ROW][C]59[/C][C]54.59[/C][C]42.6308[/C][C]4.1363[/C][C]81.1252[/C][C]0.2713[/C][C]0.2863[/C][C]0.4836[/C][C]0.4746[/C][/ROW]
[ROW][C]60[/C][C]54.61[/C][C]42.7554[/C][C]2.1442[/C][C]83.3666[/C][C]0.2836[/C][C]0.2839[/C][C]0.4784[/C][C]0.4784[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106079&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106079&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])
3661.02-------
3752.38-------
3842.37-------
3939.83-------
4038.79-------
4137.33-------
4239.4-------
4339.45-------
4443.24-------
4542.33-------
4645.5-------
4743.44-------
4843.88-------
4945.6142.762436.845148.67980.17280.35567e-040.3556
5045.1243.266933.013753.52010.36160.32710.56810.4534
5147.5642.583327.77857.38850.2550.36850.64230.4318
5247.0443.008724.37961.63830.33570.3160.67140.4635
5351.0742.560520.241264.87980.22740.3470.6770.4539
5454.7242.886317.377568.39520.18160.26470.60560.4696
5555.3742.580614.029671.13150.190.20230.58510.4645
5655.3942.820511.559174.08190.21530.21570.48950.4735
5753.1342.60748.754376.46040.27120.22960.50640.4706
5853.7142.7816.560979.00110.27710.28770.44150.4763
5954.5942.63084.136381.12520.27130.28630.48360.4746
6054.6142.75542.144283.36660.28360.28390.47840.4784







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.07060.066608.108700
500.12090.04280.05473.43395.77132.4023
510.17740.11690.075424.767912.10353.479
520.2210.09370.0816.251813.14063.625
530.26760.19990.10472.411324.99474.9995
540.30350.27590.1326140.035644.16826.6459
550.34210.30040.1566163.569961.22567.8247
560.37250.29350.1737157.991973.32148.5628
570.40540.2470.1819110.72677.47748.8021
580.4320.25550.1892119.443181.6749.0374
590.46070.28050.1975143.023187.25129.3408
600.48460.27730.2042140.531791.69129.5756

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0706 & 0.0666 & 0 & 8.1087 & 0 & 0 \tabularnewline
50 & 0.1209 & 0.0428 & 0.0547 & 3.4339 & 5.7713 & 2.4023 \tabularnewline
51 & 0.1774 & 0.1169 & 0.0754 & 24.7679 & 12.1035 & 3.479 \tabularnewline
52 & 0.221 & 0.0937 & 0.08 & 16.2518 & 13.1406 & 3.625 \tabularnewline
53 & 0.2676 & 0.1999 & 0.104 & 72.4113 & 24.9947 & 4.9995 \tabularnewline
54 & 0.3035 & 0.2759 & 0.1326 & 140.0356 & 44.1682 & 6.6459 \tabularnewline
55 & 0.3421 & 0.3004 & 0.1566 & 163.5699 & 61.2256 & 7.8247 \tabularnewline
56 & 0.3725 & 0.2935 & 0.1737 & 157.9919 & 73.3214 & 8.5628 \tabularnewline
57 & 0.4054 & 0.247 & 0.1819 & 110.726 & 77.4774 & 8.8021 \tabularnewline
58 & 0.432 & 0.2555 & 0.1892 & 119.4431 & 81.674 & 9.0374 \tabularnewline
59 & 0.4607 & 0.2805 & 0.1975 & 143.0231 & 87.2512 & 9.3408 \tabularnewline
60 & 0.4846 & 0.2773 & 0.2042 & 140.5317 & 91.6912 & 9.5756 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106079&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.0706[/C][C]0.0666[/C][C]0[/C][C]8.1087[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.1209[/C][C]0.0428[/C][C]0.0547[/C][C]3.4339[/C][C]5.7713[/C][C]2.4023[/C][/ROW]
[ROW][C]51[/C][C]0.1774[/C][C]0.1169[/C][C]0.0754[/C][C]24.7679[/C][C]12.1035[/C][C]3.479[/C][/ROW]
[ROW][C]52[/C][C]0.221[/C][C]0.0937[/C][C]0.08[/C][C]16.2518[/C][C]13.1406[/C][C]3.625[/C][/ROW]
[ROW][C]53[/C][C]0.2676[/C][C]0.1999[/C][C]0.104[/C][C]72.4113[/C][C]24.9947[/C][C]4.9995[/C][/ROW]
[ROW][C]54[/C][C]0.3035[/C][C]0.2759[/C][C]0.1326[/C][C]140.0356[/C][C]44.1682[/C][C]6.6459[/C][/ROW]
[ROW][C]55[/C][C]0.3421[/C][C]0.3004[/C][C]0.1566[/C][C]163.5699[/C][C]61.2256[/C][C]7.8247[/C][/ROW]
[ROW][C]56[/C][C]0.3725[/C][C]0.2935[/C][C]0.1737[/C][C]157.9919[/C][C]73.3214[/C][C]8.5628[/C][/ROW]
[ROW][C]57[/C][C]0.4054[/C][C]0.247[/C][C]0.1819[/C][C]110.726[/C][C]77.4774[/C][C]8.8021[/C][/ROW]
[ROW][C]58[/C][C]0.432[/C][C]0.2555[/C][C]0.1892[/C][C]119.4431[/C][C]81.674[/C][C]9.0374[/C][/ROW]
[ROW][C]59[/C][C]0.4607[/C][C]0.2805[/C][C]0.1975[/C][C]143.0231[/C][C]87.2512[/C][C]9.3408[/C][/ROW]
[ROW][C]60[/C][C]0.4846[/C][C]0.2773[/C][C]0.2042[/C][C]140.5317[/C][C]91.6912[/C][C]9.5756[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106079&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106079&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.07060.066608.108700
500.12090.04280.05473.43395.77132.4023
510.17740.11690.075424.767912.10353.479
520.2210.09370.0816.251813.14063.625
530.26760.19990.10472.411324.99474.9995
540.30350.27590.1326140.035644.16826.6459
550.34210.30040.1566163.569961.22567.8247
560.37250.29350.1737157.991973.32148.5628
570.40540.2470.1819110.72677.47748.8021
580.4320.25550.1892119.443181.6749.0374
590.46070.28050.1975143.023187.25129.3408
600.48460.27730.2042140.531791.69129.5756



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