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 computationThu, 06 Dec 2012 10:37:06 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2012/Dec/06/t1354808244xgx27wkmgyv4ypl.htm/, Retrieved Thu, 25 Apr 2024 23:35:52 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=197140, Retrieved Thu, 25 Apr 2024 23:35:52 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact126
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]
- R PD      [ARIMA Forecasting] [WS9 5 Arima s24] [2010-12-07 16:19:30] [afe9379cca749d06b3d6872e02cc47ed]
- R P         [ARIMA Forecasting] [] [2012-12-04 16:49:49] [74be16979710d4c4e7c6647856088456]
-   P             [ARIMA Forecasting] [Verbeterde versie...] [2012-12-06 15:37:06] [ed5db9d6207bcb51aca69986e23f030b] [Current]
Feedback Forum

Post a new message
Dataseries X:
12008
9169
8788
8417
8247
8197
8236
8253
7733
8366
8626
8863
10102
8463
9114
8563
8872
8301
8301
8278
7736
7973
8268
9476
11100
8962
9173
8738
8459
8078
8411
8291
7810
8616
8312
9692
9911
8915
9452
9112
8472
8230
8384
8625
8221
8649
8625
10443
10357
8586
8892
8329
8101
7922
8120
7838
7735
8406
8209
9451
10041
9411
10405
8467
8464
8102
7627
7513
7510
8291
8064
9383
9706
8579
9474
8318
8213
8059
9111
7708
7680
8014
8007
8718
9486
9113
9025
8476
7952
7759
7835
7600
7651
8319
8812
8630




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net

\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 & 3 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ jenkins.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=197140&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ jenkins.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=197140&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=197140&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 time3 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net







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[84])
729383-------
739706-------
748579-------
759474-------
768318-------
778213-------
788059-------
799111-------
807708-------
817680-------
828014-------
838007-------
848718-------
8594869469.75348627.68710311.81990.48490.95990.29120.9599
8691138627.35127697.72199556.98050.15290.03510.54060.4242
8790259417.30418468.995310365.61280.20870.73530.45340.9258
8884768385.67797432.91169338.44430.42630.09420.55540.2471
8979528288.71047334.72949242.69150.24450.35020.56180.1889
9077598091.80097137.41419046.18780.24720.6130.52690.0992
9178358507.96027553.39559462.52490.08350.9380.10780.3331
9276007823.38546868.71718778.05370.32330.49050.59360.0331
9376517750.39666795.65228705.14110.41920.62120.55750.0235
9483198210.51077255.70099165.32040.41190.87460.65670.1488
9588128132.28687177.41559087.15810.08150.35080.60150.1146
9686309054.81918099.886810009.75130.19160.69090.75530.7553

