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 computationWed, 22 Dec 2010 22:14: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/22/t1293055932fuwf6rvnsac1mup.htm/, Retrieved Mon, 06 May 2024 01:58:43 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114608, Retrieved Mon, 06 May 2024 01:58:43 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact133
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] [WS9 - ARIMA Forec...] [2010-12-04 16:25:58] [8ef49741e164ec6343c90c7935194465]
-   P         [ARIMA Forecasting] [WS9 - ARIMA Forec...] [2010-12-04 16:58:46] [8ef49741e164ec6343c90c7935194465]
-               [ARIMA Forecasting] [WS 9 arima] [2010-12-07 10:08:07] [8214fe6d084e5ad7598b249a26cc9f06]
-   PD            [ARIMA Forecasting] [paper arima forec...] [2010-12-10 12:43:26] [8214fe6d084e5ad7598b249a26cc9f06]
-   PD                [ARIMA Forecasting] [arima forecasting...] [2010-12-22 22:14:04] [b47314d83d48c7bf812ec2bcd743b159] [Current]
Feedback Forum

Post a new message
Dataseries X:
19246
17549
16428
16209
15235
16186
24971
30776
26416
23157
20155
19790
18849
17573
16597
16158
15507
16433
26325
31144
30535
27596
24064
23854
22407
21125
20226
19547
18933
20372
34331
37329
36761
32737
29321
28883
27436
25101
23776
23782
23027
25606
41328
44751
42855
37628
33544
33275
32009
30813
29143
28121
27007
29112
44067
48481
46581
41166
36824
35936
33633
31630
30434
28546
27660
29830
45599
49303
44417
40386
35544
35019
30400
29602
27701
27937
27283
29372
42821
45386
40170
34371
30077
29251
27202
25714
23784
22968
22243
24255
37282
38794
31828
27949
24605
25695
23338
21941
22034
20637
19418
22454
33261
34995
29132
26171
23828
25743
25204
25679
25281
25136
24794
28278
40062
42590
37885
34061
32412
34647
31750
31288
29331
28768
27780
30113
41240
43271
38108
34382
31551




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114608&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]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114608&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114608&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'RServer@AstonUniversity' @ vre.aston.ac.uk







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[119])
10723828-------
10825743-------
10925204-------
11025679-------
11125281-------
11225136-------
11324794-------
11428278-------
11540062-------
11642590-------
11737885-------
11834061-------
11932412-------
1203464734781.518132488.111637185.91910.45630.973310.9733
1213175034115.710830947.928437503.77610.08560.379310.8378
1223128834702.505730805.170838932.53160.05680.914410.8557
1232933134210.878529784.689539078.13820.02470.88040.99980.7656
1242876834031.651829129.48939484.00420.02920.95450.99930.7198
1252778033608.673928313.914239560.37710.02750.94450.99820.6532
1263011337901.989531696.315344911.86070.01470.99770.99640.9376
1274124052216.868543899.893761578.59110.010810.99451
1284327155255.080346100.913865611.48960.01170.9960.99171
1293810849592.289940695.972859767.9140.01350.88830.98790.9995
1303438244961.806736297.540354979.23010.01920.910.98350.993
1313155142956.264334229.230453132.79540.0140.95070.97890.9789

