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 computationSat, 25 Dec 2010 16:51:28 +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/25/t1293295767z3izzq93y05blqc.htm/, Retrieved Mon, 29 Apr 2024 02:53:23 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=115424, Retrieved Mon, 29 Apr 2024 02:53:23 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact122
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] [ARIMA Forecasting...] [2010-12-06 13:02:50] [f4dc4aa51d65be851b8508203d9f6001]
-   PD        [ARIMA Forecasting] [ARIMA Forecasting...] [2010-12-19 20:46:40] [f4dc4aa51d65be851b8508203d9f6001]
-    D            [ARIMA Forecasting] [ARIMA FORECAST] [2010-12-25 16:51:28] [2e49bff66bb3e1f5d7fa8957e12fbb12] [Current]
-    D              [ARIMA Forecasting] [Arima forecasting...] [2010-12-25 18:15:26] [f9eaed74daea918f73b9f505c5b1f19e]
-   P                 [ARIMA Forecasting] [Arima forecasting...] [2010-12-25 18:35:08] [f9eaed74daea918f73b9f505c5b1f19e]
-   P               [ARIMA Forecasting] [Arima forecasting...] [2010-12-25 18:36:08] [f9eaed74daea918f73b9f505c5b1f19e]
Feedback Forum

Post a new message
Dataseries X:
175.348
154.439
136.186
113.662
106.157
100.546
98.314
118.179
112.295
126.938
130.92
181.279
180.389
146.917
150.597
124.222
101.554
102.138
110.315
111.015
105.017
119.888
127.623
149.415
159.755
139.737
136.283
101.952
104.044
96.712
100.665
103.699
103.765
122.732
127.297
160.278
191.784
155.375
142.616
115.331
102.136
95.205
101.566
105.273
117.394
121.148
116.666
154.841
177.74
154.427
133.159
118.102
101.361
101.345
102.233
108.522
101.939
118.405
125.06
178
167.714
143.582
139.259
104.674
103.722
106.153
106.21
113.986
96.906
107.512
112.616
148.507
130.48
137.436
128.21
97.552
91.55
83.104
84.68
85.98
84.891
89.896
94.835
115.348
131.284
134.701
127.193
87.077
72.744
77.542
78.005
85.329
86.041
96.384
116.678
160.672
152.364
144.936
122.974
94.456
82.491
84.89
85.277
81.206
71.012
87.302
97.427
133.242
137.064
119.042
116.47
96.028
79.281
73.872
80.964
86.739
89.997
96.292
101.355
136.543




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time6 seconds
R Server'George Udny Yule' @ 72.249.76.132

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115424&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'George Udny Yule' @ 72.249.76.132







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[108])
96160.672-------
97152.364-------
98144.936-------
99122.974-------
10094.456-------
10182.491-------
10284.89-------
10385.277-------
10481.206-------
10571.012-------
10687.302-------
10797.427-------
108133.242-------
109137.064138.5079121.0743155.94150.43550.72310.05960.7231
110119.042125.168105.5713144.76470.270.11710.0240.2097
111116.47113.81793.1809134.45310.40050.30990.19220.0325
11296.02884.128562.7101105.54680.13810.00150.17230
11379.28173.911551.79396.02990.31710.0250.22350
11473.87272.704949.923195.48670.460.28580.14720
11580.96474.477451.055497.89950.29360.52020.18310
11686.73978.600154.5559102.64420.25350.42360.41590
11789.99774.290849.640698.9410.10590.16110.60280
11896.29286.421461.1796111.66330.22170.39060.47271e-04
119101.35594.184968.3642120.00570.29310.43650.40280.0015
120136.543130.9585104.5694157.34760.33920.98610.43270.4327