\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[84]) \tabularnewline
72 & 9383 & - & - & - & - & - & - & - \tabularnewline
73 & 9706 & - & - & - & - & - & - & - \tabularnewline
74 & 8579 & - & - & - & - & - & - & - \tabularnewline
75 & 9474 & - & - & - & - & - & - & - \tabularnewline
76 & 8318 & - & - & - & - & - & - & - \tabularnewline
77 & 8213 & - & - & - & - & - & - & - \tabularnewline
78 & 8059 & - & - & - & - & - & - & - \tabularnewline
79 & 9111 & - & - & - & - & - & - & - \tabularnewline
80 & 7708 & - & - & - & - & - & - & - \tabularnewline
81 & 7680 & - & - & - & - & - & - & - \tabularnewline
82 & 8014 & - & - & - & - & - & - & - \tabularnewline
83 & 8007 & - & - & - & - & - & - & - \tabularnewline
84 & 8718 & - & - & - & - & - & - & - \tabularnewline
85 & 9486 & 9469.7534 & 8627.687 & 10311.8199 & 0.4849 & 0.9599 & 0.2912 & 0.9599 \tabularnewline
86 & 9113 & 8627.3512 & 7697.7219 & 9556.9805 & 0.1529 & 0.0351 & 0.5406 & 0.4242 \tabularnewline
87 & 9025 & 9417.3041 & 8468.9953 & 10365.6128 & 0.2087 & 0.7353 & 0.4534 & 0.9258 \tabularnewline
88 & 8476 & 8385.6779 & 7432.9116 & 9338.4443 & 0.4263 & 0.0942 & 0.5554 & 0.2471 \tabularnewline
89 & 7952 & 8288.7104 & 7334.7294 & 9242.6915 & 0.2445 & 0.3502 & 0.5618 & 0.1889 \tabularnewline
90 & 7759 & 8091.8009 & 7137.4141 & 9046.1878 & 0.2472 & 0.613 & 0.5269 & 0.0992 \tabularnewline
91 & 7835 & 8507.9602 & 7553.3955 & 9462.5249 & 0.0835 & 0.938 & 0.1078 & 0.3331 \tabularnewline
92 & 7600 & 7823.3854 & 6868.7171 & 8778.0537 & 0.3233 & 0.4905 & 0.5936 & 0.0331 \tabularnewline
93 & 7651 & 7750.3966 & 6795.6522 & 8705.1411 & 0.4192 & 0.6212 & 0.5575 & 0.0235 \tabularnewline
94 & 8319 & 8210.5107 & 7255.7009 & 9165.3204 & 0.4119 & 0.8746 & 0.6567 & 0.1488 \tabularnewline
95 & 8812 & 8132.2868 & 7177.4155 & 9087.1581 & 0.0815 & 0.3508 & 0.6015 & 0.1146 \tabularnewline
96 & 8630 & 9054.8191 & 8099.8868 & 10009.7513 & 0.1916 & 0.6909 & 0.7553 & 0.7553 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=197140&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[84])[/C][/ROW]
[ROW][C]72[/C][C]9383[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]9706[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]8579[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]9474[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]8318[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]8213[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]8059[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]9111[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]7708[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]7680[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]8014[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]8007[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]8718[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]9486[/C][C]9469.7534[/C][C]8627.687[/C][C]10311.8199[/C][C]0.4849[/C][C]0.9599[/C][C]0.2912[/C][C]0.9599[/C][/ROW]
[ROW][C]86[/C][C]9113[/C][C]8627.3512[/C][C]7697.7219[/C][C]9556.9805[/C][C]0.1529[/C][C]0.0351[/C][C]0.5406[/C][C]0.4242[/C][/ROW]
[ROW][C]87[/C][C]9025[/C][C]9417.3041[/C][C]8468.9953[/C][C]10365.6128[/C][C]0.2087[/C][C]0.7353[/C][C]0.4534[/C][C]0.9258[/C][/ROW]
[ROW][C]88[/C][C]8476[/C][C]8385.6779[/C][C]7432.9116[/C][C]9338.4443[/C][C]0.4263[/C][C]0.0942[/C][C]0.5554[/C][C]0.2471[/C][/ROW]
[ROW][C]89[/C][C]7952[/C][C]8288.7104[/C][C]7334.7294[/C][C]9242.6915[/C][C]0.2445[/C][C]0.3502[/C][C]0.5618[/C][C]0.1889[/C][/ROW]
[ROW][C]90[/C][C]7759[/C][C]8091.8009[/C][C]7137.4141[/C][C]9046.1878[/C][C]0.2472[/C][C]0.613[/C][C]0.5269[/C][C]0.0992[/C][/ROW]
[ROW][C]91[/C][C]7835[/C][C]8507.9602[/C][C]7553.3955[/C][C]9462.5249[/C][C]0.0835[/C][C]0.938[/C][C]0.1078[/C][C]0.3331[/C][/ROW]
[ROW][C]92[/C][C]7600[/C][C]7823.3854[/C][C]6868.7171[/C][C]8778.0537[/C][C]0.3233[/C][C]0.4905[/C][C]0.5936[/C][C]0.0331[/C][/ROW]
[ROW][C]93[/C][C]7651[/C][C]7750.3966[/C][C]6795.6522[/C][C]8705.1411[/C][C]0.4192[/C][C]0.6212[/C][C]0.5575[/C][C]0.0235[/C][/ROW]
[ROW][C]94[/C][C]8319[/C][C]8210.5107[/C][C]7255.7009[/C][C]9165.3204[/C][C]0.4119[/C][C]0.8746[/C][C]0.6567[/C][C]0.1488[/C][/ROW]
[ROW][C]95[/C][C]8812[/C][C]8132.2868[/C][C]7177.4155[/C][C]9087.1581[/C][C]0.0815[/C][C]0.3508[/C][C]0.6015[/C][C]0.1146[/C][/ROW]
[ROW][C]96[/C][C]8630[/C][C]9054.8191[/C][C]8099.8868[/C][C]10009.7513[/C][C]0.1916[/C][C]0.6909[/C][C]0.7553[/C][C]0.7553[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=197140&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=197140&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[84])
729383-------
739706-------
748579-------
759474-------
768318-------
778213-------
788059-------
799111-------
807708-------
817680-------
828014-------
838007-------
848718-------
8594869469.75348627.68710311.81990.48490.95990.29120.9599
8691138627.35127697.72199556.98050.15290.03510.54060.4242
8790259417.30418468.995310365.61280.20870.73530.45340.9258
8884768385.67797432.91169338.44430.42630.09420.55540.2471
8979528288.71047334.72949242.69150.24450.35020.56180.1889
9077598091.80097137.41419046.18780.24720.6130.52690.0992
9178358507.96027553.39559462.52490.08350.9380.10780.3331
9276007823.38546868.71718778.05370.32330.49050.59360.0331
9376517750.39666795.65228705.14110.41920.62120.55750.0235
9483198210.51077255.70099165.32040.41190.87460.65670.1488
9588128132.28687177.41559087.15810.08150.35080.60150.1146
9686309054.81918099.886810009.75130.19160.69090.75530.7553







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
850.04540.00170263.950400
860.0550.05630.029235854.7516118059.351343.5977
870.0514-0.04170.0332153902.4692130007.0571360.5649
880.0580.01080.02768158.078599544.8124315.5072
890.0587-0.04060.0302113373.9256102310.6351319.8603
900.0602-0.04110.032110756.4666103718.2737322.0532
910.0572-0.07910.0388452875.4018153597.8634391.9156
920.0623-0.02860.037549901.0363140635.76375.0143
930.0629-0.01280.03479879.6869126107.3074355.1159
940.05930.01320.032611769.9383114673.5705338.6349
950.05990.08360.0372462010.0438146249.6136382.426
960.0538-0.04690.038180471.2395149101.4157386.1365

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
85 & 0.0454 & 0.0017 & 0 & 263.9504 & 0 & 0 \tabularnewline
86 & 0.055 & 0.0563 & 0.029 & 235854.7516 & 118059.351 & 343.5977 \tabularnewline
87 & 0.0514 & -0.0417 & 0.0332 & 153902.4692 & 130007.0571 & 360.5649 \tabularnewline
88 & 0.058 & 0.0108 & 0.0276 & 8158.0785 & 99544.8124 & 315.5072 \tabularnewline
89 & 0.0587 & -0.0406 & 0.0302 & 113373.9256 & 102310.6351 & 319.8603 \tabularnewline
90 & 0.0602 & -0.0411 & 0.032 & 110756.4666 & 103718.2737 & 322.0532 \tabularnewline
91 & 0.0572 & -0.0791 & 0.0388 & 452875.4018 & 153597.8634 & 391.9156 \tabularnewline
92 & 0.0623 & -0.0286 & 0.0375 & 49901.0363 & 140635.76 & 375.0143 \tabularnewline
93 & 0.0629 & -0.0128 & 0.0347 & 9879.6869 & 126107.3074 & 355.1159 \tabularnewline
94 & 0.0593 & 0.0132 & 0.0326 & 11769.9383 & 114673.5705 & 338.6349 \tabularnewline
95 & 0.0599 & 0.0836 & 0.0372 & 462010.0438 & 146249.6136 & 382.426 \tabularnewline
96 & 0.0538 & -0.0469 & 0.038 & 180471.2395 & 149101.4157 & 386.1365 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=197140&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]85[/C][C]0.0454[/C][C]0.0017[/C][C]0[/C][C]263.9504[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]86[/C][C]0.055[/C][C]0.0563[/C][C]0.029[/C][C]235854.7516[/C][C]118059.351[/C][C]343.5977[/C][/ROW]
[ROW][C]87[/C][C]0.0514[/C][C]-0.0417[/C][C]0.0332[/C][C]153902.4692[/C][C]130007.0571[/C][C]360.5649[/C][/ROW]
[ROW][C]88[/C][C]0.058[/C][C]0.0108[/C][C]0.0276[/C][C]8158.0785[/C][C]99544.8124[/C][C]315.5072[/C][/ROW]
[ROW][C]89[/C][C]0.0587[/C][C]-0.0406[/C][C]0.0302[/C][C]113373.9256[/C][C]102310.6351[/C][C]319.8603[/C][/ROW]
[ROW][C]90[/C][C]0.0602[/C][C]-0.0411[/C][C]0.032[/C][C]110756.4666[/C][C]103718.2737[/C][C]322.0532[/C][/ROW]
[ROW][C]91[/C][C]0.0572[/C][C]-0.0791[/C][C]0.0388[/C][C]452875.4018[/C][C]153597.8634[/C][C]391.9156[/C][/ROW]
[ROW][C]92[/C][C]0.0623[/C][C]-0.0286[/C][C]0.0375[/C][C]49901.0363[/C][C]140635.76[/C][C]375.0143[/C][/ROW]
[ROW][C]93[/C][C]0.0629[/C][C]-0.0128[/C][C]0.0347[/C][C]9879.6869[/C][C]126107.3074[/C][C]355.1159[/C][/ROW]
[ROW][C]94[/C][C]0.0593[/C][C]0.0132[/C][C]0.0326[/C][C]11769.9383[/C][C]114673.5705[/C][C]338.6349[/C][/ROW]
[ROW][C]95[/C][C]0.0599[/C][C]0.0836[/C][C]0.0372[/C][C]462010.0438[/C][C]146249.6136[/C][C]382.426[/C][/ROW]
[ROW][C]96[/C][C]0.0538[/C][C]-0.0469[/C][C]0.038[/C][C]180471.2395[/C][C]149101.4157[/C][C]386.1365[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=197140&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=197140&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
850.04540.00170263.950400
860.0550.05630.029235854.7516118059.351343.5977
870.0514-0.04170.0332153902.4692130007.0571360.5649
880.0580.01080.02768158.078599544.8124315.5072
890.0587-0.04060.0302113373.9256102310.6351319.8603
900.0602-0.04110.032110756.4666103718.2737322.0532
910.0572-0.07910.0388452875.4018153597.8634391.9156
920.0623-0.02860.037549901.0363140635.76375.0143
930.0629-0.01280.03479879.6869126107.3074355.1159
940.05930.01320.032611769.9383114673.5705338.6349
950.05990.08360.0372462010.0438146249.6136382.426
960.0538-0.04690.038180471.2395149101.4157386.1365



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