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 computationFri, 07 Dec 2012 04:49:16 -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/07/t1354873770i52oy3ic39ao1vr.htm/, Retrieved Fri, 26 Apr 2024 21:15:35 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=197265, Retrieved Fri, 26 Apr 2024 21:15:35 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact175
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 FOUTM...] [2010-12-07 16:14:08] [afe9379cca749d06b3d6872e02cc47ed]
- R P         [ARIMA Forecasting] [WS9 ARIMA Forcasting] [2012-11-29 14:49:48] [617a576b3e2f0c57f6da5ea5fef54049]
-   P             [ARIMA Forecasting] [Arima forcasting] [2012-12-07 09:49:16] [91c3d91830a25c0bc67fd9a0665302b1] [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 time6 seconds
R Server'Sir Maurice George Kendall' @ kendall.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 & 6 seconds \tabularnewline
R Server & 'Sir Maurice George Kendall' @ kendall.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=197265&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]6 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Maurice George Kendall' @ kendall.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=197265&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=197265&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 time6 seconds
R Server'Sir Maurice George Kendall' @ kendall.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])
729382.99999999999-------
739705.99999999999-------
748579-------
759473.99999999999-------
768317.99999999999-------
778213-------
788059.00000000001-------
799111-------
807708-------
817680-------
828014.00000000001-------
838007-------
848718-------
8594869621.56338838.560910473.93130.37760.98110.4230.9811
8691138830.97958051.67539685.71090.25890.06650.71830.6022
87902510115.43919186.674211138.10130.01830.97260.89050.9963
8884768333.26237566.05369178.26710.37030.05430.51410.1861
8979528449.26127667.0829311.23660.12910.47580.70440.2706
9077598044.32197299.62178864.99570.24780.58730.4860.0538
9178358313.02017542.3879162.39170.1350.89950.03280.175
9276007568.99656867.16218342.55950.46870.25020.36230.0018
9376517643.5376934.38358425.21290.49250.54350.46360.0035
9483198106.41087354.10098935.68050.30770.85910.58640.0742
9588128085.74117335.10688913.19120.04270.29030.5740.0671
9686309084.93818241.357810014.86690.16880.71740.78040.7804