\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[108]) \tabularnewline
96 & 160.672 & - & - & - & - & - & - & - \tabularnewline
97 & 152.364 & - & - & - & - & - & - & - \tabularnewline
98 & 144.936 & - & - & - & - & - & - & - \tabularnewline
99 & 122.974 & - & - & - & - & - & - & - \tabularnewline
100 & 94.456 & - & - & - & - & - & - & - \tabularnewline
101 & 82.491 & - & - & - & - & - & - & - \tabularnewline
102 & 84.89 & - & - & - & - & - & - & - \tabularnewline
103 & 85.277 & - & - & - & - & - & - & - \tabularnewline
104 & 81.206 & - & - & - & - & - & - & - \tabularnewline
105 & 71.012 & - & - & - & - & - & - & - \tabularnewline
106 & 87.302 & - & - & - & - & - & - & - \tabularnewline
107 & 97.427 & - & - & - & - & - & - & - \tabularnewline
108 & 133.242 & - & - & - & - & - & - & - \tabularnewline
109 & 137.064 & 138.5079 & 121.0743 & 155.9415 & 0.4355 & 0.7231 & 0.0596 & 0.7231 \tabularnewline
110 & 119.042 & 125.168 & 105.5713 & 144.7647 & 0.27 & 0.1171 & 0.024 & 0.2097 \tabularnewline
111 & 116.47 & 113.817 & 93.1809 & 134.4531 & 0.4005 & 0.3099 & 0.1922 & 0.0325 \tabularnewline
112 & 96.028 & 84.1285 & 62.7101 & 105.5468 & 0.1381 & 0.0015 & 0.1723 & 0 \tabularnewline
113 & 79.281 & 73.9115 & 51.793 & 96.0299 & 0.3171 & 0.025 & 0.2235 & 0 \tabularnewline
114 & 73.872 & 72.7049 & 49.9231 & 95.4867 & 0.46 & 0.2858 & 0.1472 & 0 \tabularnewline
115 & 80.964 & 74.4774 & 51.0554 & 97.8995 & 0.2936 & 0.5202 & 0.1831 & 0 \tabularnewline
116 & 86.739 & 78.6001 & 54.5559 & 102.6442 & 0.2535 & 0.4236 & 0.4159 & 0 \tabularnewline
117 & 89.997 & 74.2908 & 49.6406 & 98.941 & 0.1059 & 0.1611 & 0.6028 & 0 \tabularnewline
118 & 96.292 & 86.4214 & 61.1796 & 111.6633 & 0.2217 & 0.3906 & 0.4727 & 1e-04 \tabularnewline
119 & 101.355 & 94.1849 & 68.3642 & 120.0057 & 0.2931 & 0.4365 & 0.4028 & 0.0015 \tabularnewline
120 & 136.543 & 130.9585 & 104.5694 & 157.3476 & 0.3392 & 0.9861 & 0.4327 & 0.4327 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115424&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[108])[/C][/ROW]
[ROW][C]96[/C][C]160.672[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]152.364[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]144.936[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]122.974[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]94.456[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]82.491[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]84.89[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]85.277[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]81.206[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]71.012[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]87.302[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]107[/C][C]97.427[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]133.242[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]137.064[/C][C]138.5079[/C][C]121.0743[/C][C]155.9415[/C][C]0.4355[/C][C]0.7231[/C][C]0.0596[/C][C]0.7231[/C][/ROW]
[ROW][C]110[/C][C]119.042[/C][C]125.168[/C][C]105.5713[/C][C]144.7647[/C][C]0.27[/C][C]0.1171[/C][C]0.024[/C][C]0.2097[/C][/ROW]
[ROW][C]111[/C][C]116.47[/C][C]113.817[/C][C]93.1809[/C][C]134.4531[/C][C]0.4005[/C][C]0.3099[/C][C]0.1922[/C][C]0.0325[/C][/ROW]
[ROW][C]112[/C][C]96.028[/C][C]84.1285[/C][C]62.7101[/C][C]105.5468[/C][C]0.1381[/C][C]0.0015[/C][C]0.1723[/C][C]0[/C][/ROW]
[ROW][C]113[/C][C]79.281[/C][C]73.9115[/C][C]51.793[/C][C]96.0299[/C][C]0.3171[/C][C]0.025[/C][C]0.2235[/C][C]0[/C][/ROW]
[ROW][C]114[/C][C]73.872[/C][C]72.7049[/C][C]49.9231[/C][C]95.4867[/C][C]0.46[/C][C]0.2858[/C][C]0.1472[/C][C]0[/C][/ROW]
[ROW][C]115[/C][C]80.964[/C][C]74.4774[/C][C]51.0554[/C][C]97.8995[/C][C]0.2936[/C][C]0.5202[/C][C]0.1831[/C][C]0[/C][/ROW]
[ROW][C]116[/C][C]86.739[/C][C]78.6001[/C][C]54.5559[/C][C]102.6442[/C][C]0.2535[/C][C]0.4236[/C][C]0.4159[/C][C]0[/C][/ROW]
[ROW][C]117[/C][C]89.997[/C][C]74.2908[/C][C]49.6406[/C][C]98.941[/C][C]0.1059[/C][C]0.1611[/C][C]0.6028[/C][C]0[/C][/ROW]
[ROW][C]118[/C][C]96.292[/C][C]86.4214[/C][C]61.1796[/C][C]111.6633[/C][C]0.2217[/C][C]0.3906[/C][C]0.4727[/C][C]1e-04[/C][/ROW]
[ROW][C]119[/C][C]101.355[/C][C]94.1849[/C][C]68.3642[/C][C]120.0057[/C][C]0.2931[/C][C]0.4365[/C][C]0.4028[/C][C]0.0015[/C][/ROW]
[ROW][C]120[/C][C]136.543[/C][C]130.9585[/C][C]104.5694[/C][C]157.3476[/C][C]0.3392[/C][C]0.9861[/C][C]0.4327[/C][C]0.4327[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115424&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115424&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[108])
96160.672-------
97152.364-------
98144.936-------
99122.974-------
10094.456-------
10182.491-------
10284.89-------
10385.277-------
10481.206-------
10571.012-------
10687.302-------
10797.427-------
108133.242-------
109137.064138.5079121.0743155.94150.43550.72310.05960.7231
110119.042125.168105.5713144.76470.270.11710.0240.2097
111116.47113.81793.1809134.45310.40050.30990.19220.0325
11296.02884.128562.7101105.54680.13810.00150.17230
11379.28173.911551.79396.02990.31710.0250.22350
11473.87272.704949.923195.48670.460.28580.14720
11580.96474.477451.055497.89950.29360.52020.18310
11686.73978.600154.5559102.64420.25350.42360.41590
11789.99774.290849.640698.9410.10590.16110.60280
11896.29286.421461.1796111.66330.22170.39060.47271e-04
119101.35594.184968.3642120.00570.29310.43650.40280.0015
120136.543130.9585104.5694157.34760.33920.98610.43270.4327







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1090.0642-0.010402.084800
1100.0799-0.04890.029737.527719.80634.4504
1110.09250.02330.02767.038315.55033.9434
1120.12990.14140.056141.598747.06246.8602
1130.15270.07260.059428.831943.41636.5891
1140.15990.01610.05211.362136.40736.0338
1150.16050.08710.057142.075437.2176.1006
1160.15610.10350.062966.242240.84526.391
1170.16930.21140.0794246.684763.71627.9822
1180.1490.11420.082997.42867.08748.1907
1190.13990.07610.082351.410365.66228.1032
1200.10280.04260.07931.186662.78927.924

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
109 & 0.0642 & -0.0104 & 0 & 2.0848 & 0 & 0 \tabularnewline
110 & 0.0799 & -0.0489 & 0.0297 & 37.5277 & 19.8063 & 4.4504 \tabularnewline
111 & 0.0925 & 0.0233 & 0.0276 & 7.0383 & 15.5503 & 3.9434 \tabularnewline
112 & 0.1299 & 0.1414 & 0.056 & 141.5987 & 47.0624 & 6.8602 \tabularnewline
113 & 0.1527 & 0.0726 & 0.0594 & 28.8319 & 43.4163 & 6.5891 \tabularnewline
114 & 0.1599 & 0.0161 & 0.0521 & 1.3621 & 36.4073 & 6.0338 \tabularnewline
115 & 0.1605 & 0.0871 & 0.0571 & 42.0754 & 37.217 & 6.1006 \tabularnewline
116 & 0.1561 & 0.1035 & 0.0629 & 66.2422 & 40.8452 & 6.391 \tabularnewline
117 & 0.1693 & 0.2114 & 0.0794 & 246.6847 & 63.7162 & 7.9822 \tabularnewline
118 & 0.149 & 0.1142 & 0.0829 & 97.428 & 67.0874 & 8.1907 \tabularnewline
119 & 0.1399 & 0.0761 & 0.0823 & 51.4103 & 65.6622 & 8.1032 \tabularnewline
120 & 0.1028 & 0.0426 & 0.079 & 31.1866 & 62.7892 & 7.924 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115424&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]109[/C][C]0.0642[/C][C]-0.0104[/C][C]0[/C][C]2.0848[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]110[/C][C]0.0799[/C][C]-0.0489[/C][C]0.0297[/C][C]37.5277[/C][C]19.8063[/C][C]4.4504[/C][/ROW]
[ROW][C]111[/C][C]0.0925[/C][C]0.0233[/C][C]0.0276[/C][C]7.0383[/C][C]15.5503[/C][C]3.9434[/C][/ROW]
[ROW][C]112[/C][C]0.1299[/C][C]0.1414[/C][C]0.056[/C][C]141.5987[/C][C]47.0624[/C][C]6.8602[/C][/ROW]
[ROW][C]113[/C][C]0.1527[/C][C]0.0726[/C][C]0.0594[/C][C]28.8319[/C][C]43.4163[/C][C]6.5891[/C][/ROW]
[ROW][C]114[/C][C]0.1599[/C][C]0.0161[/C][C]0.0521[/C][C]1.3621[/C][C]36.4073[/C][C]6.0338[/C][/ROW]
[ROW][C]115[/C][C]0.1605[/C][C]0.0871[/C][C]0.0571[/C][C]42.0754[/C][C]37.217[/C][C]6.1006[/C][/ROW]
[ROW][C]116[/C][C]0.1561[/C][C]0.1035[/C][C]0.0629[/C][C]66.2422[/C][C]40.8452[/C][C]6.391[/C][/ROW]
[ROW][C]117[/C][C]0.1693[/C][C]0.2114[/C][C]0.0794[/C][C]246.6847[/C][C]63.7162[/C][C]7.9822[/C][/ROW]
[ROW][C]118[/C][C]0.149[/C][C]0.1142[/C][C]0.0829[/C][C]97.428[/C][C]67.0874[/C][C]8.1907[/C][/ROW]
[ROW][C]119[/C][C]0.1399[/C][C]0.0761[/C][C]0.0823[/C][C]51.4103[/C][C]65.6622[/C][C]8.1032[/C][/ROW]
[ROW][C]120[/C][C]0.1028[/C][C]0.0426[/C][C]0.079[/C][C]31.1866[/C][C]62.7892[/C][C]7.924[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115424&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115424&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
1090.0642-0.010402.084800
1100.0799-0.04890.029737.527719.80634.4504
1110.09250.02330.02767.038315.55033.9434
1120.12990.14140.056141.598747.06246.8602
1130.15270.07260.059428.831943.41636.5891
1140.15990.01610.05211.362136.40736.0338
1150.16050.08710.057142.075437.2176.1006
1160.15610.10350.062966.242240.84526.391
1170.16930.21140.0794246.684763.71627.9822
1180.1490.11420.082997.42867.08748.1907
1190.13990.07610.082351.410365.66228.1032
1200.10280.04260.07931.186662.78927.924



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