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 computationSun, 21 Dec 2008 09:05:45 -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/21/t12298756302gm0yramzive6is.htm/, Retrieved Sun, 19 May 2024 12:35:39 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=35653, Retrieved Sun, 19 May 2024 12:35:39 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact171
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Standard Deviation-Mean Plot] [SMP inschrijvinge...] [2008-12-21 10:55:25] [8d78428855b119373cac369316c08983]
-    D  [Standard Deviation-Mean Plot] [Standard deviatio...] [2008-12-21 13:36:43] [8d78428855b119373cac369316c08983]
- RM      [Variance Reduction Matrix] [variance reductio...] [2008-12-21 14:07:07] [8d78428855b119373cac369316c08983]
- RMP       [(Partial) Autocorrelation Function] [(P)ACF inschrijvi...] [2008-12-21 14:18:33] [8d78428855b119373cac369316c08983]
- RM          [Spectral Analysis] [spectrum (d=0, D=0)] [2008-12-21 14:50:56] [8d78428855b119373cac369316c08983]
- RM            [ARIMA Backward Selection] [Arima backward se...] [2008-12-21 15:23:44] [8d78428855b119373cac369316c08983]
- RM                [ARIMA Forecasting] [ARIMA forecasting] [2008-12-21 16:05:45] [d6e9f26c3644bfc30f06303d9993b878] [Current]
Feedback Forum

Post a new message
Dataseries X:
11514
31514
27071
29462
26105
22397
23843
21705
18089
20764
25316
17704
15548
28029
29383
36438
32034
22679
24319
18004
17537
20366
22782
19169
13807
29743
25591
29096
26482
22405
27044
17970
18730
19684
19785
18479
10698
31956
29506
34506
27165
26736
23691
18157
17328
18205
20995
17382
9367
31124
26551
30651
25859
25100
25778
20418
18688
20424
24776
19814
12738




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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 & 2 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35653&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]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35653&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35653&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'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[49])
3710698-------
3831956-------
3929506-------
4034506-------
4127165-------
4226736-------
4323691-------
4418157-------
4517328-------
4618205-------
4720995-------
4817382-------
499367-------
503112429836.657525434.644234238.67080.283310.17271
512655127399.669422942.222931857.1160.35450.05070.17721
523065132797.749628229.282137366.21710.17850.99630.23181
532585928247.559223671.744532823.37390.15310.15160.67861
542510023903.206919323.74728482.66670.30420.20130.11271
552577824879.911920285.176729474.64720.35080.46260.6941
562041819042.563314444.107323641.01930.27890.0020.64711
571868817906.913113307.33422506.49220.36960.14230.59740.9999
582042419763.874915164.677624363.07220.38920.67670.74681
592477622162.65217567.319226757.98480.13250.77080.69081
601981418279.875213686.677522873.07290.25640.00280.64920.9999
611273812174.05887665.881316682.23620.40324e-040.88880.8888

