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 03:36:15 -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/t1354869420fi33zdz0oz8x4mm.htm/, Retrieved Sat, 20 Apr 2024 15:23:50 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=197257, Retrieved Sat, 20 Apr 2024 15:23:50 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact152
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] [workshop 9: ARIMA...] [2012-12-04 18:48:14] [74be16979710d4c4e7c6647856088456]
-   P             [ARIMA Forecasting] [Sterftegevallen] [2012-12-07 08:36:15] [88970af05b38e2e8b1d3faaed6004b57] [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 time2 seconds
R Server'Herman Ole Andreas Wold' @ wold.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 & 2 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ wold.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=197257&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]'Herman Ole Andreas Wold' @ wold.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=197257&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=197257&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'Herman Ole Andreas Wold' @ wold.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-------
8594869505.64968694.351110316.9480.48110.97150.31420.9715
8691138930.53798032.40829828.66760.34520.11270.77850.6786
87902510034.25839116.566910951.94970.01560.97540.88430.9975
8884768355.2357432.44269278.02750.39880.07740.53150.2205
8979528322.89557398.56319247.22790.21580.37270.59210.2011
9077598048.71017123.8398973.58120.26960.58120.49130.078
9178358283.38067358.29759208.46380.17110.86670.03980.1786
9276007539.75376614.58048464.9270.44920.26580.36080.0063
9376517526.65886601.44548451.87220.39610.43830.37270.0058
9483198071.88837146.65648997.12030.30030.81370.54880.0855
9588127968.42517043.18378893.66660.0370.22880.46740.0562
9686309005.798080.54229931.03780.2130.65930.72890.7289

