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, 17 Dec 2010 09:25:43 +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/17/t1292577885ml6oifl42ayhn2u.htm/, Retrieved Mon, 06 May 2024 12:27:05 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=111357, Retrieved Mon, 06 May 2024 12:27:05 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact179
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]
F   PD      [ARIMA Forecasting] [Forecast Arima cu...] [2010-12-03 11:50:31] [74deae64b71f9d77c839af86f7c687b5]
-   PD          [ARIMA Forecasting] [Forecasting ARIMA...] [2010-12-17 09:25:43] [e665313c9926a9f4bdf6ad1ee5aefad6] [Current]
Feedback Forum

Post a new message
Dataseries X:
101.76
102.37
102.38
102.86
102.87
102.92
102.95
103.02
104.08
104.16
104.24
104.33
104.73
104.86
105.03
105.62
105.63
105.63
105.94
106.61
107.69
107.78
107.93
108.48
108.14
108.48
108.48
108.89
108.93
109.21
109.47
109.80
111.73
111.85
112.12
112.15
112.17
112.67
112.80
113.44
113.53
114.53
114.51
115.05
116.67
117.07
116.92
117.00
117.02
117.35
117.36
117.82
117.88
118.24
118.50
118.80
119.76
120.09




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111357&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'Gwilym Jenkins' @ 72.249.127.135







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[46])
34111.85-------
35112.12-------
36112.15-------
37112.17-------
38112.67-------
39112.8-------
40113.44-------
41113.53-------
42114.53-------
43114.51-------
44115.05-------
45116.67-------
46117.07-------
47116.92117.2815116.6743117.88880.12160.752610.7526
48117117.4988116.64118.35750.12750.906710.8361
49117.02117.4257116.3739118.47740.22480.786210.7463
50117.35117.8376116.6231119.05210.21570.906510.8923
51117.36117.9255116.5677119.28340.20710.79710.8916
52117.82118.4807116.9933119.96810.1920.930110.9685
53117.88118.5463116.9397120.15280.20820.812210.9641
54118.24119.2075117.49120.92510.13480.935110.9926
55118.5119.3142117.4925121.13590.19050.876110.9921
56118.8119.7919117.8717121.71210.15570.906410.9973
57119.76121.4737119.4597123.48760.04770.995411
58120.09121.7488119.6452123.85230.06110.968111

