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, 19 Dec 2010 21:18:21 +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/19/t1292793400olncmybu4hbutqy.htm/, Retrieved Sat, 04 May 2024 21:00:54 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=112750, Retrieved Sat, 04 May 2024 21:00:54 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact124
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 18:56:05] [8ef75e99f9f5061c72c54640f2f1c3e7]
-   PD          [ARIMA Forecasting] [] [2010-12-19 21:18:21] [e26438ba7029caa0090c95690001dbf5] [Current]
Feedback Forum

Post a new message
Dataseries X:
4,031636
3,702076
3,056176
3,280707
2,984728
3,693712
3,226317
2,190349
2,599515
3,080288
2,929672
2,922548
3,234943
2,983081
3,284389
3,806511
3,784579
2,645654
3,092081
3,204859
3,107225
3,466909
2,984404
3,218072
2,82731
3,182049
2,236319
2,033218
1,644804
1,627971
1,677559
2,330828
2,493615
2,257172
2,655517
2,298655
2,600402
3,04523
2,790583
3,227052
2,967479
2,938817
3,277961
3,423985
3,072646
2,754253
2,910431
3,174369
3,068387
3,089543
2,906654
2,931161
3,02566
2,939551
2,691019
3,19812
3,07639
2,863873
3,013802
3,053364
2,864753
3,057062
2,959365
3,252258
3,602988
3,497704
3,296867
3,602417
3,3001
3,40193
3,502591
3,402348
3,498551
3,199823
2,700064
2,801034
2,898628
2,800854
2,399942
2,402724
2,202331
2,102594
1,798293
1,202484
1,400201
1,200832
1,298083
1,099742
1,001377
0,8361743




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112750&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]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112750&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112750&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'RServer@AstonUniversity' @ vre.aston.ac.uk







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[78])
663.497704-------
673.296867-------
683.602417-------
693.3001-------
703.40193-------
713.502591-------
723.402348-------
733.498551-------
743.199823-------
752.700064-------
762.801034-------
772.898628-------
782.800854-------
792.39992.82212.18633.53890.12420.52310.09710.5231
802.40272.82212.05233.71410.17840.82320.04320.5186
812.20232.82211.94293.86480.1220.78470.18450.5159
822.10262.82211.84913.99990.11560.84880.16730.5141
831.79832.82211.76644.12390.06160.86060.15280.5127
841.20252.82211.6924.23960.01260.92150.21120.5117
851.40022.82211.62434.34870.0340.98120.19260.5109
861.20082.82211.56194.45230.02560.95630.32490.5102
871.29812.82211.5044.55150.04210.96690.5550.5096
881.09972.82211.454.64670.03220.94920.5090.5091
891.00142.82211.39944.73870.03130.96090.46880.5087
900.83622.82211.35164.82770.02610.96240.50830.5083

