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, 16 Dec 2008 13:51:44 -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/16/t1229460741jqtjsr9va3cacy4.htm/, Retrieved Wed, 15 May 2024 21:30:44 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34193, Retrieved Wed, 15 May 2024 21:30:44 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact178
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [paper forecast] [2007-12-14 20:47:44] [22f18fc6a98517db16300404be421f9a]
-   PD    [ARIMA Forecasting] [Forecast mannen] [2008-12-16 20:51:44] [e8f764b122b426f433a1e1038b457077] [Current]
-    D      [ARIMA Forecasting] [Forecast vrouwen] [2008-12-16 20:53:18] [4ddbf81f78ea7c738951638c7e93f6ee]
-    D        [ARIMA Forecasting] [Forecast totaal] [2008-12-16 20:54:52] [4ddbf81f78ea7c738951638c7e93f6ee]
Feedback Forum

Post a new message
Dataseries X:
7,5
7,6
7,9
7,9
8,1
8,2
8
7,5
6,8
6,5
6,6
7,6
8
8
7,7
7,5
7,6
7,7
7,9
7,8
7,5
7,5
7,1
7,5
7,5
7,6
7,7
7,7
7,9
8,1
8,2
8,2
8,1
7,9
7,3
6,9
6,6
6,7
6,9
7
7,1
7,2
7,1
6,9
7
6,8
6,4
6,7
6,7
6,4
6,3
6,2
6,5
6,8
6,8
6,5
6,3
5,9
5,9
6,4




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34193&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]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34193&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34193&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'George Udny Yule' @ 72.249.76.132







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])
366.9-------
376.6-------
386.7-------
396.9-------
407-------
417.1-------
427.2-------
437.1-------
446.9-------
457-------
466.8-------
476.4-------
486.7-------
496.76.83536.33037.34020.29980.70020.81940.7002
506.47.00465.99928.01010.11930.72370.72370.7237
516.37.10255.71538.48980.12840.83950.61260.7152
526.27.10465.45598.75330.14110.83060.54950.6847
536.57.16965.33119.00820.23770.84940.52960.6917
546.87.27865.28129.27610.31930.77760.53070.7149
556.87.19735.05159.34310.35830.64170.53540.6752
566.57.00774.71849.2970.33190.57060.53670.6039
576.37.10864.68149.53590.25690.68850.5350.6293
585.96.90574.34749.4640.22050.67870.53230.5626
595.96.50323.82099.18550.32970.67030.53010.4428
606.46.80254.00229.60280.38910.73620.52860.5286

