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 computationSun, 18 Dec 2011 09:35:06 -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/18/t1324219094bfdz42vhci8w11z.htm/, Retrieved Tue, 30 Apr 2024 03:11:11 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=156909, Retrieved Tue, 30 Apr 2024 03:11:11 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact158
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Multiple Regression] [Q1 The Seatbeltlaw] [2007-11-14 19:27:43] [8cd6641b921d30ebe00b648d1481bba0]
- RMPD  [Multiple Regression] [Seatbelt] [2009-11-12 13:54:52] [b98453cac15ba1066b407e146608df68]
-    D    [Multiple Regression] [WS7] [2009-11-18 17:01:04] [8b1aef4e7013bd33fbc2a5833375c5f5]
-   PD      [Multiple Regression] [WS7(2)] [2009-11-20 19:01:46] [7d268329e554b8694908ba13e6e6f258]
-   P         [Multiple Regression] [WS7(3)] [2009-11-21 10:22:47] [7d268329e554b8694908ba13e6e6f258]
-   PD          [Multiple Regression] [WS7(4)] [2009-11-21 10:55:20] [7d268329e554b8694908ba13e6e6f258]
- RMPD            [Univariate Data Series] [Niet-werkende wer...] [2009-11-25 19:16:52] [9717cb857c153ca3061376906953b329]
- RMP               [Univariate Explorative Data Analysis] [Univariate EDA] [2009-12-17 13:35:10] [9717cb857c153ca3061376906953b329]
-   PD                [Univariate Explorative Data Analysis] [Paper tijdreeks] [2011-12-16 15:35:08] [fbaf17a8836493f6de0f4e0e997711e1]
-   PD                  [Univariate Explorative Data Analysis] [Paper wijn] [2011-12-17 10:19:24] [fbaf17a8836493f6de0f4e0e997711e1]
- RMP                       [ARIMA Forecasting] [paper arima forec...] [2011-12-18 14:35:06] [c897fb90cb9e1f725365d7e541ad7850] [Current]
- RMPD                        [Histogram] [frequency] [2011-12-18 21:24:53] [fbaf17a8836493f6de0f4e0e997711e1]
Feedback Forum

Post a new message
Dataseries X:
1954
2302
3054
2414
2226
2725
2589
3470
2400
3180
4009
3924
2072
2434
2956
2828
2687
2629
3150
4119
3030
3055
3821
4001
2529
2472
3134
2789
2758
2993
3282
3437
2804
3076
3782
3889
2271
2452
3084
2522
2769
3438
2839
3746
2632
2851
3871
3618
2389
2344
2678
2492
2858
2246
2800
3869
3007
3023
3907
4209
2353
2570
2903
2910
3782
2759
2931
3641
2794
3070
3576
4106
2452
2206
2488
2416
2534
2521
3093
3903
2907
3025
3812
4209
2138
2419
2622
2912
2708
2798
3254
2895
3263
3736
4077
4097
2175
3138
2823
2498
2822
2738
4137
3515
3785
3632
4504
4451
2550
2867
3458
2961
3163
2880
3331
3062
3534
3622
4464
5411
2564
2820
3508
3088
3299
2939
3320
3418
3604
3495
4163
4882
2211
3260
2992
2425
2707
3244
3965
3315
3333
3583
4021
4904
2252
2952
3573
3048
3059
2731
3563
3092
3478
3478
4308
5029
2075
3264
3308
3688
3136
2824
3644
4694
2914
3686
4358
5587
2265
3685
3754
3708
3210
3517
3905
3670
4221
4404
5086
5725
2367
3819
4067
4022
3937
4365
4290




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=156909&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'AstonUniversity' @ aston.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[175])
1633644-------
1644694-------
1652914-------
1663686-------
1674358-------
1685587-------
1692265-------
1703685-------
1713754-------
1723708-------
1733210-------
1743517-------
1753905-------
17636704027.69523229.41765163.15520.26850.58390.1250.5839
17742213507.87522847.03454428.64540.06450.3650.89690.199
17844043877.3413109.59894968.92760.17220.26860.63440.4802
17950864643.82683645.52486116.27990.27810.62520.64820.8373
18057255595.28254288.72877604.350.44960.69040.50320.9504
18123672372.45311985.17012885.19660.491700.65940
18238193478.17422805.17394425.96310.24050.98920.33440.1887
18340673670.8172940.80784710.65620.22760.390.43770.3295
18440223500.16672815.13524469.43120.14570.12590.33710.2065
18539373278.422651.99254156.15590.07070.04840.56070.0809
18643653249.36492628.65834118.98980.0060.06060.27320.0697
18742903923.63713109.35285105.30640.27170.23210.51230.5123

