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, 10 Dec 2010 21:00:04 +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/10/t12920146870r0qnoz02uu54fr.htm/, Retrieved Mon, 29 Apr 2024 14:26:26 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=107941, Retrieved Mon, 29 Apr 2024 14:26:26 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact123
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] [Aantal faillissem...] [2010-12-04 17:19:29] [d6a5e6c1b0014d57cedb2bdfb4a7099f]
-   PD          [ARIMA Forecasting] [Verbeter Peer Arima] [2010-12-10 21:00:04] [039869833c16fe697975601e6b065e0f] [Current]
Feedback Forum

Post a new message
Dataseries X:
44164
40399
36763
37903
35532
35533
32110
33374
35462
33508
36080
34560
38737
38144
37594
36424
36843
37246
38661
40454
44928
48441
48140
45998
47369
49554
47510
44873
45344
42413
36912
43452
42142
44382
43636
44167
44423
42868
43908
42013
38846
35087
33026
34646
37135
37985
43121
43722
43630
42234
39351
39327
35704
30466
28155
29257
29998
32529
34787
33855
34556
31348
30805
28353
24514
21106
21346
23335
24379
26290
30084
29429
30632
27349
27264
27474
24482
21453
18788
19282
19713
21917
23812
23785
24696
24562
23580
24939
23899
21454
19761
19815
20780
23462
25005
24725
26198
27543
26471
26558
25317
22896




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 1 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=107941&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]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=107941&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=107941&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 time1 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[90])
7821453-------
7918788-------
8019282-------
8119713-------
8221917-------
8323812-------
8423785-------
8524696-------
8624562-------
8723580-------
8824939-------
8923899-------
9021454-------
911976119410.328915659.853923160.80390.42730.14280.62750.1428
921981521524.948416220.976226828.92060.26370.74270.79640.5105
932078022947.430616451.418329443.44290.25660.82770.83540.6739
942346224561.061617060.113332062.00990.3870.83840.75520.7916
952500526647.984318261.669935034.29880.35050.77170.74630.8876
962472526056.056116869.309735242.80240.38820.58870.6860.8369
972619827274.28317351.46437197.1020.41580.69270.69470.8749
982754325805.669315208.093536403.24510.3740.47110.5910.7895
992647124595.311513363.442435827.18060.37170.30350.57030.7082
1002655823911.709212079.50135743.91730.33060.33580.43240.658
1012531721893.98689490.462634297.5110.29430.23060.37570.5277
1022289619343.26956393.610532292.92850.29540.1830.37470.3747

