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, 22 Dec 2011 07:04:52 -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/2011/Dec/22/t1324555533c29rva1b7oh8yht.htm/, Retrieved Fri, 03 May 2024 07:46:54 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=159350, Retrieved Fri, 03 May 2024 07:46:54 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact62
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] [Paper - ARIMA For...] [2011-12-22 12:04:52] [850c8b4f3ff1a893cc2b9e9f060c8f7e] [Current]
Feedback Forum

Post a new message
Dataseries X:
283495
279998
287224
296369
300653
302686
277891
277537
285383
292213
298522
300431
297584
286445
288576
293299
295881
292710
271993
267430
273963
273046
268347
264319
255765
246263
245098
246969
248333
247934
226839
225554
237085
237080
245039
248541
247105
243422
250643
254663
260993
258556
235372
246057
253353
255198
264176
269034
265861
269826
278506
292300
290726
289802
271311
274352
275216
276836
280408
280190




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gertrude Mary Cox' @ cox.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 & 'Gertrude Mary Cox' @ cox.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=159350&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]'Gertrude Mary Cox' @ cox.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=159350&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=159350&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'Gertrude Mary Cox' @ cox.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[48])
36248541-------
37247105-------
38243422-------
39250643-------
40254663-------
41260993-------
42258556-------
43235372-------
44246057-------
45253353-------
46255198-------
47264176-------
48269034-------
49265861267965.736260434.5949275496.8770.29190.390510.3905
50269826261748.8681249641.1757273856.56060.09550.25280.99850.1191
51278506267429.0301250921.399283936.66130.09420.3880.97690.4244
52292300272501.7146251628.4609293374.96830.03150.28640.9530.6276
53290726277747.7318252523.6711302971.79250.15660.12910.90350.7508
54289802275554.7451246000.8757305108.61440.17240.15720.87020.6673
55271311254031.31220180.2369287882.38320.15850.01920.860.1925
56274352258126.2822220022.0775296230.48680.2020.24880.73260.2874
57275216265486.9257223183.418307790.43340.32610.34060.7130.4347
58276836266424.0347219982.7946312865.27480.33020.35530.68220.4561
59280408269412.529218900.9753319924.08260.33480.38670.58050.5059
60280190270458.8112215948.5654324969.0570.36320.36030.52040.5204