\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[175]) \tabularnewline
163 & 3644 & - & - & - & - & - & - & - \tabularnewline
164 & 4694 & - & - & - & - & - & - & - \tabularnewline
165 & 2914 & - & - & - & - & - & - & - \tabularnewline
166 & 3686 & - & - & - & - & - & - & - \tabularnewline
167 & 4358 & - & - & - & - & - & - & - \tabularnewline
168 & 5587 & - & - & - & - & - & - & - \tabularnewline
169 & 2265 & - & - & - & - & - & - & - \tabularnewline
170 & 3685 & - & - & - & - & - & - & - \tabularnewline
171 & 3754 & - & - & - & - & - & - & - \tabularnewline
172 & 3708 & - & - & - & - & - & - & - \tabularnewline
173 & 3210 & - & - & - & - & - & - & - \tabularnewline
174 & 3517 & - & - & - & - & - & - & - \tabularnewline
175 & 3905 & - & - & - & - & - & - & - \tabularnewline
176 & 3670 & 4027.6952 & 3229.4176 & 5163.1552 & 0.2685 & 0.5839 & 0.125 & 0.5839 \tabularnewline
177 & 4221 & 3507.8752 & 2847.0345 & 4428.6454 & 0.0645 & 0.365 & 0.8969 & 0.199 \tabularnewline
178 & 4404 & 3877.341 & 3109.5989 & 4968.9276 & 0.1722 & 0.2686 & 0.6344 & 0.4802 \tabularnewline
179 & 5086 & 4643.8268 & 3645.5248 & 6116.2799 & 0.2781 & 0.6252 & 0.6482 & 0.8373 \tabularnewline
180 & 5725 & 5595.2825 & 4288.7287 & 7604.35 & 0.4496 & 0.6904 & 0.5032 & 0.9504 \tabularnewline
181 & 2367 & 2372.4531 & 1985.1701 & 2885.1966 & 0.4917 & 0 & 0.6594 & 0 \tabularnewline
182 & 3819 & 3478.1742 & 2805.1739 & 4425.9631 & 0.2405 & 0.9892 & 0.3344 & 0.1887 \tabularnewline
183 & 4067 & 3670.817 & 2940.8078 & 4710.6562 & 0.2276 & 0.39 & 0.4377 & 0.3295 \tabularnewline
184 & 4022 & 3500.1667 & 2815.1352 & 4469.4312 & 0.1457 & 0.1259 & 0.3371 & 0.2065 \tabularnewline
185 & 3937 & 3278.42 & 2651.9925 & 4156.1559 & 0.0707 & 0.0484 & 0.5607 & 0.0809 \tabularnewline
186 & 4365 & 3249.3649 & 2628.6583 & 4118.9898 & 0.006 & 0.0606 & 0.2732 & 0.0697 \tabularnewline
187 & 4290 & 3923.6371 & 3109.3528 & 5105.3064 & 0.2717 & 0.2321 & 0.5123 & 0.5123 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=156909&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[175])[/C][/ROW]
[ROW][C]163[/C][C]3644[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]164[/C][C]4694[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]165[/C][C]2914[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]166[/C][C]3686[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]167[/C][C]4358[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]168[/C][C]5587[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]169[/C][C]2265[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]170[/C][C]3685[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]171[/C][C]3754[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]172[/C][C]3708[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]173[/C][C]3210[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]174[/C][C]3517[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]175[/C][C]3905[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]176[/C][C]3670[/C][C]4027.6952[/C][C]3229.4176[/C][C]5163.1552[/C][C]0.2685[/C][C]0.5839[/C][C]0.125[/C][C]0.5839[/C][/ROW]
[ROW][C]177[/C][C]4221[/C][C]3507.8752[/C][C]2847.0345[/C][C]4428.6454[/C][C]0.0645[/C][C]0.365[/C][C]0.8969[/C][C]0.199[/C][/ROW]
[ROW][C]178[/C][C]4404[/C][C]3877.341[/C][C]3109.5989[/C][C]4968.9276[/C][C]0.1722[/C][C]0.2686[/C][C]0.6344[/C][C]0.4802[/C][/ROW]
[ROW][C]179[/C][C]5086[/C][C]4643.8268[/C][C]3645.5248[/C][C]6116.2799[/C][C]0.2781[/C][C]0.6252[/C][C]0.6482[/C][C]0.8373[/C][/ROW]
[ROW][C]180[/C][C]5725[/C][C]5595.2825[/C][C]4288.7287[/C][C]7604.35[/C][C]0.4496[/C][C]0.6904[/C][C]0.5032[/C][C]0.9504[/C][/ROW]
[ROW][C]181[/C][C]2367[/C][C]2372.4531[/C][C]1985.1701[/C][C]2885.1966[/C][C]0.4917[/C][C]0[/C][C]0.6594[/C][C]0[/C][/ROW]
[ROW][C]182[/C][C]3819[/C][C]3478.1742[/C][C]2805.1739[/C][C]4425.9631[/C][C]0.2405[/C][C]0.9892[/C][C]0.3344[/C][C]0.1887[/C][/ROW]
[ROW][C]183[/C][C]4067[/C][C]3670.817[/C][C]2940.8078[/C][C]4710.6562[/C][C]0.2276[/C][C]0.39[/C][C]0.4377[/C][C]0.3295[/C][/ROW]
[ROW][C]184[/C][C]4022[/C][C]3500.1667[/C][C]2815.1352[/C][C]4469.4312[/C][C]0.1457[/C][C]0.1259[/C][C]0.3371[/C][C]0.2065[/C][/ROW]
[ROW][C]185[/C][C]3937[/C][C]3278.42[/C][C]2651.9925[/C][C]4156.1559[/C][C]0.0707[/C][C]0.0484[/C][C]0.5607[/C][C]0.0809[/C][/ROW]
[ROW][C]186[/C][C]4365[/C][C]3249.3649[/C][C]2628.6583[/C][C]4118.9898[/C][C]0.006[/C][C]0.0606[/C][C]0.2732[/C][C]0.0697[/C][/ROW]
[ROW][C]187[/C][C]4290[/C][C]3923.6371[/C][C]3109.3528[/C][C]5105.3064[/C][C]0.2717[/C][C]0.2321[/C][C]0.5123[/C][C]0.5123[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=156909&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=156909&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[175])
1633644-------
1644694-------
1652914-------
1663686-------
1674358-------
1685587-------
1692265-------
1703685-------
1713754-------
1723708-------
1733210-------
1743517-------
1753905-------
17636704027.69523229.41765163.15520.26850.58390.1250.5839
17742213507.87522847.03454428.64540.06450.3650.89690.199
17844043877.3413109.59894968.92760.17220.26860.63440.4802
17950864643.82683645.52486116.27990.27810.62520.64820.8373
18057255595.28254288.72877604.350.44960.69040.50320.9504
18123672372.45311985.17012885.19660.491700.65940
18238193478.17422805.17394425.96310.24050.98920.33440.1887
18340673670.8172940.80784710.65620.22760.390.43770.3295
18440223500.16672815.13524469.43120.14570.12590.33710.2065
18539373278.422651.99254156.15590.07070.04840.56070.0809
18643653249.36492628.65834118.98980.0060.06060.27320.0697
18742903923.63713109.35285105.30640.27170.23210.51230.5123







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1760.1438-0.08880127945.858200
1770.13390.20330.1461508547.0328318246.4455564.1334
1780.14360.13580.1426277369.6603304620.8504551.9247
1790.16180.09520.1308195517.1483277344.9249526.6355
1800.18320.02320.109316826.6264225241.2652474.5959
1810.1103-0.00230.091429.7363187706.0104433.2505
1820.1390.0980.0924116162.2004177485.4661421.2902
1830.14450.10790.0943156960.9869174919.9062418.2343
1840.14130.14910.1004272309.9816185741.0257430.9768
1850.13660.20090.1105433727.6077210539.6839458.846
1860.13650.34330.13161244641.7798304548.9653551.8596
1870.15370.09340.1284134221.7646290355.0319538.846

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
176 & 0.1438 & -0.0888 & 0 & 127945.8582 & 0 & 0 \tabularnewline
177 & 0.1339 & 0.2033 & 0.1461 & 508547.0328 & 318246.4455 & 564.1334 \tabularnewline
178 & 0.1436 & 0.1358 & 0.1426 & 277369.6603 & 304620.8504 & 551.9247 \tabularnewline
179 & 0.1618 & 0.0952 & 0.1308 & 195517.1483 & 277344.9249 & 526.6355 \tabularnewline
180 & 0.1832 & 0.0232 & 0.1093 & 16826.6264 & 225241.2652 & 474.5959 \tabularnewline
181 & 0.1103 & -0.0023 & 0.0914 & 29.7363 & 187706.0104 & 433.2505 \tabularnewline
182 & 0.139 & 0.098 & 0.0924 & 116162.2004 & 177485.4661 & 421.2902 \tabularnewline
183 & 0.1445 & 0.1079 & 0.0943 & 156960.9869 & 174919.9062 & 418.2343 \tabularnewline
184 & 0.1413 & 0.1491 & 0.1004 & 272309.9816 & 185741.0257 & 430.9768 \tabularnewline
185 & 0.1366 & 0.2009 & 0.1105 & 433727.6077 & 210539.6839 & 458.846 \tabularnewline
186 & 0.1365 & 0.3433 & 0.1316 & 1244641.7798 & 304548.9653 & 551.8596 \tabularnewline
187 & 0.1537 & 0.0934 & 0.1284 & 134221.7646 & 290355.0319 & 538.846 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=156909&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]176[/C][C]0.1438[/C][C]-0.0888[/C][C]0[/C][C]127945.8582[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]177[/C][C]0.1339[/C][C]0.2033[/C][C]0.1461[/C][C]508547.0328[/C][C]318246.4455[/C][C]564.1334[/C][/ROW]
[ROW][C]178[/C][C]0.1436[/C][C]0.1358[/C][C]0.1426[/C][C]277369.6603[/C][C]304620.8504[/C][C]551.9247[/C][/ROW]
[ROW][C]179[/C][C]0.1618[/C][C]0.0952[/C][C]0.1308[/C][C]195517.1483[/C][C]277344.9249[/C][C]526.6355[/C][/ROW]
[ROW][C]180[/C][C]0.1832[/C][C]0.0232[/C][C]0.1093[/C][C]16826.6264[/C][C]225241.2652[/C][C]474.5959[/C][/ROW]
[ROW][C]181[/C][C]0.1103[/C][C]-0.0023[/C][C]0.0914[/C][C]29.7363[/C][C]187706.0104[/C][C]433.2505[/C][/ROW]
[ROW][C]182[/C][C]0.139[/C][C]0.098[/C][C]0.0924[/C][C]116162.2004[/C][C]177485.4661[/C][C]421.2902[/C][/ROW]
[ROW][C]183[/C][C]0.1445[/C][C]0.1079[/C][C]0.0943[/C][C]156960.9869[/C][C]174919.9062[/C][C]418.2343[/C][/ROW]
[ROW][C]184[/C][C]0.1413[/C][C]0.1491[/C][C]0.1004[/C][C]272309.9816[/C][C]185741.0257[/C][C]430.9768[/C][/ROW]
[ROW][C]185[/C][C]0.1366[/C][C]0.2009[/C][C]0.1105[/C][C]433727.6077[/C][C]210539.6839[/C][C]458.846[/C][/ROW]
[ROW][C]186[/C][C]0.1365[/C][C]0.3433[/C][C]0.1316[/C][C]1244641.7798[/C][C]304548.9653[/C][C]551.8596[/C][/ROW]
[ROW][C]187[/C][C]0.1537[/C][C]0.0934[/C][C]0.1284[/C][C]134221.7646[/C][C]290355.0319[/C][C]538.846[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=156909&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=156909&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
1760.1438-0.08880127945.858200
1770.13390.20330.1461508547.0328318246.4455564.1334
1780.14360.13580.1426277369.6603304620.8504551.9247
1790.16180.09520.1308195517.1483277344.9249526.6355
1800.18320.02320.109316826.6264225241.2652474.5959
1810.1103-0.00230.091429.7363187706.0104433.2505
1820.1390.0980.0924116162.2004177485.4661421.2902
1830.14450.10790.0943156960.9869174919.9062418.2343
1840.14130.14910.1004272309.9816185741.0257430.9768
1850.13660.20090.1105433727.6077210539.6839458.846
1860.13650.34330.13161244641.7798304548.9653551.8596
1870.15370.09340.1284134221.7646290355.0319538.846



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