\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 & 9382.99999999999 & - & - & - & - & - & - & - \tabularnewline
73 & 9705.99999999999 & - & - & - & - & - & - & - \tabularnewline
74 & 8579 & - & - & - & - & - & - & - \tabularnewline
75 & 9473.99999999999 & - & - & - & - & - & - & - \tabularnewline
76 & 8317.99999999999 & - & - & - & - & - & - & - \tabularnewline
77 & 8213 & - & - & - & - & - & - & - \tabularnewline
78 & 8059.00000000001 & - & - & - & - & - & - & - \tabularnewline
79 & 9111 & - & - & - & - & - & - & - \tabularnewline
80 & 7708 & - & - & - & - & - & - & - \tabularnewline
81 & 7680 & - & - & - & - & - & - & - \tabularnewline
82 & 8014.00000000001 & - & - & - & - & - & - & - \tabularnewline
83 & 8007 & - & - & - & - & - & - & - \tabularnewline
84 & 8718 & - & - & - & - & - & - & - \tabularnewline
85 & 9486 & 9621.5633 & 8838.5609 & 10473.9313 & 0.3776 & 0.9811 & 0.423 & 0.9811 \tabularnewline
86 & 9113 & 8830.9795 & 8051.6753 & 9685.7109 & 0.2589 & 0.0665 & 0.7183 & 0.6022 \tabularnewline
87 & 9025 & 10115.4391 & 9186.6742 & 11138.1013 & 0.0183 & 0.9726 & 0.8905 & 0.9963 \tabularnewline
88 & 8476 & 8333.2623 & 7566.0536 & 9178.2671 & 0.3703 & 0.0543 & 0.5141 & 0.1861 \tabularnewline
89 & 7952 & 8449.2612 & 7667.082 & 9311.2366 & 0.1291 & 0.4758 & 0.7044 & 0.2706 \tabularnewline
90 & 7759 & 8044.3219 & 7299.6217 & 8864.9957 & 0.2478 & 0.5873 & 0.486 & 0.0538 \tabularnewline
91 & 7835 & 8313.0201 & 7542.387 & 9162.3917 & 0.135 & 0.8995 & 0.0328 & 0.175 \tabularnewline
92 & 7600 & 7568.9965 & 6867.1621 & 8342.5595 & 0.4687 & 0.2502 & 0.3623 & 0.0018 \tabularnewline
93 & 7651 & 7643.537 & 6934.3835 & 8425.2129 & 0.4925 & 0.5435 & 0.4636 & 0.0035 \tabularnewline
94 & 8319 & 8106.4108 & 7354.1009 & 8935.6805 & 0.3077 & 0.8591 & 0.5864 & 0.0742 \tabularnewline
95 & 8812 & 8085.7411 & 7335.1068 & 8913.1912 & 0.0427 & 0.2903 & 0.574 & 0.0671 \tabularnewline
96 & 8630 & 9084.9381 & 8241.3578 & 10014.8669 & 0.1688 & 0.7174 & 0.7804 & 0.7804 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=197265&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]9382.99999999999[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]9705.99999999999[/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]9473.99999999999[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]8317.99999999999[/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.00000000001[/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.00000000001[/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]9621.5633[/C][C]8838.5609[/C][C]10473.9313[/C][C]0.3776[/C][C]0.9811[/C][C]0.423[/C][C]0.9811[/C][/ROW]
[ROW][C]86[/C][C]9113[/C][C]8830.9795[/C][C]8051.6753[/C][C]9685.7109[/C][C]0.2589[/C][C]0.0665[/C][C]0.7183[/C][C]0.6022[/C][/ROW]
[ROW][C]87[/C][C]9025[/C][C]10115.4391[/C][C]9186.6742[/C][C]11138.1013[/C][C]0.0183[/C][C]0.9726[/C][C]0.8905[/C][C]0.9963[/C][/ROW]
[ROW][C]88[/C][C]8476[/C][C]8333.2623[/C][C]7566.0536[/C][C]9178.2671[/C][C]0.3703[/C][C]0.0543[/C][C]0.5141[/C][C]0.1861[/C][/ROW]
[ROW][C]89[/C][C]7952[/C][C]8449.2612[/C][C]7667.082[/C][C]9311.2366[/C][C]0.1291[/C][C]0.4758[/C][C]0.7044[/C][C]0.2706[/C][/ROW]
[ROW][C]90[/C][C]7759[/C][C]8044.3219[/C][C]7299.6217[/C][C]8864.9957[/C][C]0.2478[/C][C]0.5873[/C][C]0.486[/C][C]0.0538[/C][/ROW]
[ROW][C]91[/C][C]7835[/C][C]8313.0201[/C][C]7542.387[/C][C]9162.3917[/C][C]0.135[/C][C]0.8995[/C][C]0.0328[/C][C]0.175[/C][/ROW]
[ROW][C]92[/C][C]7600[/C][C]7568.9965[/C][C]6867.1621[/C][C]8342.5595[/C][C]0.4687[/C][C]0.2502[/C][C]0.3623[/C][C]0.0018[/C][/ROW]
[ROW][C]93[/C][C]7651[/C][C]7643.537[/C][C]6934.3835[/C][C]8425.2129[/C][C]0.4925[/C][C]0.5435[/C][C]0.4636[/C][C]0.0035[/C][/ROW]
[ROW][C]94[/C][C]8319[/C][C]8106.4108[/C][C]7354.1009[/C][C]8935.6805[/C][C]0.3077[/C][C]0.8591[/C][C]0.5864[/C][C]0.0742[/C][/ROW]
[ROW][C]95[/C][C]8812[/C][C]8085.7411[/C][C]7335.1068[/C][C]8913.1912[/C][C]0.0427[/C][C]0.2903[/C][C]0.574[/C][C]0.0671[/C][/ROW]
[ROW][C]96[/C][C]8630[/C][C]9084.9381[/C][C]8241.3578[/C][C]10014.8669[/C][C]0.1688[/C][C]0.7174[/C][C]0.7804[/C][C]0.7804[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=197265&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=197265&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])
729382.99999999999-------
739705.99999999999-------
748579-------
759473.99999999999-------
768317.99999999999-------
778213-------
788059.00000000001-------
799111-------
807708-------
817680-------
828014.00000000001-------
838007-------
848718-------
8594869621.56338838.560910473.93130.37760.98110.4230.9811
8691138830.97958051.67539685.71090.25890.06650.71830.6022
87902510115.43919186.674211138.10130.01830.97260.89050.9963
8884768333.26237566.05369178.26710.37030.05430.51410.1861
8979528449.26127667.0829311.23660.12910.47580.70440.2706
9077598044.32197299.62178864.99570.24780.58730.4860.0538
9178358313.02017542.3879162.39170.1350.89950.03280.175
9276007568.99656867.16218342.55950.46870.25020.36230.0018
9376517643.5376934.38358425.21290.49250.54350.46360.0035
9483198106.41087354.10098935.68050.30770.85910.58640.0742
9588128085.74117335.10688913.19120.04270.29030.5740.0671
9686309084.93818241.357810014.86690.16880.71740.78040.7804







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
850.0452-0.0141018377.397900
860.04940.03190.02379535.544748956.4713221.2611
870.0516-0.10780.05131189057.3982428990.1136654.9734
880.05170.01710.042720374.0556326836.0991571.6958
890.052-0.05890.046247268.6811310922.6155557.6044
900.0521-0.03550.044281408.6023272670.28522.1784
910.0521-0.05750.0461228503.2237266360.7005516.1014
920.05210.00410.0409961.2176233185.7651482.8931
930.05220.0010.036455.6969207282.4242455.2828
940.05220.02620.035445194.1562191073.5974437.1197
950.05220.08980.0404527451.9396221653.4467470.8009
960.0522-0.05010.0412206968.7116220429.7188469.4994

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
85 & 0.0452 & -0.0141 & 0 & 18377.3979 & 0 & 0 \tabularnewline
86 & 0.0494 & 0.0319 & 0.023 & 79535.5447 & 48956.4713 & 221.2611 \tabularnewline
87 & 0.0516 & -0.1078 & 0.0513 & 1189057.3982 & 428990.1136 & 654.9734 \tabularnewline
88 & 0.0517 & 0.0171 & 0.0427 & 20374.0556 & 326836.0991 & 571.6958 \tabularnewline
89 & 0.052 & -0.0589 & 0.046 & 247268.6811 & 310922.6155 & 557.6044 \tabularnewline
90 & 0.0521 & -0.0355 & 0.0442 & 81408.6023 & 272670.28 & 522.1784 \tabularnewline
91 & 0.0521 & -0.0575 & 0.0461 & 228503.2237 & 266360.7005 & 516.1014 \tabularnewline
92 & 0.0521 & 0.0041 & 0.0409 & 961.2176 & 233185.7651 & 482.8931 \tabularnewline
93 & 0.0522 & 0.001 & 0.0364 & 55.6969 & 207282.4242 & 455.2828 \tabularnewline
94 & 0.0522 & 0.0262 & 0.0354 & 45194.1562 & 191073.5974 & 437.1197 \tabularnewline
95 & 0.0522 & 0.0898 & 0.0404 & 527451.9396 & 221653.4467 & 470.8009 \tabularnewline
96 & 0.0522 & -0.0501 & 0.0412 & 206968.7116 & 220429.7188 & 469.4994 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=197265&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.0452[/C][C]-0.0141[/C][C]0[/C][C]18377.3979[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]86[/C][C]0.0494[/C][C]0.0319[/C][C]0.023[/C][C]79535.5447[/C][C]48956.4713[/C][C]221.2611[/C][/ROW]
[ROW][C]87[/C][C]0.0516[/C][C]-0.1078[/C][C]0.0513[/C][C]1189057.3982[/C][C]428990.1136[/C][C]654.9734[/C][/ROW]
[ROW][C]88[/C][C]0.0517[/C][C]0.0171[/C][C]0.0427[/C][C]20374.0556[/C][C]326836.0991[/C][C]571.6958[/C][/ROW]
[ROW][C]89[/C][C]0.052[/C][C]-0.0589[/C][C]0.046[/C][C]247268.6811[/C][C]310922.6155[/C][C]557.6044[/C][/ROW]
[ROW][C]90[/C][C]0.0521[/C][C]-0.0355[/C][C]0.0442[/C][C]81408.6023[/C][C]272670.28[/C][C]522.1784[/C][/ROW]
[ROW][C]91[/C][C]0.0521[/C][C]-0.0575[/C][C]0.0461[/C][C]228503.2237[/C][C]266360.7005[/C][C]516.1014[/C][/ROW]
[ROW][C]92[/C][C]0.0521[/C][C]0.0041[/C][C]0.0409[/C][C]961.2176[/C][C]233185.7651[/C][C]482.8931[/C][/ROW]
[ROW][C]93[/C][C]0.0522[/C][C]0.001[/C][C]0.0364[/C][C]55.6969[/C][C]207282.4242[/C][C]455.2828[/C][/ROW]
[ROW][C]94[/C][C]0.0522[/C][C]0.0262[/C][C]0.0354[/C][C]45194.1562[/C][C]191073.5974[/C][C]437.1197[/C][/ROW]
[ROW][C]95[/C][C]0.0522[/C][C]0.0898[/C][C]0.0404[/C][C]527451.9396[/C][C]221653.4467[/C][C]470.8009[/C][/ROW]
[ROW][C]96[/C][C]0.0522[/C][C]-0.0501[/C][C]0.0412[/C][C]206968.7116[/C][C]220429.7188[/C][C]469.4994[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=197265&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=197265&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.0452-0.0141018377.397900
860.04940.03190.02379535.544748956.4713221.2611
870.0516-0.10780.05131189057.3982428990.1136654.9734
880.05170.01710.042720374.0556326836.0991571.6958
890.052-0.05890.046247268.6811310922.6155557.6044
900.0521-0.03550.044281408.6023272670.28522.1784
910.0521-0.05750.0461228503.2237266360.7005516.1014
920.05210.00410.0409961.2176233185.7651482.8931
930.05220.0010.036455.6969207282.4242455.2828
940.05220.02620.035445194.1562191073.5974437.1197
950.05220.08980.0404527451.9396221653.4467470.8009
960.0522-0.05010.0412206968.7116220429.7188469.4994



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