\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[78]) \tabularnewline
66 & 3.497704 & - & - & - & - & - & - & - \tabularnewline
67 & 3.296867 & - & - & - & - & - & - & - \tabularnewline
68 & 3.602417 & - & - & - & - & - & - & - \tabularnewline
69 & 3.3001 & - & - & - & - & - & - & - \tabularnewline
70 & 3.40193 & - & - & - & - & - & - & - \tabularnewline
71 & 3.502591 & - & - & - & - & - & - & - \tabularnewline
72 & 3.402348 & - & - & - & - & - & - & - \tabularnewline
73 & 3.498551 & - & - & - & - & - & - & - \tabularnewline
74 & 3.199823 & - & - & - & - & - & - & - \tabularnewline
75 & 2.700064 & - & - & - & - & - & - & - \tabularnewline
76 & 2.801034 & - & - & - & - & - & - & - \tabularnewline
77 & 2.898628 & - & - & - & - & - & - & - \tabularnewline
78 & 2.800854 & - & - & - & - & - & - & - \tabularnewline
79 & 2.3999 & 2.8221 & 2.1863 & 3.5389 & 0.1242 & 0.5231 & 0.0971 & 0.5231 \tabularnewline
80 & 2.4027 & 2.8221 & 2.0523 & 3.7141 & 0.1784 & 0.8232 & 0.0432 & 0.5186 \tabularnewline
81 & 2.2023 & 2.8221 & 1.9429 & 3.8648 & 0.122 & 0.7847 & 0.1845 & 0.5159 \tabularnewline
82 & 2.1026 & 2.8221 & 1.8491 & 3.9999 & 0.1156 & 0.8488 & 0.1673 & 0.5141 \tabularnewline
83 & 1.7983 & 2.8221 & 1.7664 & 4.1239 & 0.0616 & 0.8606 & 0.1528 & 0.5127 \tabularnewline
84 & 1.2025 & 2.8221 & 1.692 & 4.2396 & 0.0126 & 0.9215 & 0.2112 & 0.5117 \tabularnewline
85 & 1.4002 & 2.8221 & 1.6243 & 4.3487 & 0.034 & 0.9812 & 0.1926 & 0.5109 \tabularnewline
86 & 1.2008 & 2.8221 & 1.5619 & 4.4523 & 0.0256 & 0.9563 & 0.3249 & 0.5102 \tabularnewline
87 & 1.2981 & 2.8221 & 1.504 & 4.5515 & 0.0421 & 0.9669 & 0.555 & 0.5096 \tabularnewline
88 & 1.0997 & 2.8221 & 1.45 & 4.6467 & 0.0322 & 0.9492 & 0.509 & 0.5091 \tabularnewline
89 & 1.0014 & 2.8221 & 1.3994 & 4.7387 & 0.0313 & 0.9609 & 0.4688 & 0.5087 \tabularnewline
90 & 0.8362 & 2.8221 & 1.3516 & 4.8277 & 0.0261 & 0.9624 & 0.5083 & 0.5083 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112750&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[78])[/C][/ROW]
[ROW][C]66[/C][C]3.497704[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]3.296867[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]3.602417[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]3.3001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]3.40193[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]3.502591[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]3.402348[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]3.498551[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]3.199823[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]2.700064[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]2.801034[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]2.898628[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]2.800854[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]2.3999[/C][C]2.8221[/C][C]2.1863[/C][C]3.5389[/C][C]0.1242[/C][C]0.5231[/C][C]0.0971[/C][C]0.5231[/C][/ROW]
[ROW][C]80[/C][C]2.4027[/C][C]2.8221[/C][C]2.0523[/C][C]3.7141[/C][C]0.1784[/C][C]0.8232[/C][C]0.0432[/C][C]0.5186[/C][/ROW]
[ROW][C]81[/C][C]2.2023[/C][C]2.8221[/C][C]1.9429[/C][C]3.8648[/C][C]0.122[/C][C]0.7847[/C][C]0.1845[/C][C]0.5159[/C][/ROW]
[ROW][C]82[/C][C]2.1026[/C][C]2.8221[/C][C]1.8491[/C][C]3.9999[/C][C]0.1156[/C][C]0.8488[/C][C]0.1673[/C][C]0.5141[/C][/ROW]
[ROW][C]83[/C][C]1.7983[/C][C]2.8221[/C][C]1.7664[/C][C]4.1239[/C][C]0.0616[/C][C]0.8606[/C][C]0.1528[/C][C]0.5127[/C][/ROW]
[ROW][C]84[/C][C]1.2025[/C][C]2.8221[/C][C]1.692[/C][C]4.2396[/C][C]0.0126[/C][C]0.9215[/C][C]0.2112[/C][C]0.5117[/C][/ROW]
[ROW][C]85[/C][C]1.4002[/C][C]2.8221[/C][C]1.6243[/C][C]4.3487[/C][C]0.034[/C][C]0.9812[/C][C]0.1926[/C][C]0.5109[/C][/ROW]
[ROW][C]86[/C][C]1.2008[/C][C]2.8221[/C][C]1.5619[/C][C]4.4523[/C][C]0.0256[/C][C]0.9563[/C][C]0.3249[/C][C]0.5102[/C][/ROW]
[ROW][C]87[/C][C]1.2981[/C][C]2.8221[/C][C]1.504[/C][C]4.5515[/C][C]0.0421[/C][C]0.9669[/C][C]0.555[/C][C]0.5096[/C][/ROW]
[ROW][C]88[/C][C]1.0997[/C][C]2.8221[/C][C]1.45[/C][C]4.6467[/C][C]0.0322[/C][C]0.9492[/C][C]0.509[/C][C]0.5091[/C][/ROW]
[ROW][C]89[/C][C]1.0014[/C][C]2.8221[/C][C]1.3994[/C][C]4.7387[/C][C]0.0313[/C][C]0.9609[/C][C]0.4688[/C][C]0.5087[/C][/ROW]
[ROW][C]90[/C][C]0.8362[/C][C]2.8221[/C][C]1.3516[/C][C]4.8277[/C][C]0.0261[/C][C]0.9624[/C][C]0.5083[/C][C]0.5083[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112750&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112750&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[78])
663.497704-------
673.296867-------
683.602417-------
693.3001-------
703.40193-------
713.502591-------
723.402348-------
733.498551-------
743.199823-------
752.700064-------
762.801034-------
772.898628-------
782.800854-------
792.39992.82212.18633.53890.12420.52310.09710.5231
802.40272.82212.05233.71410.17840.82320.04320.5186
812.20232.82211.94293.86480.1220.78470.18450.5159
822.10262.82211.84913.99990.11560.84880.16730.5141
831.79832.82211.76644.12390.06160.86060.15280.5127
841.20252.82211.6924.23960.01260.92150.21120.5117
851.40022.82211.62434.34870.0340.98120.19260.5109
861.20082.82211.56194.45230.02560.95630.32490.5102
871.29812.82211.5044.55150.04210.96690.5550.5096
881.09972.82211.454.64670.03220.94920.5090.5091
891.00142.82211.39944.73870.03130.96090.46880.5087
900.83622.82211.35164.82770.02610.96240.50830.5083







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
790.1296-0.149600.178200
800.1613-0.14860.14910.17590.1770.4207
810.1885-0.21960.17260.38410.2460.496
820.2129-0.25490.19320.51770.31390.5603
830.2354-0.36280.22711.04810.46080.6788
840.2563-0.57390.28492.62310.82120.9062
850.276-0.50380.31622.02170.99270.9963
860.2947-0.57450.34852.62841.19711.0941
870.3127-0.540.36982.32261.32221.1499
880.3299-0.61030.39382.96641.48661.2193
890.3465-0.64520.41673.31491.65281.2856
900.3626-0.70370.44063.94381.84371.3578

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
79 & 0.1296 & -0.1496 & 0 & 0.1782 & 0 & 0 \tabularnewline
80 & 0.1613 & -0.1486 & 0.1491 & 0.1759 & 0.177 & 0.4207 \tabularnewline
81 & 0.1885 & -0.2196 & 0.1726 & 0.3841 & 0.246 & 0.496 \tabularnewline
82 & 0.2129 & -0.2549 & 0.1932 & 0.5177 & 0.3139 & 0.5603 \tabularnewline
83 & 0.2354 & -0.3628 & 0.2271 & 1.0481 & 0.4608 & 0.6788 \tabularnewline
84 & 0.2563 & -0.5739 & 0.2849 & 2.6231 & 0.8212 & 0.9062 \tabularnewline
85 & 0.276 & -0.5038 & 0.3162 & 2.0217 & 0.9927 & 0.9963 \tabularnewline
86 & 0.2947 & -0.5745 & 0.3485 & 2.6284 & 1.1971 & 1.0941 \tabularnewline
87 & 0.3127 & -0.54 & 0.3698 & 2.3226 & 1.3222 & 1.1499 \tabularnewline
88 & 0.3299 & -0.6103 & 0.3938 & 2.9664 & 1.4866 & 1.2193 \tabularnewline
89 & 0.3465 & -0.6452 & 0.4167 & 3.3149 & 1.6528 & 1.2856 \tabularnewline
90 & 0.3626 & -0.7037 & 0.4406 & 3.9438 & 1.8437 & 1.3578 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112750&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]79[/C][C]0.1296[/C][C]-0.1496[/C][C]0[/C][C]0.1782[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]80[/C][C]0.1613[/C][C]-0.1486[/C][C]0.1491[/C][C]0.1759[/C][C]0.177[/C][C]0.4207[/C][/ROW]
[ROW][C]81[/C][C]0.1885[/C][C]-0.2196[/C][C]0.1726[/C][C]0.3841[/C][C]0.246[/C][C]0.496[/C][/ROW]
[ROW][C]82[/C][C]0.2129[/C][C]-0.2549[/C][C]0.1932[/C][C]0.5177[/C][C]0.3139[/C][C]0.5603[/C][/ROW]
[ROW][C]83[/C][C]0.2354[/C][C]-0.3628[/C][C]0.2271[/C][C]1.0481[/C][C]0.4608[/C][C]0.6788[/C][/ROW]
[ROW][C]84[/C][C]0.2563[/C][C]-0.5739[/C][C]0.2849[/C][C]2.6231[/C][C]0.8212[/C][C]0.9062[/C][/ROW]
[ROW][C]85[/C][C]0.276[/C][C]-0.5038[/C][C]0.3162[/C][C]2.0217[/C][C]0.9927[/C][C]0.9963[/C][/ROW]
[ROW][C]86[/C][C]0.2947[/C][C]-0.5745[/C][C]0.3485[/C][C]2.6284[/C][C]1.1971[/C][C]1.0941[/C][/ROW]
[ROW][C]87[/C][C]0.3127[/C][C]-0.54[/C][C]0.3698[/C][C]2.3226[/C][C]1.3222[/C][C]1.1499[/C][/ROW]
[ROW][C]88[/C][C]0.3299[/C][C]-0.6103[/C][C]0.3938[/C][C]2.9664[/C][C]1.4866[/C][C]1.2193[/C][/ROW]
[ROW][C]89[/C][C]0.3465[/C][C]-0.6452[/C][C]0.4167[/C][C]3.3149[/C][C]1.6528[/C][C]1.2856[/C][/ROW]
[ROW][C]90[/C][C]0.3626[/C][C]-0.7037[/C][C]0.4406[/C][C]3.9438[/C][C]1.8437[/C][C]1.3578[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112750&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112750&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
790.1296-0.149600.178200
800.1613-0.14860.14910.17590.1770.4207
810.1885-0.21960.17260.38410.2460.496
820.2129-0.25490.19320.51770.31390.5603
830.2354-0.36280.22711.04810.46080.6788
840.2563-0.57390.28492.62310.82120.9062
850.276-0.50380.31622.02170.99270.9963
860.2947-0.57450.34852.62841.19711.0941
870.3127-0.540.36982.32261.32221.1499
880.3299-0.61030.39382.96641.48661.2193
890.3465-0.64520.41673.31491.65281.2856
900.3626-0.70370.44063.94381.84371.3578



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