\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[90]) \tabularnewline
78 & 21453 & - & - & - & - & - & - & - \tabularnewline
79 & 18788 & - & - & - & - & - & - & - \tabularnewline
80 & 19282 & - & - & - & - & - & - & - \tabularnewline
81 & 19713 & - & - & - & - & - & - & - \tabularnewline
82 & 21917 & - & - & - & - & - & - & - \tabularnewline
83 & 23812 & - & - & - & - & - & - & - \tabularnewline
84 & 23785 & - & - & - & - & - & - & - \tabularnewline
85 & 24696 & - & - & - & - & - & - & - \tabularnewline
86 & 24562 & - & - & - & - & - & - & - \tabularnewline
87 & 23580 & - & - & - & - & - & - & - \tabularnewline
88 & 24939 & - & - & - & - & - & - & - \tabularnewline
89 & 23899 & - & - & - & - & - & - & - \tabularnewline
90 & 21454 & - & - & - & - & - & - & - \tabularnewline
91 & 19761 & 19410.3289 & 15659.8539 & 23160.8039 & 0.4273 & 0.1428 & 0.6275 & 0.1428 \tabularnewline
92 & 19815 & 21524.9484 & 16220.9762 & 26828.9206 & 0.2637 & 0.7427 & 0.7964 & 0.5105 \tabularnewline
93 & 20780 & 22947.4306 & 16451.4183 & 29443.4429 & 0.2566 & 0.8277 & 0.8354 & 0.6739 \tabularnewline
94 & 23462 & 24561.0616 & 17060.1133 & 32062.0099 & 0.387 & 0.8384 & 0.7552 & 0.7916 \tabularnewline
95 & 25005 & 26647.9843 & 18261.6699 & 35034.2988 & 0.3505 & 0.7717 & 0.7463 & 0.8876 \tabularnewline
96 & 24725 & 26056.0561 & 16869.3097 & 35242.8024 & 0.3882 & 0.5887 & 0.686 & 0.8369 \tabularnewline
97 & 26198 & 27274.283 & 17351.464 & 37197.102 & 0.4158 & 0.6927 & 0.6947 & 0.8749 \tabularnewline
98 & 27543 & 25805.6693 & 15208.0935 & 36403.2451 & 0.374 & 0.4711 & 0.591 & 0.7895 \tabularnewline
99 & 26471 & 24595.3115 & 13363.4424 & 35827.1806 & 0.3717 & 0.3035 & 0.5703 & 0.7082 \tabularnewline
100 & 26558 & 23911.7092 & 12079.501 & 35743.9173 & 0.3306 & 0.3358 & 0.4324 & 0.658 \tabularnewline
101 & 25317 & 21893.9868 & 9490.4626 & 34297.511 & 0.2943 & 0.2306 & 0.3757 & 0.5277 \tabularnewline
102 & 22896 & 19343.2695 & 6393.6105 & 32292.9285 & 0.2954 & 0.183 & 0.3747 & 0.3747 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=107941&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[90])[/C][/ROW]
[ROW][C]78[/C][C]21453[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]18788[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]19282[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]19713[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]21917[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]23812[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]23785[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]24696[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]24562[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]23580[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]24939[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]89[/C][C]23899[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]90[/C][C]21454[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]91[/C][C]19761[/C][C]19410.3289[/C][C]15659.8539[/C][C]23160.8039[/C][C]0.4273[/C][C]0.1428[/C][C]0.6275[/C][C]0.1428[/C][/ROW]
[ROW][C]92[/C][C]19815[/C][C]21524.9484[/C][C]16220.9762[/C][C]26828.9206[/C][C]0.2637[/C][C]0.7427[/C][C]0.7964[/C][C]0.5105[/C][/ROW]
[ROW][C]93[/C][C]20780[/C][C]22947.4306[/C][C]16451.4183[/C][C]29443.4429[/C][C]0.2566[/C][C]0.8277[/C][C]0.8354[/C][C]0.6739[/C][/ROW]
[ROW][C]94[/C][C]23462[/C][C]24561.0616[/C][C]17060.1133[/C][C]32062.0099[/C][C]0.387[/C][C]0.8384[/C][C]0.7552[/C][C]0.7916[/C][/ROW]
[ROW][C]95[/C][C]25005[/C][C]26647.9843[/C][C]18261.6699[/C][C]35034.2988[/C][C]0.3505[/C][C]0.7717[/C][C]0.7463[/C][C]0.8876[/C][/ROW]
[ROW][C]96[/C][C]24725[/C][C]26056.0561[/C][C]16869.3097[/C][C]35242.8024[/C][C]0.3882[/C][C]0.5887[/C][C]0.686[/C][C]0.8369[/C][/ROW]
[ROW][C]97[/C][C]26198[/C][C]27274.283[/C][C]17351.464[/C][C]37197.102[/C][C]0.4158[/C][C]0.6927[/C][C]0.6947[/C][C]0.8749[/C][/ROW]
[ROW][C]98[/C][C]27543[/C][C]25805.6693[/C][C]15208.0935[/C][C]36403.2451[/C][C]0.374[/C][C]0.4711[/C][C]0.591[/C][C]0.7895[/C][/ROW]
[ROW][C]99[/C][C]26471[/C][C]24595.3115[/C][C]13363.4424[/C][C]35827.1806[/C][C]0.3717[/C][C]0.3035[/C][C]0.5703[/C][C]0.7082[/C][/ROW]
[ROW][C]100[/C][C]26558[/C][C]23911.7092[/C][C]12079.501[/C][C]35743.9173[/C][C]0.3306[/C][C]0.3358[/C][C]0.4324[/C][C]0.658[/C][/ROW]
[ROW][C]101[/C][C]25317[/C][C]21893.9868[/C][C]9490.4626[/C][C]34297.511[/C][C]0.2943[/C][C]0.2306[/C][C]0.3757[/C][C]0.5277[/C][/ROW]
[ROW][C]102[/C][C]22896[/C][C]19343.2695[/C][C]6393.6105[/C][C]32292.9285[/C][C]0.2954[/C][C]0.183[/C][C]0.3747[/C][C]0.3747[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=107941&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=107941&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[90])
7821453-------
7918788-------
8019282-------
8119713-------
8221917-------
8323812-------
8423785-------
8524696-------
8624562-------
8723580-------
8824939-------
8923899-------
9021454-------
911976119410.328915659.853923160.80390.42730.14280.62750.1428
921981521524.948416220.976226828.92060.26370.74270.79640.5105
932078022947.430616451.418329443.44290.25660.82770.83540.6739
942346224561.061617060.113332062.00990.3870.83840.75520.7916
952500526647.984318261.669935034.29880.35050.77170.74630.8876
962472526056.056116869.309735242.80240.38820.58870.6860.8369
972619827274.28317351.46437197.1020.41580.69270.69470.8749
982754325805.669315208.093536403.24510.3740.47110.5910.7895
992647124595.311513363.442435827.18060.37170.30350.57030.7082
1002655823911.709212079.50135743.91730.33060.33580.43240.658
1012531721893.98689490.462634297.5110.29430.23060.37570.5277
1022289619343.26956393.610532292.92850.29540.1830.37470.3747







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
910.09860.01810122970.225600
920.1257-0.07940.04882923923.59521523446.91041234.2799
930.1444-0.09450.0644697755.39122581549.73731606.7202
940.1558-0.04470.05921207936.4892238146.42521496.0436
950.1606-0.06170.05972699397.57012330396.65421526.5637
960.1799-0.05110.05821771710.21752237282.24811495.7547
970.1856-0.03950.05561158385.02562083154.07351443.3136
980.20950.06730.0573018317.93192200049.55581483.2564
990.2330.07630.05923518207.38182346511.53641531.8327
1000.25250.11070.06437002855.21922812145.90471676.9454
1010.2890.15630.072711717019.24363621679.84461903.0712
1020.34160.18370.081912621894.0294371697.69332090.8605

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
91 & 0.0986 & 0.0181 & 0 & 122970.2256 & 0 & 0 \tabularnewline
92 & 0.1257 & -0.0794 & 0.0488 & 2923923.5952 & 1523446.9104 & 1234.2799 \tabularnewline
93 & 0.1444 & -0.0945 & 0.064 & 4697755.3912 & 2581549.7373 & 1606.7202 \tabularnewline
94 & 0.1558 & -0.0447 & 0.0592 & 1207936.489 & 2238146.4252 & 1496.0436 \tabularnewline
95 & 0.1606 & -0.0617 & 0.0597 & 2699397.5701 & 2330396.6542 & 1526.5637 \tabularnewline
96 & 0.1799 & -0.0511 & 0.0582 & 1771710.2175 & 2237282.2481 & 1495.7547 \tabularnewline
97 & 0.1856 & -0.0395 & 0.0556 & 1158385.0256 & 2083154.0735 & 1443.3136 \tabularnewline
98 & 0.2095 & 0.0673 & 0.057 & 3018317.9319 & 2200049.5558 & 1483.2564 \tabularnewline
99 & 0.233 & 0.0763 & 0.0592 & 3518207.3818 & 2346511.5364 & 1531.8327 \tabularnewline
100 & 0.2525 & 0.1107 & 0.0643 & 7002855.2192 & 2812145.9047 & 1676.9454 \tabularnewline
101 & 0.289 & 0.1563 & 0.0727 & 11717019.2436 & 3621679.8446 & 1903.0712 \tabularnewline
102 & 0.3416 & 0.1837 & 0.0819 & 12621894.029 & 4371697.6933 & 2090.8605 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=107941&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]91[/C][C]0.0986[/C][C]0.0181[/C][C]0[/C][C]122970.2256[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]92[/C][C]0.1257[/C][C]-0.0794[/C][C]0.0488[/C][C]2923923.5952[/C][C]1523446.9104[/C][C]1234.2799[/C][/ROW]
[ROW][C]93[/C][C]0.1444[/C][C]-0.0945[/C][C]0.064[/C][C]4697755.3912[/C][C]2581549.7373[/C][C]1606.7202[/C][/ROW]
[ROW][C]94[/C][C]0.1558[/C][C]-0.0447[/C][C]0.0592[/C][C]1207936.489[/C][C]2238146.4252[/C][C]1496.0436[/C][/ROW]
[ROW][C]95[/C][C]0.1606[/C][C]-0.0617[/C][C]0.0597[/C][C]2699397.5701[/C][C]2330396.6542[/C][C]1526.5637[/C][/ROW]
[ROW][C]96[/C][C]0.1799[/C][C]-0.0511[/C][C]0.0582[/C][C]1771710.2175[/C][C]2237282.2481[/C][C]1495.7547[/C][/ROW]
[ROW][C]97[/C][C]0.1856[/C][C]-0.0395[/C][C]0.0556[/C][C]1158385.0256[/C][C]2083154.0735[/C][C]1443.3136[/C][/ROW]
[ROW][C]98[/C][C]0.2095[/C][C]0.0673[/C][C]0.057[/C][C]3018317.9319[/C][C]2200049.5558[/C][C]1483.2564[/C][/ROW]
[ROW][C]99[/C][C]0.233[/C][C]0.0763[/C][C]0.0592[/C][C]3518207.3818[/C][C]2346511.5364[/C][C]1531.8327[/C][/ROW]
[ROW][C]100[/C][C]0.2525[/C][C]0.1107[/C][C]0.0643[/C][C]7002855.2192[/C][C]2812145.9047[/C][C]1676.9454[/C][/ROW]
[ROW][C]101[/C][C]0.289[/C][C]0.1563[/C][C]0.0727[/C][C]11717019.2436[/C][C]3621679.8446[/C][C]1903.0712[/C][/ROW]
[ROW][C]102[/C][C]0.3416[/C][C]0.1837[/C][C]0.0819[/C][C]12621894.029[/C][C]4371697.6933[/C][C]2090.8605[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=107941&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=107941&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
910.09860.01810122970.225600
920.1257-0.07940.04882923923.59521523446.91041234.2799
930.1444-0.09450.0644697755.39122581549.73731606.7202
940.1558-0.04470.05921207936.4892238146.42521496.0436
950.1606-0.06170.05972699397.57012330396.65421526.5637
960.1799-0.05110.05821771710.21752237282.24811495.7547
970.1856-0.03950.05561158385.02562083154.07351443.3136
980.20950.06730.0573018317.93192200049.55581483.2564
990.2330.07630.05923518207.38182346511.53641531.8327
1000.25250.11070.06437002855.21922812145.90471676.9454
1010.2890.15630.072711717019.24363621679.84461903.0712
1020.34160.18370.081912621894.0294371697.69332090.8605



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