\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[46]) \tabularnewline
34 & 111.85 & - & - & - & - & - & - & - \tabularnewline
35 & 112.12 & - & - & - & - & - & - & - \tabularnewline
36 & 112.15 & - & - & - & - & - & - & - \tabularnewline
37 & 112.17 & - & - & - & - & - & - & - \tabularnewline
38 & 112.67 & - & - & - & - & - & - & - \tabularnewline
39 & 112.8 & - & - & - & - & - & - & - \tabularnewline
40 & 113.44 & - & - & - & - & - & - & - \tabularnewline
41 & 113.53 & - & - & - & - & - & - & - \tabularnewline
42 & 114.53 & - & - & - & - & - & - & - \tabularnewline
43 & 114.51 & - & - & - & - & - & - & - \tabularnewline
44 & 115.05 & - & - & - & - & - & - & - \tabularnewline
45 & 116.67 & - & - & - & - & - & - & - \tabularnewline
46 & 117.07 & - & - & - & - & - & - & - \tabularnewline
47 & 116.92 & 117.2815 & 116.6743 & 117.8888 & 0.1216 & 0.7526 & 1 & 0.7526 \tabularnewline
48 & 117 & 117.4988 & 116.64 & 118.3575 & 0.1275 & 0.9067 & 1 & 0.8361 \tabularnewline
49 & 117.02 & 117.4257 & 116.3739 & 118.4774 & 0.2248 & 0.7862 & 1 & 0.7463 \tabularnewline
50 & 117.35 & 117.8376 & 116.6231 & 119.0521 & 0.2157 & 0.9065 & 1 & 0.8923 \tabularnewline
51 & 117.36 & 117.9255 & 116.5677 & 119.2834 & 0.2071 & 0.797 & 1 & 0.8916 \tabularnewline
52 & 117.82 & 118.4807 & 116.9933 & 119.9681 & 0.192 & 0.9301 & 1 & 0.9685 \tabularnewline
53 & 117.88 & 118.5463 & 116.9397 & 120.1528 & 0.2082 & 0.8122 & 1 & 0.9641 \tabularnewline
54 & 118.24 & 119.2075 & 117.49 & 120.9251 & 0.1348 & 0.9351 & 1 & 0.9926 \tabularnewline
55 & 118.5 & 119.3142 & 117.4925 & 121.1359 & 0.1905 & 0.8761 & 1 & 0.9921 \tabularnewline
56 & 118.8 & 119.7919 & 117.8717 & 121.7121 & 0.1557 & 0.9064 & 1 & 0.9973 \tabularnewline
57 & 119.76 & 121.4737 & 119.4597 & 123.4876 & 0.0477 & 0.9954 & 1 & 1 \tabularnewline
58 & 120.09 & 121.7488 & 119.6452 & 123.8523 & 0.0611 & 0.9681 & 1 & 1 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111357&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[46])[/C][/ROW]
[ROW][C]34[/C][C]111.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]112.12[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]112.15[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]112.17[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]112.67[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]112.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]113.44[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]113.53[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]114.53[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]114.51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]115.05[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]116.67[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]117.07[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]116.92[/C][C]117.2815[/C][C]116.6743[/C][C]117.8888[/C][C]0.1216[/C][C]0.7526[/C][C]1[/C][C]0.7526[/C][/ROW]
[ROW][C]48[/C][C]117[/C][C]117.4988[/C][C]116.64[/C][C]118.3575[/C][C]0.1275[/C][C]0.9067[/C][C]1[/C][C]0.8361[/C][/ROW]
[ROW][C]49[/C][C]117.02[/C][C]117.4257[/C][C]116.3739[/C][C]118.4774[/C][C]0.2248[/C][C]0.7862[/C][C]1[/C][C]0.7463[/C][/ROW]
[ROW][C]50[/C][C]117.35[/C][C]117.8376[/C][C]116.6231[/C][C]119.0521[/C][C]0.2157[/C][C]0.9065[/C][C]1[/C][C]0.8923[/C][/ROW]
[ROW][C]51[/C][C]117.36[/C][C]117.9255[/C][C]116.5677[/C][C]119.2834[/C][C]0.2071[/C][C]0.797[/C][C]1[/C][C]0.8916[/C][/ROW]
[ROW][C]52[/C][C]117.82[/C][C]118.4807[/C][C]116.9933[/C][C]119.9681[/C][C]0.192[/C][C]0.9301[/C][C]1[/C][C]0.9685[/C][/ROW]
[ROW][C]53[/C][C]117.88[/C][C]118.5463[/C][C]116.9397[/C][C]120.1528[/C][C]0.2082[/C][C]0.8122[/C][C]1[/C][C]0.9641[/C][/ROW]
[ROW][C]54[/C][C]118.24[/C][C]119.2075[/C][C]117.49[/C][C]120.9251[/C][C]0.1348[/C][C]0.9351[/C][C]1[/C][C]0.9926[/C][/ROW]
[ROW][C]55[/C][C]118.5[/C][C]119.3142[/C][C]117.4925[/C][C]121.1359[/C][C]0.1905[/C][C]0.8761[/C][C]1[/C][C]0.9921[/C][/ROW]
[ROW][C]56[/C][C]118.8[/C][C]119.7919[/C][C]117.8717[/C][C]121.7121[/C][C]0.1557[/C][C]0.9064[/C][C]1[/C][C]0.9973[/C][/ROW]
[ROW][C]57[/C][C]119.76[/C][C]121.4737[/C][C]119.4597[/C][C]123.4876[/C][C]0.0477[/C][C]0.9954[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]58[/C][C]120.09[/C][C]121.7488[/C][C]119.6452[/C][C]123.8523[/C][C]0.0611[/C][C]0.9681[/C][C]1[/C][C]1[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111357&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111357&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[46])
34111.85-------
35112.12-------
36112.15-------
37112.17-------
38112.67-------
39112.8-------
40113.44-------
41113.53-------
42114.53-------
43114.51-------
44115.05-------
45116.67-------
46117.07-------
47116.92117.2815116.6743117.88880.12160.752610.7526
48117117.4988116.64118.35750.12750.906710.8361
49117.02117.4257116.3739118.47740.22480.786210.7463
50117.35117.8376116.6231119.05210.21570.906510.8923
51117.36117.9255116.5677119.28340.20710.79710.8916
52117.82118.4807116.9933119.96810.1920.930110.9685
53117.88118.5463116.9397120.15280.20820.812210.9641
54118.24119.2075117.49120.92510.13480.935110.9926
55118.5119.3142117.4925121.13590.19050.876110.9921
56118.8119.7919117.8717121.71210.15570.906410.9973
57119.76121.4737119.4597123.48760.04770.995411
58120.09121.7488119.6452123.85230.06110.968111







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
470.0026-0.003100.130700
480.0037-0.00420.00370.24880.18970.4356
490.0046-0.00350.00360.16460.18130.4258
500.0053-0.00410.00370.23770.19540.4421
510.0059-0.00480.00390.31980.22030.4694
520.0064-0.00560.00420.43650.25640.5063
530.0069-0.00560.00440.44390.28310.5321
540.0074-0.00810.00490.93610.36480.604
550.0078-0.00680.00510.66290.39790.6308
560.0082-0.00830.00540.98390.45650.6756
570.0085-0.01410.00622.93660.6820.8258
580.0088-0.01360.00682.75150.85440.9243

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
47 & 0.0026 & -0.0031 & 0 & 0.1307 & 0 & 0 \tabularnewline
48 & 0.0037 & -0.0042 & 0.0037 & 0.2488 & 0.1897 & 0.4356 \tabularnewline
49 & 0.0046 & -0.0035 & 0.0036 & 0.1646 & 0.1813 & 0.4258 \tabularnewline
50 & 0.0053 & -0.0041 & 0.0037 & 0.2377 & 0.1954 & 0.4421 \tabularnewline
51 & 0.0059 & -0.0048 & 0.0039 & 0.3198 & 0.2203 & 0.4694 \tabularnewline
52 & 0.0064 & -0.0056 & 0.0042 & 0.4365 & 0.2564 & 0.5063 \tabularnewline
53 & 0.0069 & -0.0056 & 0.0044 & 0.4439 & 0.2831 & 0.5321 \tabularnewline
54 & 0.0074 & -0.0081 & 0.0049 & 0.9361 & 0.3648 & 0.604 \tabularnewline
55 & 0.0078 & -0.0068 & 0.0051 & 0.6629 & 0.3979 & 0.6308 \tabularnewline
56 & 0.0082 & -0.0083 & 0.0054 & 0.9839 & 0.4565 & 0.6756 \tabularnewline
57 & 0.0085 & -0.0141 & 0.0062 & 2.9366 & 0.682 & 0.8258 \tabularnewline
58 & 0.0088 & -0.0136 & 0.0068 & 2.7515 & 0.8544 & 0.9243 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=111357&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]47[/C][C]0.0026[/C][C]-0.0031[/C][C]0[/C][C]0.1307[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]48[/C][C]0.0037[/C][C]-0.0042[/C][C]0.0037[/C][C]0.2488[/C][C]0.1897[/C][C]0.4356[/C][/ROW]
[ROW][C]49[/C][C]0.0046[/C][C]-0.0035[/C][C]0.0036[/C][C]0.1646[/C][C]0.1813[/C][C]0.4258[/C][/ROW]
[ROW][C]50[/C][C]0.0053[/C][C]-0.0041[/C][C]0.0037[/C][C]0.2377[/C][C]0.1954[/C][C]0.4421[/C][/ROW]
[ROW][C]51[/C][C]0.0059[/C][C]-0.0048[/C][C]0.0039[/C][C]0.3198[/C][C]0.2203[/C][C]0.4694[/C][/ROW]
[ROW][C]52[/C][C]0.0064[/C][C]-0.0056[/C][C]0.0042[/C][C]0.4365[/C][C]0.2564[/C][C]0.5063[/C][/ROW]
[ROW][C]53[/C][C]0.0069[/C][C]-0.0056[/C][C]0.0044[/C][C]0.4439[/C][C]0.2831[/C][C]0.5321[/C][/ROW]
[ROW][C]54[/C][C]0.0074[/C][C]-0.0081[/C][C]0.0049[/C][C]0.9361[/C][C]0.3648[/C][C]0.604[/C][/ROW]
[ROW][C]55[/C][C]0.0078[/C][C]-0.0068[/C][C]0.0051[/C][C]0.6629[/C][C]0.3979[/C][C]0.6308[/C][/ROW]
[ROW][C]56[/C][C]0.0082[/C][C]-0.0083[/C][C]0.0054[/C][C]0.9839[/C][C]0.4565[/C][C]0.6756[/C][/ROW]
[ROW][C]57[/C][C]0.0085[/C][C]-0.0141[/C][C]0.0062[/C][C]2.9366[/C][C]0.682[/C][C]0.8258[/C][/ROW]
[ROW][C]58[/C][C]0.0088[/C][C]-0.0136[/C][C]0.0068[/C][C]2.7515[/C][C]0.8544[/C][C]0.9243[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=111357&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=111357&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
470.0026-0.003100.130700
480.0037-0.00420.00370.24880.18970.4356
490.0046-0.00350.00360.16460.18130.4258
500.0053-0.00410.00370.23770.19540.4421
510.0059-0.00480.00390.31980.22030.4694
520.0064-0.00560.00420.43650.25640.5063
530.0069-0.00560.00440.44390.28310.5321
540.0074-0.00810.00490.93610.36480.604
550.0078-0.00680.00510.66290.39790.6308
560.0082-0.00830.00540.98390.45650.6756
570.0085-0.01410.00622.93660.6820.8258
580.0088-0.01360.00682.75150.85440.9243



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