\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 & 9505.6496 & 8694.3511 & 10316.948 & 0.4811 & 0.9715 & 0.3142 & 0.9715 \tabularnewline
86 & 9113 & 8930.5379 & 8032.4082 & 9828.6676 & 0.3452 & 0.1127 & 0.7785 & 0.6786 \tabularnewline
87 & 9025 & 10034.2583 & 9116.5669 & 10951.9497 & 0.0156 & 0.9754 & 0.8843 & 0.9975 \tabularnewline
88 & 8476 & 8355.235 & 7432.4426 & 9278.0275 & 0.3988 & 0.0774 & 0.5315 & 0.2205 \tabularnewline
89 & 7952 & 8322.8955 & 7398.5631 & 9247.2279 & 0.2158 & 0.3727 & 0.5921 & 0.2011 \tabularnewline
90 & 7759 & 8048.7101 & 7123.839 & 8973.5812 & 0.2696 & 0.5812 & 0.4913 & 0.078 \tabularnewline
91 & 7835 & 8283.3806 & 7358.2975 & 9208.4638 & 0.1711 & 0.8667 & 0.0398 & 0.1786 \tabularnewline
92 & 7600 & 7539.7537 & 6614.5804 & 8464.927 & 0.4492 & 0.2658 & 0.3608 & 0.0063 \tabularnewline
93 & 7651 & 7526.6588 & 6601.4454 & 8451.8722 & 0.3961 & 0.4383 & 0.3727 & 0.0058 \tabularnewline
94 & 8319 & 8071.8883 & 7146.6564 & 8997.1203 & 0.3003 & 0.8137 & 0.5488 & 0.0855 \tabularnewline
95 & 8812 & 7968.4251 & 7043.1837 & 8893.6666 & 0.037 & 0.2288 & 0.4674 & 0.0562 \tabularnewline
96 & 8630 & 9005.79 & 8080.5422 & 9931.0378 & 0.213 & 0.6593 & 0.7289 & 0.7289 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=197257&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]9505.6496[/C][C]8694.3511[/C][C]10316.948[/C][C]0.4811[/C][C]0.9715[/C][C]0.3142[/C][C]0.9715[/C][/ROW]
[ROW][C]86[/C][C]9113[/C][C]8930.5379[/C][C]8032.4082[/C][C]9828.6676[/C][C]0.3452[/C][C]0.1127[/C][C]0.7785[/C][C]0.6786[/C][/ROW]
[ROW][C]87[/C][C]9025[/C][C]10034.2583[/C][C]9116.5669[/C][C]10951.9497[/C][C]0.0156[/C][C]0.9754[/C][C]0.8843[/C][C]0.9975[/C][/ROW]
[ROW][C]88[/C][C]8476[/C][C]8355.235[/C][C]7432.4426[/C][C]9278.0275[/C][C]0.3988[/C][C]0.0774[/C][C]0.5315[/C][C]0.2205[/C][/ROW]
[ROW][C]89[/C][C]7952[/C][C]8322.8955[/C][C]7398.5631[/C][C]9247.2279[/C][C]0.2158[/C][C]0.3727[/C][C]0.5921[/C][C]0.2011[/C][/ROW]
[ROW][C]90[/C][C]7759[/C][C]8048.7101[/C][C]7123.839[/C][C]8973.5812[/C][C]0.2696[/C][C]0.5812[/C][C]0.4913[/C][C]0.078[/C][/ROW]
[ROW][C]91[/C][C]7835[/C][C]8283.3806[/C][C]7358.2975[/C][C]9208.4638[/C][C]0.1711[/C][C]0.8667[/C][C]0.0398[/C][C]0.1786[/C][/ROW]
[ROW][C]92[/C][C]7600[/C][C]7539.7537[/C][C]6614.5804[/C][C]8464.927[/C][C]0.4492[/C][C]0.2658[/C][C]0.3608[/C][C]0.0063[/C][/ROW]
[ROW][C]93[/C][C]7651[/C][C]7526.6588[/C][C]6601.4454[/C][C]8451.8722[/C][C]0.3961[/C][C]0.4383[/C][C]0.3727[/C][C]0.0058[/C][/ROW]
[ROW][C]94[/C][C]8319[/C][C]8071.8883[/C][C]7146.6564[/C][C]8997.1203[/C][C]0.3003[/C][C]0.8137[/C][C]0.5488[/C][C]0.0855[/C][/ROW]
[ROW][C]95[/C][C]8812[/C][C]7968.4251[/C][C]7043.1837[/C][C]8893.6666[/C][C]0.037[/C][C]0.2288[/C][C]0.4674[/C][C]0.0562[/C][/ROW]
[ROW][C]96[/C][C]8630[/C][C]9005.79[/C][C]8080.5422[/C][C]9931.0378[/C][C]0.213[/C][C]0.6593[/C][C]0.7289[/C][C]0.7289[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=197257&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=197257&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-------
8594869505.64968694.351110316.9480.48110.97150.31420.9715
8691138930.53798032.40829828.66760.34520.11270.77850.6786
87902510034.25839116.566910951.94970.01560.97540.88430.9975
8884768355.2357432.44269278.02750.39880.07740.53150.2205
8979528322.89557398.56319247.22790.21580.37270.59210.2011
9077598048.71017123.8398973.58120.26960.58120.49130.078
9178358283.38067358.29759208.46380.17110.86670.03980.1786
9276007539.75376614.58048464.9270.44920.26580.36080.0063
9376517526.65886601.44548451.87220.39610.43830.37270.0058
9483198071.88837146.65648997.12030.30030.81370.54880.0855
9588127968.42517043.18378893.66660.0370.22880.46740.0562
9686309005.798080.54229931.03780.2130.65930.72890.7289







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
850.0435-0.00210386.105200
860.05130.02040.011233292.418916839.262129.7662
870.0467-0.10060.0411018602.2379350760.254592.2502
880.05630.01450.034414584.1744266716.2341516.4458
890.0567-0.04460.0364137563.4682240885.6809490.8011
900.0586-0.0360.036383931.9575214726.727463.3862
910.057-0.05410.0389201045.1971212772.2227461.2724
920.06260.0080.0353629.6187186629.3972432.0062
930.06270.01650.03315460.7419167610.6577409.4028
940.05850.03060.032761064.1789156956.0099396.1767
950.05920.10590.0394711618.532207379.8755455.3898
960.0524-0.04170.0396141218.122201866.3961449.2954

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
85 & 0.0435 & -0.0021 & 0 & 386.1052 & 0 & 0 \tabularnewline
86 & 0.0513 & 0.0204 & 0.0112 & 33292.4189 & 16839.262 & 129.7662 \tabularnewline
87 & 0.0467 & -0.1006 & 0.041 & 1018602.2379 & 350760.254 & 592.2502 \tabularnewline
88 & 0.0563 & 0.0145 & 0.0344 & 14584.1744 & 266716.2341 & 516.4458 \tabularnewline
89 & 0.0567 & -0.0446 & 0.0364 & 137563.4682 & 240885.6809 & 490.8011 \tabularnewline
90 & 0.0586 & -0.036 & 0.0363 & 83931.9575 & 214726.727 & 463.3862 \tabularnewline
91 & 0.057 & -0.0541 & 0.0389 & 201045.1971 & 212772.2227 & 461.2724 \tabularnewline
92 & 0.0626 & 0.008 & 0.035 & 3629.6187 & 186629.3972 & 432.0062 \tabularnewline
93 & 0.0627 & 0.0165 & 0.033 & 15460.7419 & 167610.6577 & 409.4028 \tabularnewline
94 & 0.0585 & 0.0306 & 0.0327 & 61064.1789 & 156956.0099 & 396.1767 \tabularnewline
95 & 0.0592 & 0.1059 & 0.0394 & 711618.532 & 207379.8755 & 455.3898 \tabularnewline
96 & 0.0524 & -0.0417 & 0.0396 & 141218.122 & 201866.3961 & 449.2954 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=197257&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.0435[/C][C]-0.0021[/C][C]0[/C][C]386.1052[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]86[/C][C]0.0513[/C][C]0.0204[/C][C]0.0112[/C][C]33292.4189[/C][C]16839.262[/C][C]129.7662[/C][/ROW]
[ROW][C]87[/C][C]0.0467[/C][C]-0.1006[/C][C]0.041[/C][C]1018602.2379[/C][C]350760.254[/C][C]592.2502[/C][/ROW]
[ROW][C]88[/C][C]0.0563[/C][C]0.0145[/C][C]0.0344[/C][C]14584.1744[/C][C]266716.2341[/C][C]516.4458[/C][/ROW]
[ROW][C]89[/C][C]0.0567[/C][C]-0.0446[/C][C]0.0364[/C][C]137563.4682[/C][C]240885.6809[/C][C]490.8011[/C][/ROW]
[ROW][C]90[/C][C]0.0586[/C][C]-0.036[/C][C]0.0363[/C][C]83931.9575[/C][C]214726.727[/C][C]463.3862[/C][/ROW]
[ROW][C]91[/C][C]0.057[/C][C]-0.0541[/C][C]0.0389[/C][C]201045.1971[/C][C]212772.2227[/C][C]461.2724[/C][/ROW]
[ROW][C]92[/C][C]0.0626[/C][C]0.008[/C][C]0.035[/C][C]3629.6187[/C][C]186629.3972[/C][C]432.0062[/C][/ROW]
[ROW][C]93[/C][C]0.0627[/C][C]0.0165[/C][C]0.033[/C][C]15460.7419[/C][C]167610.6577[/C][C]409.4028[/C][/ROW]
[ROW][C]94[/C][C]0.0585[/C][C]0.0306[/C][C]0.0327[/C][C]61064.1789[/C][C]156956.0099[/C][C]396.1767[/C][/ROW]
[ROW][C]95[/C][C]0.0592[/C][C]0.1059[/C][C]0.0394[/C][C]711618.532[/C][C]207379.8755[/C][C]455.3898[/C][/ROW]
[ROW][C]96[/C][C]0.0524[/C][C]-0.0417[/C][C]0.0396[/C][C]141218.122[/C][C]201866.3961[/C][C]449.2954[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=197257&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=197257&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.0435-0.00210386.105200
860.05130.02040.011233292.418916839.262129.7662
870.0467-0.10060.0411018602.2379350760.254592.2502
880.05630.01450.034414584.1744266716.2341516.4458
890.0567-0.04460.0364137563.4682240885.6809490.8011
900.0586-0.0360.036383931.9575214726.727463.3862
910.057-0.05410.0389201045.1971212772.2227461.2724
920.06260.0080.0353629.6187186629.3972432.0062
930.06270.01650.03315460.7419167610.6577409.4028
940.05850.03060.032761064.1789156956.0099396.1767
950.05920.10590.0394711618.532207379.8755455.3898
960.0524-0.04170.0396141218.122201866.3961449.2954



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