\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[119]) \tabularnewline
107 & 23828 & - & - & - & - & - & - & - \tabularnewline
108 & 25743 & - & - & - & - & - & - & - \tabularnewline
109 & 25204 & - & - & - & - & - & - & - \tabularnewline
110 & 25679 & - & - & - & - & - & - & - \tabularnewline
111 & 25281 & - & - & - & - & - & - & - \tabularnewline
112 & 25136 & - & - & - & - & - & - & - \tabularnewline
113 & 24794 & - & - & - & - & - & - & - \tabularnewline
114 & 28278 & - & - & - & - & - & - & - \tabularnewline
115 & 40062 & - & - & - & - & - & - & - \tabularnewline
116 & 42590 & - & - & - & - & - & - & - \tabularnewline
117 & 37885 & - & - & - & - & - & - & - \tabularnewline
118 & 34061 & - & - & - & - & - & - & - \tabularnewline
119 & 32412 & - & - & - & - & - & - & - \tabularnewline
120 & 34647 & 34781.5181 & 32488.1116 & 37185.9191 & 0.4563 & 0.9733 & 1 & 0.9733 \tabularnewline
121 & 31750 & 34115.7108 & 30947.9284 & 37503.7761 & 0.0856 & 0.3793 & 1 & 0.8378 \tabularnewline
122 & 31288 & 34702.5057 & 30805.1708 & 38932.5316 & 0.0568 & 0.9144 & 1 & 0.8557 \tabularnewline
123 & 29331 & 34210.8785 & 29784.6895 & 39078.1382 & 0.0247 & 0.8804 & 0.9998 & 0.7656 \tabularnewline
124 & 28768 & 34031.6518 & 29129.489 & 39484.0042 & 0.0292 & 0.9545 & 0.9993 & 0.7198 \tabularnewline
125 & 27780 & 33608.6739 & 28313.9142 & 39560.3771 & 0.0275 & 0.9445 & 0.9982 & 0.6532 \tabularnewline
126 & 30113 & 37901.9895 & 31696.3153 & 44911.8607 & 0.0147 & 0.9977 & 0.9964 & 0.9376 \tabularnewline
127 & 41240 & 52216.8685 & 43899.8937 & 61578.5911 & 0.0108 & 1 & 0.9945 & 1 \tabularnewline
128 & 43271 & 55255.0803 & 46100.9138 & 65611.4896 & 0.0117 & 0.996 & 0.9917 & 1 \tabularnewline
129 & 38108 & 49592.2899 & 40695.9728 & 59767.914 & 0.0135 & 0.8883 & 0.9879 & 0.9995 \tabularnewline
130 & 34382 & 44961.8067 & 36297.5403 & 54979.2301 & 0.0192 & 0.91 & 0.9835 & 0.993 \tabularnewline
131 & 31551 & 42956.2643 & 34229.2304 & 53132.7954 & 0.014 & 0.9507 & 0.9789 & 0.9789 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114608&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[119])[/C][/ROW]
[ROW][C]107[/C][C]23828[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]108[/C][C]25743[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]109[/C][C]25204[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]110[/C][C]25679[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]111[/C][C]25281[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]112[/C][C]25136[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]113[/C][C]24794[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]114[/C][C]28278[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]115[/C][C]40062[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]116[/C][C]42590[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]117[/C][C]37885[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]118[/C][C]34061[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]119[/C][C]32412[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]120[/C][C]34647[/C][C]34781.5181[/C][C]32488.1116[/C][C]37185.9191[/C][C]0.4563[/C][C]0.9733[/C][C]1[/C][C]0.9733[/C][/ROW]
[ROW][C]121[/C][C]31750[/C][C]34115.7108[/C][C]30947.9284[/C][C]37503.7761[/C][C]0.0856[/C][C]0.3793[/C][C]1[/C][C]0.8378[/C][/ROW]
[ROW][C]122[/C][C]31288[/C][C]34702.5057[/C][C]30805.1708[/C][C]38932.5316[/C][C]0.0568[/C][C]0.9144[/C][C]1[/C][C]0.8557[/C][/ROW]
[ROW][C]123[/C][C]29331[/C][C]34210.8785[/C][C]29784.6895[/C][C]39078.1382[/C][C]0.0247[/C][C]0.8804[/C][C]0.9998[/C][C]0.7656[/C][/ROW]
[ROW][C]124[/C][C]28768[/C][C]34031.6518[/C][C]29129.489[/C][C]39484.0042[/C][C]0.0292[/C][C]0.9545[/C][C]0.9993[/C][C]0.7198[/C][/ROW]
[ROW][C]125[/C][C]27780[/C][C]33608.6739[/C][C]28313.9142[/C][C]39560.3771[/C][C]0.0275[/C][C]0.9445[/C][C]0.9982[/C][C]0.6532[/C][/ROW]
[ROW][C]126[/C][C]30113[/C][C]37901.9895[/C][C]31696.3153[/C][C]44911.8607[/C][C]0.0147[/C][C]0.9977[/C][C]0.9964[/C][C]0.9376[/C][/ROW]
[ROW][C]127[/C][C]41240[/C][C]52216.8685[/C][C]43899.8937[/C][C]61578.5911[/C][C]0.0108[/C][C]1[/C][C]0.9945[/C][C]1[/C][/ROW]
[ROW][C]128[/C][C]43271[/C][C]55255.0803[/C][C]46100.9138[/C][C]65611.4896[/C][C]0.0117[/C][C]0.996[/C][C]0.9917[/C][C]1[/C][/ROW]
[ROW][C]129[/C][C]38108[/C][C]49592.2899[/C][C]40695.9728[/C][C]59767.914[/C][C]0.0135[/C][C]0.8883[/C][C]0.9879[/C][C]0.9995[/C][/ROW]
[ROW][C]130[/C][C]34382[/C][C]44961.8067[/C][C]36297.5403[/C][C]54979.2301[/C][C]0.0192[/C][C]0.91[/C][C]0.9835[/C][C]0.993[/C][/ROW]
[ROW][C]131[/C][C]31551[/C][C]42956.2643[/C][C]34229.2304[/C][C]53132.7954[/C][C]0.014[/C][C]0.9507[/C][C]0.9789[/C][C]0.9789[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114608&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114608&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[119])
10723828-------
10825743-------
10925204-------
11025679-------
11125281-------
11225136-------
11324794-------
11428278-------
11540062-------
11642590-------
11737885-------
11834061-------
11932412-------
1203464734781.518132488.111637185.91910.45630.973310.9733
1213175034115.710830947.928437503.77610.08560.379310.8378
1223128834702.505730805.170838932.53160.05680.914410.8557
1232933134210.878529784.689539078.13820.02470.88040.99980.7656
1242876834031.651829129.48939484.00420.02920.95450.99930.7198
1252778033608.673928313.914239560.37710.02750.94450.99820.6532
1263011337901.989531696.315344911.86070.01470.99770.99640.9376
1274124052216.868543899.893761578.59110.010810.99451
1284327155255.080346100.913865611.48960.01170.9960.99171
1293810849592.289940695.972859767.9140.01350.88830.98790.9995
1303438244961.806736297.540354979.23010.01920.910.98350.993
1313155142956.264334229.230453132.79540.0140.95070.97890.9789







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1200.0353-0.0039018095.111500
1210.0507-0.06930.03665596587.40482807341.25811675.5122
1220.0622-0.09840.057211658849.05345757843.85662399.5508
1230.0726-0.14260.078623813214.547610271686.52933204.9472
1240.0817-0.15470.093827706030.251513758555.27383709.2527
1250.0904-0.17340.107133973439.532717127702.65034138.5629
1260.0944-0.20550.121160668357.023123347796.13214831.9557
1270.0915-0.21020.1323120491642.026835490776.86895957.4136
1280.0956-0.21690.1417143618181.268547504932.91336892.3822
1290.1047-0.23160.1507131888913.548755943330.97697479.5275
1300.1137-0.23530.1583111932309.695161033238.13317812.3772
1310.1209-0.26550.1673130080052.973866787139.36988172.3399

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
120 & 0.0353 & -0.0039 & 0 & 18095.1115 & 0 & 0 \tabularnewline
121 & 0.0507 & -0.0693 & 0.0366 & 5596587.4048 & 2807341.2581 & 1675.5122 \tabularnewline
122 & 0.0622 & -0.0984 & 0.0572 & 11658849.0534 & 5757843.8566 & 2399.5508 \tabularnewline
123 & 0.0726 & -0.1426 & 0.0786 & 23813214.5476 & 10271686.5293 & 3204.9472 \tabularnewline
124 & 0.0817 & -0.1547 & 0.0938 & 27706030.2515 & 13758555.2738 & 3709.2527 \tabularnewline
125 & 0.0904 & -0.1734 & 0.1071 & 33973439.5327 & 17127702.6503 & 4138.5629 \tabularnewline
126 & 0.0944 & -0.2055 & 0.1211 & 60668357.0231 & 23347796.1321 & 4831.9557 \tabularnewline
127 & 0.0915 & -0.2102 & 0.1323 & 120491642.0268 & 35490776.8689 & 5957.4136 \tabularnewline
128 & 0.0956 & -0.2169 & 0.1417 & 143618181.2685 & 47504932.9133 & 6892.3822 \tabularnewline
129 & 0.1047 & -0.2316 & 0.1507 & 131888913.5487 & 55943330.9769 & 7479.5275 \tabularnewline
130 & 0.1137 & -0.2353 & 0.1583 & 111932309.6951 & 61033238.1331 & 7812.3772 \tabularnewline
131 & 0.1209 & -0.2655 & 0.1673 & 130080052.9738 & 66787139.3698 & 8172.3399 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114608&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]120[/C][C]0.0353[/C][C]-0.0039[/C][C]0[/C][C]18095.1115[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]121[/C][C]0.0507[/C][C]-0.0693[/C][C]0.0366[/C][C]5596587.4048[/C][C]2807341.2581[/C][C]1675.5122[/C][/ROW]
[ROW][C]122[/C][C]0.0622[/C][C]-0.0984[/C][C]0.0572[/C][C]11658849.0534[/C][C]5757843.8566[/C][C]2399.5508[/C][/ROW]
[ROW][C]123[/C][C]0.0726[/C][C]-0.1426[/C][C]0.0786[/C][C]23813214.5476[/C][C]10271686.5293[/C][C]3204.9472[/C][/ROW]
[ROW][C]124[/C][C]0.0817[/C][C]-0.1547[/C][C]0.0938[/C][C]27706030.2515[/C][C]13758555.2738[/C][C]3709.2527[/C][/ROW]
[ROW][C]125[/C][C]0.0904[/C][C]-0.1734[/C][C]0.1071[/C][C]33973439.5327[/C][C]17127702.6503[/C][C]4138.5629[/C][/ROW]
[ROW][C]126[/C][C]0.0944[/C][C]-0.2055[/C][C]0.1211[/C][C]60668357.0231[/C][C]23347796.1321[/C][C]4831.9557[/C][/ROW]
[ROW][C]127[/C][C]0.0915[/C][C]-0.2102[/C][C]0.1323[/C][C]120491642.0268[/C][C]35490776.8689[/C][C]5957.4136[/C][/ROW]
[ROW][C]128[/C][C]0.0956[/C][C]-0.2169[/C][C]0.1417[/C][C]143618181.2685[/C][C]47504932.9133[/C][C]6892.3822[/C][/ROW]
[ROW][C]129[/C][C]0.1047[/C][C]-0.2316[/C][C]0.1507[/C][C]131888913.5487[/C][C]55943330.9769[/C][C]7479.5275[/C][/ROW]
[ROW][C]130[/C][C]0.1137[/C][C]-0.2353[/C][C]0.1583[/C][C]111932309.6951[/C][C]61033238.1331[/C][C]7812.3772[/C][/ROW]
[ROW][C]131[/C][C]0.1209[/C][C]-0.2655[/C][C]0.1673[/C][C]130080052.9738[/C][C]66787139.3698[/C][C]8172.3399[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114608&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114608&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
1200.0353-0.0039018095.111500
1210.0507-0.06930.03665596587.40482807341.25811675.5122
1220.0622-0.09840.057211658849.05345757843.85662399.5508
1230.0726-0.14260.078623813214.547610271686.52933204.9472
1240.0817-0.15470.093827706030.251513758555.27383709.2527
1250.0904-0.17340.107133973439.532717127702.65034138.5629
1260.0944-0.20550.121160668357.023123347796.13214831.9557
1270.0915-0.21020.1323120491642.026835490776.86895957.4136
1280.0956-0.21690.1417143618181.268547504932.91336892.3822
1290.1047-0.23160.1507131888913.548755943330.97697479.5275
1300.1137-0.23530.1583111932309.695161033238.13317812.3772
1310.1209-0.26550.1673130080052.973866787139.36988172.3399



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 = 0.3 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 0 ; par7 = 0 ; par8 = 0 ; 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')