\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[49]) \tabularnewline
37 & 10698 & - & - & - & - & - & - & - \tabularnewline
38 & 31956 & - & - & - & - & - & - & - \tabularnewline
39 & 29506 & - & - & - & - & - & - & - \tabularnewline
40 & 34506 & - & - & - & - & - & - & - \tabularnewline
41 & 27165 & - & - & - & - & - & - & - \tabularnewline
42 & 26736 & - & - & - & - & - & - & - \tabularnewline
43 & 23691 & - & - & - & - & - & - & - \tabularnewline
44 & 18157 & - & - & - & - & - & - & - \tabularnewline
45 & 17328 & - & - & - & - & - & - & - \tabularnewline
46 & 18205 & - & - & - & - & - & - & - \tabularnewline
47 & 20995 & - & - & - & - & - & - & - \tabularnewline
48 & 17382 & - & - & - & - & - & - & - \tabularnewline
49 & 9367 & - & - & - & - & - & - & - \tabularnewline
50 & 31124 & 29836.6575 & 25434.6442 & 34238.6708 & 0.2833 & 1 & 0.1727 & 1 \tabularnewline
51 & 26551 & 27399.6694 & 22942.2229 & 31857.116 & 0.3545 & 0.0507 & 0.1772 & 1 \tabularnewline
52 & 30651 & 32797.7496 & 28229.2821 & 37366.2171 & 0.1785 & 0.9963 & 0.2318 & 1 \tabularnewline
53 & 25859 & 28247.5592 & 23671.7445 & 32823.3739 & 0.1531 & 0.1516 & 0.6786 & 1 \tabularnewline
54 & 25100 & 23903.2069 & 19323.747 & 28482.6667 & 0.3042 & 0.2013 & 0.1127 & 1 \tabularnewline
55 & 25778 & 24879.9119 & 20285.1767 & 29474.6472 & 0.3508 & 0.4626 & 0.694 & 1 \tabularnewline
56 & 20418 & 19042.5633 & 14444.1073 & 23641.0193 & 0.2789 & 0.002 & 0.6471 & 1 \tabularnewline
57 & 18688 & 17906.9131 & 13307.334 & 22506.4922 & 0.3696 & 0.1423 & 0.5974 & 0.9999 \tabularnewline
58 & 20424 & 19763.8749 & 15164.6776 & 24363.0722 & 0.3892 & 0.6767 & 0.7468 & 1 \tabularnewline
59 & 24776 & 22162.652 & 17567.3192 & 26757.9848 & 0.1325 & 0.7708 & 0.6908 & 1 \tabularnewline
60 & 19814 & 18279.8752 & 13686.6775 & 22873.0729 & 0.2564 & 0.0028 & 0.6492 & 0.9999 \tabularnewline
61 & 12738 & 12174.0588 & 7665.8813 & 16682.2362 & 0.4032 & 4e-04 & 0.8888 & 0.8888 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35653&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[49])[/C][/ROW]
[ROW][C]37[/C][C]10698[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]31956[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]29506[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]34506[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]27165[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]26736[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]23691[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]18157[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]17328[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]18205[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]20995[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]17382[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]9367[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]31124[/C][C]29836.6575[/C][C]25434.6442[/C][C]34238.6708[/C][C]0.2833[/C][C]1[/C][C]0.1727[/C][C]1[/C][/ROW]
[ROW][C]51[/C][C]26551[/C][C]27399.6694[/C][C]22942.2229[/C][C]31857.116[/C][C]0.3545[/C][C]0.0507[/C][C]0.1772[/C][C]1[/C][/ROW]
[ROW][C]52[/C][C]30651[/C][C]32797.7496[/C][C]28229.2821[/C][C]37366.2171[/C][C]0.1785[/C][C]0.9963[/C][C]0.2318[/C][C]1[/C][/ROW]
[ROW][C]53[/C][C]25859[/C][C]28247.5592[/C][C]23671.7445[/C][C]32823.3739[/C][C]0.1531[/C][C]0.1516[/C][C]0.6786[/C][C]1[/C][/ROW]
[ROW][C]54[/C][C]25100[/C][C]23903.2069[/C][C]19323.747[/C][C]28482.6667[/C][C]0.3042[/C][C]0.2013[/C][C]0.1127[/C][C]1[/C][/ROW]
[ROW][C]55[/C][C]25778[/C][C]24879.9119[/C][C]20285.1767[/C][C]29474.6472[/C][C]0.3508[/C][C]0.4626[/C][C]0.694[/C][C]1[/C][/ROW]
[ROW][C]56[/C][C]20418[/C][C]19042.5633[/C][C]14444.1073[/C][C]23641.0193[/C][C]0.2789[/C][C]0.002[/C][C]0.6471[/C][C]1[/C][/ROW]
[ROW][C]57[/C][C]18688[/C][C]17906.9131[/C][C]13307.334[/C][C]22506.4922[/C][C]0.3696[/C][C]0.1423[/C][C]0.5974[/C][C]0.9999[/C][/ROW]
[ROW][C]58[/C][C]20424[/C][C]19763.8749[/C][C]15164.6776[/C][C]24363.0722[/C][C]0.3892[/C][C]0.6767[/C][C]0.7468[/C][C]1[/C][/ROW]
[ROW][C]59[/C][C]24776[/C][C]22162.652[/C][C]17567.3192[/C][C]26757.9848[/C][C]0.1325[/C][C]0.7708[/C][C]0.6908[/C][C]1[/C][/ROW]
[ROW][C]60[/C][C]19814[/C][C]18279.8752[/C][C]13686.6775[/C][C]22873.0729[/C][C]0.2564[/C][C]0.0028[/C][C]0.6492[/C][C]0.9999[/C][/ROW]
[ROW][C]61[/C][C]12738[/C][C]12174.0588[/C][C]7665.8813[/C][C]16682.2362[/C][C]0.4032[/C][C]4e-04[/C][C]0.8888[/C][C]0.8888[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35653&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35653&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[49])
3710698-------
3831956-------
3929506-------
4034506-------
4127165-------
4226736-------
4323691-------
4418157-------
4517328-------
4618205-------
4720995-------
4817382-------
499367-------
503112429836.657525434.644234238.67080.283310.17271
512655127399.669422942.222931857.1160.35450.05070.17721
523065132797.749628229.282137366.21710.17850.99630.23181
532585928247.559223671.744532823.37390.15310.15160.67861
542510023903.206919323.74728482.66670.30420.20130.11271
552577824879.911920285.176729474.64720.35080.46260.6941
562041819042.563314444.107323641.01930.27890.0020.64711
571868817906.913113307.33422506.49220.36960.14230.59740.9999
582042419763.874915164.677624363.07220.38920.67670.74681
592477622162.65217567.319226757.98480.13250.77080.69081
601981418279.875213686.677522873.07290.25640.00280.64920.9999
611273812174.05887665.881316682.23620.40324e-040.88880.8888







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.07530.04310.00361657250.6658138104.2222371.6238
510.083-0.0310.0026720239.805360019.9838244.9898
520.0711-0.06550.00554608533.7681384044.4807619.7132
530.0826-0.08460.0075705215.0783475434.5899689.5177
540.09770.05010.00421432313.8422119359.4869345.4844
550.09420.03610.003806562.182167213.5152259.2557
560.12320.07220.0061891826.0721157652.1727397.0544
570.13110.04360.0036610096.744150841.3953225.4804
580.11870.03340.0028435765.140336313.7617190.5617
590.10580.11790.00986829587.6717569132.306754.4086
600.12820.08390.0072353538.8105196128.2342442.8637
610.18890.04630.0039318029.720226502.4767162.7958

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0753 & 0.0431 & 0.0036 & 1657250.6658 & 138104.2222 & 371.6238 \tabularnewline
51 & 0.083 & -0.031 & 0.0026 & 720239.8053 & 60019.9838 & 244.9898 \tabularnewline
52 & 0.0711 & -0.0655 & 0.0055 & 4608533.7681 & 384044.4807 & 619.7132 \tabularnewline
53 & 0.0826 & -0.0846 & 0.007 & 5705215.0783 & 475434.5899 & 689.5177 \tabularnewline
54 & 0.0977 & 0.0501 & 0.0042 & 1432313.8422 & 119359.4869 & 345.4844 \tabularnewline
55 & 0.0942 & 0.0361 & 0.003 & 806562.1821 & 67213.5152 & 259.2557 \tabularnewline
56 & 0.1232 & 0.0722 & 0.006 & 1891826.0721 & 157652.1727 & 397.0544 \tabularnewline
57 & 0.1311 & 0.0436 & 0.0036 & 610096.7441 & 50841.3953 & 225.4804 \tabularnewline
58 & 0.1187 & 0.0334 & 0.0028 & 435765.1403 & 36313.7617 & 190.5617 \tabularnewline
59 & 0.1058 & 0.1179 & 0.0098 & 6829587.6717 & 569132.306 & 754.4086 \tabularnewline
60 & 0.1282 & 0.0839 & 0.007 & 2353538.8105 & 196128.2342 & 442.8637 \tabularnewline
61 & 0.1889 & 0.0463 & 0.0039 & 318029.7202 & 26502.4767 & 162.7958 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35653&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]50[/C][C]0.0753[/C][C]0.0431[/C][C]0.0036[/C][C]1657250.6658[/C][C]138104.2222[/C][C]371.6238[/C][/ROW]
[ROW][C]51[/C][C]0.083[/C][C]-0.031[/C][C]0.0026[/C][C]720239.8053[/C][C]60019.9838[/C][C]244.9898[/C][/ROW]
[ROW][C]52[/C][C]0.0711[/C][C]-0.0655[/C][C]0.0055[/C][C]4608533.7681[/C][C]384044.4807[/C][C]619.7132[/C][/ROW]
[ROW][C]53[/C][C]0.0826[/C][C]-0.0846[/C][C]0.007[/C][C]5705215.0783[/C][C]475434.5899[/C][C]689.5177[/C][/ROW]
[ROW][C]54[/C][C]0.0977[/C][C]0.0501[/C][C]0.0042[/C][C]1432313.8422[/C][C]119359.4869[/C][C]345.4844[/C][/ROW]
[ROW][C]55[/C][C]0.0942[/C][C]0.0361[/C][C]0.003[/C][C]806562.1821[/C][C]67213.5152[/C][C]259.2557[/C][/ROW]
[ROW][C]56[/C][C]0.1232[/C][C]0.0722[/C][C]0.006[/C][C]1891826.0721[/C][C]157652.1727[/C][C]397.0544[/C][/ROW]
[ROW][C]57[/C][C]0.1311[/C][C]0.0436[/C][C]0.0036[/C][C]610096.7441[/C][C]50841.3953[/C][C]225.4804[/C][/ROW]
[ROW][C]58[/C][C]0.1187[/C][C]0.0334[/C][C]0.0028[/C][C]435765.1403[/C][C]36313.7617[/C][C]190.5617[/C][/ROW]
[ROW][C]59[/C][C]0.1058[/C][C]0.1179[/C][C]0.0098[/C][C]6829587.6717[/C][C]569132.306[/C][C]754.4086[/C][/ROW]
[ROW][C]60[/C][C]0.1282[/C][C]0.0839[/C][C]0.007[/C][C]2353538.8105[/C][C]196128.2342[/C][C]442.8637[/C][/ROW]
[ROW][C]61[/C][C]0.1889[/C][C]0.0463[/C][C]0.0039[/C][C]318029.7202[/C][C]26502.4767[/C][C]162.7958[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35653&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35653&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
500.07530.04310.00361657250.6658138104.2222371.6238
510.083-0.0310.0026720239.805360019.9838244.9898
520.0711-0.06550.00554608533.7681384044.4807619.7132
530.0826-0.08460.0075705215.0783475434.5899689.5177
540.09770.05010.00421432313.8422119359.4869345.4844
550.09420.03610.003806562.182167213.5152259.2557
560.12320.07220.0061891826.0721157652.1727397.0544
570.13110.04360.0036610096.744150841.3953225.4804
580.11870.03340.0028435765.140336313.7617190.5617
590.10580.11790.00986829587.6717569132.306754.4086
600.12820.08390.0072353538.8105196128.2342442.8637
610.18890.04630.0039318029.720226502.4767162.7958



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