\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 & 6.9 & - & - & - & - & - & - & - \tabularnewline
37 & 6.6 & - & - & - & - & - & - & - \tabularnewline
38 & 6.7 & - & - & - & - & - & - & - \tabularnewline
39 & 6.9 & - & - & - & - & - & - & - \tabularnewline
40 & 7 & - & - & - & - & - & - & - \tabularnewline
41 & 7.1 & - & - & - & - & - & - & - \tabularnewline
42 & 7.2 & - & - & - & - & - & - & - \tabularnewline
43 & 7.1 & - & - & - & - & - & - & - \tabularnewline
44 & 6.9 & - & - & - & - & - & - & - \tabularnewline
45 & 7 & - & - & - & - & - & - & - \tabularnewline
46 & 6.8 & - & - & - & - & - & - & - \tabularnewline
47 & 6.4 & - & - & - & - & - & - & - \tabularnewline
48 & 6.7 & - & - & - & - & - & - & - \tabularnewline
49 & 6.7 & 6.8353 & 6.3303 & 7.3402 & 0.2998 & 0.7002 & 0.8194 & 0.7002 \tabularnewline
50 & 6.4 & 7.0046 & 5.9992 & 8.0101 & 0.1193 & 0.7237 & 0.7237 & 0.7237 \tabularnewline
51 & 6.3 & 7.1025 & 5.7153 & 8.4898 & 0.1284 & 0.8395 & 0.6126 & 0.7152 \tabularnewline
52 & 6.2 & 7.1046 & 5.4559 & 8.7533 & 0.1411 & 0.8306 & 0.5495 & 0.6847 \tabularnewline
53 & 6.5 & 7.1696 & 5.3311 & 9.0082 & 0.2377 & 0.8494 & 0.5296 & 0.6917 \tabularnewline
54 & 6.8 & 7.2786 & 5.2812 & 9.2761 & 0.3193 & 0.7776 & 0.5307 & 0.7149 \tabularnewline
55 & 6.8 & 7.1973 & 5.0515 & 9.3431 & 0.3583 & 0.6417 & 0.5354 & 0.6752 \tabularnewline
56 & 6.5 & 7.0077 & 4.7184 & 9.297 & 0.3319 & 0.5706 & 0.5367 & 0.6039 \tabularnewline
57 & 6.3 & 7.1086 & 4.6814 & 9.5359 & 0.2569 & 0.6885 & 0.535 & 0.6293 \tabularnewline
58 & 5.9 & 6.9057 & 4.3474 & 9.464 & 0.2205 & 0.6787 & 0.5323 & 0.5626 \tabularnewline
59 & 5.9 & 6.5032 & 3.8209 & 9.1855 & 0.3297 & 0.6703 & 0.5301 & 0.4428 \tabularnewline
60 & 6.4 & 6.8025 & 4.0022 & 9.6028 & 0.3891 & 0.7362 & 0.5286 & 0.5286 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34193&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]6.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]6.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]6.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]6.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]7.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]7.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]7.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]6.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]6.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]6.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]6.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]6.7[/C][C]6.8353[/C][C]6.3303[/C][C]7.3402[/C][C]0.2998[/C][C]0.7002[/C][C]0.8194[/C][C]0.7002[/C][/ROW]
[ROW][C]50[/C][C]6.4[/C][C]7.0046[/C][C]5.9992[/C][C]8.0101[/C][C]0.1193[/C][C]0.7237[/C][C]0.7237[/C][C]0.7237[/C][/ROW]
[ROW][C]51[/C][C]6.3[/C][C]7.1025[/C][C]5.7153[/C][C]8.4898[/C][C]0.1284[/C][C]0.8395[/C][C]0.6126[/C][C]0.7152[/C][/ROW]
[ROW][C]52[/C][C]6.2[/C][C]7.1046[/C][C]5.4559[/C][C]8.7533[/C][C]0.1411[/C][C]0.8306[/C][C]0.5495[/C][C]0.6847[/C][/ROW]
[ROW][C]53[/C][C]6.5[/C][C]7.1696[/C][C]5.3311[/C][C]9.0082[/C][C]0.2377[/C][C]0.8494[/C][C]0.5296[/C][C]0.6917[/C][/ROW]
[ROW][C]54[/C][C]6.8[/C][C]7.2786[/C][C]5.2812[/C][C]9.2761[/C][C]0.3193[/C][C]0.7776[/C][C]0.5307[/C][C]0.7149[/C][/ROW]
[ROW][C]55[/C][C]6.8[/C][C]7.1973[/C][C]5.0515[/C][C]9.3431[/C][C]0.3583[/C][C]0.6417[/C][C]0.5354[/C][C]0.6752[/C][/ROW]
[ROW][C]56[/C][C]6.5[/C][C]7.0077[/C][C]4.7184[/C][C]9.297[/C][C]0.3319[/C][C]0.5706[/C][C]0.5367[/C][C]0.6039[/C][/ROW]
[ROW][C]57[/C][C]6.3[/C][C]7.1086[/C][C]4.6814[/C][C]9.5359[/C][C]0.2569[/C][C]0.6885[/C][C]0.535[/C][C]0.6293[/C][/ROW]
[ROW][C]58[/C][C]5.9[/C][C]6.9057[/C][C]4.3474[/C][C]9.464[/C][C]0.2205[/C][C]0.6787[/C][C]0.5323[/C][C]0.5626[/C][/ROW]
[ROW][C]59[/C][C]5.9[/C][C]6.5032[/C][C]3.8209[/C][C]9.1855[/C][C]0.3297[/C][C]0.6703[/C][C]0.5301[/C][C]0.4428[/C][/ROW]
[ROW][C]60[/C][C]6.4[/C][C]6.8025[/C][C]4.0022[/C][C]9.6028[/C][C]0.3891[/C][C]0.7362[/C][C]0.5286[/C][C]0.5286[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34193&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34193&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])
366.9-------
376.6-------
386.7-------
396.9-------
407-------
417.1-------
427.2-------
437.1-------
446.9-------
457-------
466.8-------
476.4-------
486.7-------
496.76.83536.33037.34020.29980.70020.81940.7002
506.47.00465.99928.01010.11930.72370.72370.7237
516.37.10255.71538.48980.12840.83950.61260.7152
526.27.10465.45598.75330.14110.83060.54950.6847
536.57.16965.33119.00820.23770.84940.52960.6917
546.87.27865.28129.27610.31930.77760.53070.7149
556.87.19735.05159.34310.35830.64170.53540.6752
566.57.00774.71849.2970.33190.57060.53670.6039
576.37.10864.68149.53590.25690.68850.5350.6293
585.96.90574.34749.4640.22050.67870.53230.5626
595.96.50323.82099.18550.32970.67030.53010.4428
606.46.80254.00229.60280.38910.73620.52860.5286







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0377-0.01980.00160.01830.00150.039
500.0732-0.08630.00720.36560.03050.1745
510.0997-0.1130.00940.64410.05370.2317
520.1184-0.12730.01060.81830.06820.2611
530.1308-0.09340.00780.44840.03740.1933
540.14-0.06580.00550.22910.01910.1382
550.1521-0.05520.00460.15790.01320.1147
560.1667-0.07240.0060.25780.02150.1466
570.1742-0.11380.00950.65390.05450.2334
580.189-0.14560.01211.01140.08430.2903
590.2104-0.09280.00770.36390.03030.1741
600.21-0.05920.00490.1620.01350.1162

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0377 & -0.0198 & 0.0016 & 0.0183 & 0.0015 & 0.039 \tabularnewline
50 & 0.0732 & -0.0863 & 0.0072 & 0.3656 & 0.0305 & 0.1745 \tabularnewline
51 & 0.0997 & -0.113 & 0.0094 & 0.6441 & 0.0537 & 0.2317 \tabularnewline
52 & 0.1184 & -0.1273 & 0.0106 & 0.8183 & 0.0682 & 0.2611 \tabularnewline
53 & 0.1308 & -0.0934 & 0.0078 & 0.4484 & 0.0374 & 0.1933 \tabularnewline
54 & 0.14 & -0.0658 & 0.0055 & 0.2291 & 0.0191 & 0.1382 \tabularnewline
55 & 0.1521 & -0.0552 & 0.0046 & 0.1579 & 0.0132 & 0.1147 \tabularnewline
56 & 0.1667 & -0.0724 & 0.006 & 0.2578 & 0.0215 & 0.1466 \tabularnewline
57 & 0.1742 & -0.1138 & 0.0095 & 0.6539 & 0.0545 & 0.2334 \tabularnewline
58 & 0.189 & -0.1456 & 0.0121 & 1.0114 & 0.0843 & 0.2903 \tabularnewline
59 & 0.2104 & -0.0928 & 0.0077 & 0.3639 & 0.0303 & 0.1741 \tabularnewline
60 & 0.21 & -0.0592 & 0.0049 & 0.162 & 0.0135 & 0.1162 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34193&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.0377[/C][C]-0.0198[/C][C]0.0016[/C][C]0.0183[/C][C]0.0015[/C][C]0.039[/C][/ROW]
[ROW][C]50[/C][C]0.0732[/C][C]-0.0863[/C][C]0.0072[/C][C]0.3656[/C][C]0.0305[/C][C]0.1745[/C][/ROW]
[ROW][C]51[/C][C]0.0997[/C][C]-0.113[/C][C]0.0094[/C][C]0.6441[/C][C]0.0537[/C][C]0.2317[/C][/ROW]
[ROW][C]52[/C][C]0.1184[/C][C]-0.1273[/C][C]0.0106[/C][C]0.8183[/C][C]0.0682[/C][C]0.2611[/C][/ROW]
[ROW][C]53[/C][C]0.1308[/C][C]-0.0934[/C][C]0.0078[/C][C]0.4484[/C][C]0.0374[/C][C]0.1933[/C][/ROW]
[ROW][C]54[/C][C]0.14[/C][C]-0.0658[/C][C]0.0055[/C][C]0.2291[/C][C]0.0191[/C][C]0.1382[/C][/ROW]
[ROW][C]55[/C][C]0.1521[/C][C]-0.0552[/C][C]0.0046[/C][C]0.1579[/C][C]0.0132[/C][C]0.1147[/C][/ROW]
[ROW][C]56[/C][C]0.1667[/C][C]-0.0724[/C][C]0.006[/C][C]0.2578[/C][C]0.0215[/C][C]0.1466[/C][/ROW]
[ROW][C]57[/C][C]0.1742[/C][C]-0.1138[/C][C]0.0095[/C][C]0.6539[/C][C]0.0545[/C][C]0.2334[/C][/ROW]
[ROW][C]58[/C][C]0.189[/C][C]-0.1456[/C][C]0.0121[/C][C]1.0114[/C][C]0.0843[/C][C]0.2903[/C][/ROW]
[ROW][C]59[/C][C]0.2104[/C][C]-0.0928[/C][C]0.0077[/C][C]0.3639[/C][C]0.0303[/C][C]0.1741[/C][/ROW]
[ROW][C]60[/C][C]0.21[/C][C]-0.0592[/C][C]0.0049[/C][C]0.162[/C][C]0.0135[/C][C]0.1162[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34193&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34193&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.0377-0.01980.00160.01830.00150.039
500.0732-0.08630.00720.36560.03050.1745
510.0997-0.1130.00940.64410.05370.2317
520.1184-0.12730.01060.81830.06820.2611
530.1308-0.09340.00780.44840.03740.1933
540.14-0.06580.00550.22910.01910.1382
550.1521-0.05520.00460.15790.01320.1147
560.1667-0.07240.0060.25780.02150.1466
570.1742-0.11380.00950.65390.05450.2334
580.189-0.14560.01211.01140.08430.2903
590.2104-0.09280.00770.36390.03030.1741
600.21-0.05920.00490.1620.01350.1162



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