\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[48]) \tabularnewline
36 & 248541 & - & - & - & - & - & - & - \tabularnewline
37 & 247105 & - & - & - & - & - & - & - \tabularnewline
38 & 243422 & - & - & - & - & - & - & - \tabularnewline
39 & 250643 & - & - & - & - & - & - & - \tabularnewline
40 & 254663 & - & - & - & - & - & - & - \tabularnewline
41 & 260993 & - & - & - & - & - & - & - \tabularnewline
42 & 258556 & - & - & - & - & - & - & - \tabularnewline
43 & 235372 & - & - & - & - & - & - & - \tabularnewline
44 & 246057 & - & - & - & - & - & - & - \tabularnewline
45 & 253353 & - & - & - & - & - & - & - \tabularnewline
46 & 255198 & - & - & - & - & - & - & - \tabularnewline
47 & 264176 & - & - & - & - & - & - & - \tabularnewline
48 & 269034 & - & - & - & - & - & - & - \tabularnewline
49 & 265861 & 267965.736 & 260434.5949 & 275496.877 & 0.2919 & 0.3905 & 1 & 0.3905 \tabularnewline
50 & 269826 & 261748.8681 & 249641.1757 & 273856.5606 & 0.0955 & 0.2528 & 0.9985 & 0.1191 \tabularnewline
51 & 278506 & 267429.0301 & 250921.399 & 283936.6613 & 0.0942 & 0.388 & 0.9769 & 0.4244 \tabularnewline
52 & 292300 & 272501.7146 & 251628.4609 & 293374.9683 & 0.0315 & 0.2864 & 0.953 & 0.6276 \tabularnewline
53 & 290726 & 277747.7318 & 252523.6711 & 302971.7925 & 0.1566 & 0.1291 & 0.9035 & 0.7508 \tabularnewline
54 & 289802 & 275554.7451 & 246000.8757 & 305108.6144 & 0.1724 & 0.1572 & 0.8702 & 0.6673 \tabularnewline
55 & 271311 & 254031.31 & 220180.2369 & 287882.3832 & 0.1585 & 0.0192 & 0.86 & 0.1925 \tabularnewline
56 & 274352 & 258126.2822 & 220022.0775 & 296230.4868 & 0.202 & 0.2488 & 0.7326 & 0.2874 \tabularnewline
57 & 275216 & 265486.9257 & 223183.418 & 307790.4334 & 0.3261 & 0.3406 & 0.713 & 0.4347 \tabularnewline
58 & 276836 & 266424.0347 & 219982.7946 & 312865.2748 & 0.3302 & 0.3553 & 0.6822 & 0.4561 \tabularnewline
59 & 280408 & 269412.529 & 218900.9753 & 319924.0826 & 0.3348 & 0.3867 & 0.5805 & 0.5059 \tabularnewline
60 & 280190 & 270458.8112 & 215948.5654 & 324969.057 & 0.3632 & 0.3603 & 0.5204 & 0.5204 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=159350&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[48])[/C][/ROW]
[ROW][C]36[/C][C]248541[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]247105[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]243422[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]250643[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]254663[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]260993[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]258556[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]235372[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]246057[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]253353[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]255198[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]264176[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]269034[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]265861[/C][C]267965.736[/C][C]260434.5949[/C][C]275496.877[/C][C]0.2919[/C][C]0.3905[/C][C]1[/C][C]0.3905[/C][/ROW]
[ROW][C]50[/C][C]269826[/C][C]261748.8681[/C][C]249641.1757[/C][C]273856.5606[/C][C]0.0955[/C][C]0.2528[/C][C]0.9985[/C][C]0.1191[/C][/ROW]
[ROW][C]51[/C][C]278506[/C][C]267429.0301[/C][C]250921.399[/C][C]283936.6613[/C][C]0.0942[/C][C]0.388[/C][C]0.9769[/C][C]0.4244[/C][/ROW]
[ROW][C]52[/C][C]292300[/C][C]272501.7146[/C][C]251628.4609[/C][C]293374.9683[/C][C]0.0315[/C][C]0.2864[/C][C]0.953[/C][C]0.6276[/C][/ROW]
[ROW][C]53[/C][C]290726[/C][C]277747.7318[/C][C]252523.6711[/C][C]302971.7925[/C][C]0.1566[/C][C]0.1291[/C][C]0.9035[/C][C]0.7508[/C][/ROW]
[ROW][C]54[/C][C]289802[/C][C]275554.7451[/C][C]246000.8757[/C][C]305108.6144[/C][C]0.1724[/C][C]0.1572[/C][C]0.8702[/C][C]0.6673[/C][/ROW]
[ROW][C]55[/C][C]271311[/C][C]254031.31[/C][C]220180.2369[/C][C]287882.3832[/C][C]0.1585[/C][C]0.0192[/C][C]0.86[/C][C]0.1925[/C][/ROW]
[ROW][C]56[/C][C]274352[/C][C]258126.2822[/C][C]220022.0775[/C][C]296230.4868[/C][C]0.202[/C][C]0.2488[/C][C]0.7326[/C][C]0.2874[/C][/ROW]
[ROW][C]57[/C][C]275216[/C][C]265486.9257[/C][C]223183.418[/C][C]307790.4334[/C][C]0.3261[/C][C]0.3406[/C][C]0.713[/C][C]0.4347[/C][/ROW]
[ROW][C]58[/C][C]276836[/C][C]266424.0347[/C][C]219982.7946[/C][C]312865.2748[/C][C]0.3302[/C][C]0.3553[/C][C]0.6822[/C][C]0.4561[/C][/ROW]
[ROW][C]59[/C][C]280408[/C][C]269412.529[/C][C]218900.9753[/C][C]319924.0826[/C][C]0.3348[/C][C]0.3867[/C][C]0.5805[/C][C]0.5059[/C][/ROW]
[ROW][C]60[/C][C]280190[/C][C]270458.8112[/C][C]215948.5654[/C][C]324969.057[/C][C]0.3632[/C][C]0.3603[/C][C]0.5204[/C][C]0.5204[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=159350&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=159350&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[48])
36248541-------
37247105-------
38243422-------
39250643-------
40254663-------
41260993-------
42258556-------
43235372-------
44246057-------
45253353-------
46255198-------
47264176-------
48269034-------
49265861267965.736260434.5949275496.8770.29190.390510.3905
50269826261748.8681249641.1757273856.56060.09550.25280.99850.1191
51278506267429.0301250921.399283936.66130.09420.3880.97690.4244
52292300272501.7146251628.4609293374.96830.03150.28640.9530.6276
53290726277747.7318252523.6711302971.79250.15660.12910.90350.7508
54289802275554.7451246000.8757305108.61440.17240.15720.87020.6673
55271311254031.31220180.2369287882.38320.15850.01920.860.1925
56274352258126.2822220022.0775296230.48680.2020.24880.73260.2874
57275216265486.9257223183.418307790.43340.32610.34060.7130.4347
58276836266424.0347219982.7946312865.27480.33020.35530.68220.4561
59280408269412.529218900.9753319924.08260.33480.38670.58050.5059
60280190270458.8112215948.5654324969.0570.36320.36030.52040.5204







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0143-0.007904429913.487600
500.02360.03090.019465240059.011834834986.24975902.1171
510.03150.04140.0267122699261.198764123077.89948007.6887
520.03910.07270.0382391972104.3614146085334.514912086.5766
530.04630.04670.0399168435445.4009150555356.692112270.1001
540.05470.05170.0419202984272.9008159293509.393512621.1533
550.0680.0680.0456298587684.8326179192677.313413386.2869
560.07530.06290.0478263273918.6107189702832.475613773.2651
570.08130.03660.046594654887.3895179141949.688213384.392
580.08890.03910.0458108409021.518172068656.871213117.4943
590.09570.04080.0453120900383.6058167416995.665312938.972
600.10280.0360.044694696036.1952161356915.709412702.6342

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0143 & -0.0079 & 0 & 4429913.4876 & 0 & 0 \tabularnewline
50 & 0.0236 & 0.0309 & 0.0194 & 65240059.0118 & 34834986.2497 & 5902.1171 \tabularnewline
51 & 0.0315 & 0.0414 & 0.0267 & 122699261.1987 & 64123077.8994 & 8007.6887 \tabularnewline
52 & 0.0391 & 0.0727 & 0.0382 & 391972104.3614 & 146085334.5149 & 12086.5766 \tabularnewline
53 & 0.0463 & 0.0467 & 0.0399 & 168435445.4009 & 150555356.6921 & 12270.1001 \tabularnewline
54 & 0.0547 & 0.0517 & 0.0419 & 202984272.9008 & 159293509.3935 & 12621.1533 \tabularnewline
55 & 0.068 & 0.068 & 0.0456 & 298587684.8326 & 179192677.3134 & 13386.2869 \tabularnewline
56 & 0.0753 & 0.0629 & 0.0478 & 263273918.6107 & 189702832.4756 & 13773.2651 \tabularnewline
57 & 0.0813 & 0.0366 & 0.0465 & 94654887.3895 & 179141949.6882 & 13384.392 \tabularnewline
58 & 0.0889 & 0.0391 & 0.0458 & 108409021.518 & 172068656.8712 & 13117.4943 \tabularnewline
59 & 0.0957 & 0.0408 & 0.0453 & 120900383.6058 & 167416995.6653 & 12938.972 \tabularnewline
60 & 0.1028 & 0.036 & 0.0446 & 94696036.1952 & 161356915.7094 & 12702.6342 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=159350&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]49[/C][C]0.0143[/C][C]-0.0079[/C][C]0[/C][C]4429913.4876[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.0236[/C][C]0.0309[/C][C]0.0194[/C][C]65240059.0118[/C][C]34834986.2497[/C][C]5902.1171[/C][/ROW]
[ROW][C]51[/C][C]0.0315[/C][C]0.0414[/C][C]0.0267[/C][C]122699261.1987[/C][C]64123077.8994[/C][C]8007.6887[/C][/ROW]
[ROW][C]52[/C][C]0.0391[/C][C]0.0727[/C][C]0.0382[/C][C]391972104.3614[/C][C]146085334.5149[/C][C]12086.5766[/C][/ROW]
[ROW][C]53[/C][C]0.0463[/C][C]0.0467[/C][C]0.0399[/C][C]168435445.4009[/C][C]150555356.6921[/C][C]12270.1001[/C][/ROW]
[ROW][C]54[/C][C]0.0547[/C][C]0.0517[/C][C]0.0419[/C][C]202984272.9008[/C][C]159293509.3935[/C][C]12621.1533[/C][/ROW]
[ROW][C]55[/C][C]0.068[/C][C]0.068[/C][C]0.0456[/C][C]298587684.8326[/C][C]179192677.3134[/C][C]13386.2869[/C][/ROW]
[ROW][C]56[/C][C]0.0753[/C][C]0.0629[/C][C]0.0478[/C][C]263273918.6107[/C][C]189702832.4756[/C][C]13773.2651[/C][/ROW]
[ROW][C]57[/C][C]0.0813[/C][C]0.0366[/C][C]0.0465[/C][C]94654887.3895[/C][C]179141949.6882[/C][C]13384.392[/C][/ROW]
[ROW][C]58[/C][C]0.0889[/C][C]0.0391[/C][C]0.0458[/C][C]108409021.518[/C][C]172068656.8712[/C][C]13117.4943[/C][/ROW]
[ROW][C]59[/C][C]0.0957[/C][C]0.0408[/C][C]0.0453[/C][C]120900383.6058[/C][C]167416995.6653[/C][C]12938.972[/C][/ROW]
[ROW][C]60[/C][C]0.1028[/C][C]0.036[/C][C]0.0446[/C][C]94696036.1952[/C][C]161356915.7094[/C][C]12702.6342[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=159350&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=159350&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
490.0143-0.007904429913.487600
500.02360.03090.019465240059.011834834986.24975902.1171
510.03150.04140.0267122699261.198764123077.89948007.6887
520.03910.07270.0382391972104.3614146085334.514912086.5766
530.04630.04670.0399168435445.4009150555356.692112270.1001
540.05470.05170.0419202984272.9008159293509.393512621.1533
550.0680.0680.0456298587684.8326179192677.313413386.2869
560.07530.06290.0478263273918.6107189702832.475613773.2651
570.08130.03660.046594654887.3895179141949.688213384.392
580.08890.03910.0458108409021.518172068656.871213117.4943
590.09570.04080.0453120900383.6058167416995.665312938.972
600.10280.0360.044694696036.1952161356915.709412702.6342



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