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, 30 Dec 2009 06:33:05 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2009/Dec/30/t1262181028dfapo2osl6vz851.htm/, Retrieved Mon, 29 Apr 2024 05:59:37 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=71279, Retrieved Mon, 29 Apr 2024 05:59:37 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact99
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2009-12-30 13:33:05] [f28d7d960f810305ab21287f74476644] [Current]
Feedback Forum

Post a new message
Dataseries X:
269645
267037
258113
262813
267413
267366
264777
258863
254844
254868
277267
285351
286602
283042
276687
277915
277128
277103
275037
270150
267140
264993
287259
291186
292300
288186
281477
282656
280190
280408
276836
275216
274352
271311
289802
290726
292300
278506
269826
265861
269034
264176
255198
253353
246057
235372
258556
260993
254663
250643
243422
247105
248541
245039
237080
237085
225554
226839
247934
248333
246969
245098
246263
255765
264319
268347
273046
273963
267430
271993
292710
295881




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=71279&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'Gwilym Jenkins' @ 72.249.127.135







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[57])
45246057-------
46235372-------
47258556-------
48260993-------
49254663-------
50250643-------
51243422-------
52247105-------
53248541-------
54245039-------
55237080-------
56237085-------
57225554-------
58226839218804.1262211693.9317225914.32060.01340.031400.0314
59247934240285.2257230451.0115250119.440.06370.99631e-040.9983
60248333241453.8855228897.944254009.82710.14140.15590.00110.9935
61246969238595.351222945.8214254244.88060.14710.11130.02210.9488
62245098231920.9893213696.6802250145.29840.07820.05280.0220.7533
63246263224081.7735203396.4079244767.13910.01780.02320.03340.4445
64255765225489.4917202462.8523248516.13110.0050.03850.03290.4978
65264319226795.7554201625.341251966.16990.00170.0120.04520.5385
66268347223587.7669196387.246250788.28786e-040.00170.06110.4437
67273046216314.9077187198.6502245431.16511e-042e-040.08110.267
68273963215217.8353184294.8738246140.79691e-041e-040.08290.2562
69267430206566.2759173922.8559239209.69591e-0400.12710.1271
70271993199690.2951163987.3499235393.240301e-040.06810.0778
71292710221329.7173182871.6831259787.75151e-040.00490.08760.4148
72295881223131.3564181897.6685264365.04433e-045e-040.11550.4542

\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[57]) \tabularnewline
45 & 246057 & - & - & - & - & - & - & - \tabularnewline
46 & 235372 & - & - & - & - & - & - & - \tabularnewline
47 & 258556 & - & - & - & - & - & - & - \tabularnewline
48 & 260993 & - & - & - & - & - & - & - \tabularnewline
49 & 254663 & - & - & - & - & - & - & - \tabularnewline
50 & 250643 & - & - & - & - & - & - & - \tabularnewline
51 & 243422 & - & - & - & - & - & - & - \tabularnewline
52 & 247105 & - & - & - & - & - & - & - \tabularnewline
53 & 248541 & - & - & - & - & - & - & - \tabularnewline
54 & 245039 & - & - & - & - & - & - & - \tabularnewline
55 & 237080 & - & - & - & - & - & - & - \tabularnewline
56 & 237085 & - & - & - & - & - & - & - \tabularnewline
57 & 225554 & - & - & - & - & - & - & - \tabularnewline
58 & 226839 & 218804.1262 & 211693.9317 & 225914.3206 & 0.0134 & 0.0314 & 0 & 0.0314 \tabularnewline
59 & 247934 & 240285.2257 & 230451.0115 & 250119.44 & 0.0637 & 0.9963 & 1e-04 & 0.9983 \tabularnewline
60 & 248333 & 241453.8855 & 228897.944 & 254009.8271 & 0.1414 & 0.1559 & 0.0011 & 0.9935 \tabularnewline
61 & 246969 & 238595.351 & 222945.8214 & 254244.8806 & 0.1471 & 0.1113 & 0.0221 & 0.9488 \tabularnewline
62 & 245098 & 231920.9893 & 213696.6802 & 250145.2984 & 0.0782 & 0.0528 & 0.022 & 0.7533 \tabularnewline
63 & 246263 & 224081.7735 & 203396.4079 & 244767.1391 & 0.0178 & 0.0232 & 0.0334 & 0.4445 \tabularnewline
64 & 255765 & 225489.4917 & 202462.8523 & 248516.1311 & 0.005 & 0.0385 & 0.0329 & 0.4978 \tabularnewline
65 & 264319 & 226795.7554 & 201625.341 & 251966.1699 & 0.0017 & 0.012 & 0.0452 & 0.5385 \tabularnewline
66 & 268347 & 223587.7669 & 196387.246 & 250788.2878 & 6e-04 & 0.0017 & 0.0611 & 0.4437 \tabularnewline
67 & 273046 & 216314.9077 & 187198.6502 & 245431.1651 & 1e-04 & 2e-04 & 0.0811 & 0.267 \tabularnewline
68 & 273963 & 215217.8353 & 184294.8738 & 246140.7969 & 1e-04 & 1e-04 & 0.0829 & 0.2562 \tabularnewline
69 & 267430 & 206566.2759 & 173922.8559 & 239209.6959 & 1e-04 & 0 & 0.1271 & 0.1271 \tabularnewline
70 & 271993 & 199690.2951 & 163987.3499 & 235393.2403 & 0 & 1e-04 & 0.0681 & 0.0778 \tabularnewline
71 & 292710 & 221329.7173 & 182871.6831 & 259787.7515 & 1e-04 & 0.0049 & 0.0876 & 0.4148 \tabularnewline
72 & 295881 & 223131.3564 & 181897.6685 & 264365.0443 & 3e-04 & 5e-04 & 0.1155 & 0.4542 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=71279&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[57])[/C][/ROW]
[ROW][C]45[/C][C]246057[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]235372[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]258556[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]260993[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]254663[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]250643[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]243422[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]247105[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]248541[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]245039[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]237080[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]237085[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]225554[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]226839[/C][C]218804.1262[/C][C]211693.9317[/C][C]225914.3206[/C][C]0.0134[/C][C]0.0314[/C][C]0[/C][C]0.0314[/C][/ROW]
[ROW][C]59[/C][C]247934[/C][C]240285.2257[/C][C]230451.0115[/C][C]250119.44[/C][C]0.0637[/C][C]0.9963[/C][C]1e-04[/C][C]0.9983[/C][/ROW]
[ROW][C]60[/C][C]248333[/C][C]241453.8855[/C][C]228897.944[/C][C]254009.8271[/C][C]0.1414[/C][C]0.1559[/C][C]0.0011[/C][C]0.9935[/C][/ROW]
[ROW][C]61[/C][C]246969[/C][C]238595.351[/C][C]222945.8214[/C][C]254244.8806[/C][C]0.1471[/C][C]0.1113[/C][C]0.0221[/C][C]0.9488[/C][/ROW]
[ROW][C]62[/C][C]245098[/C][C]231920.9893[/C][C]213696.6802[/C][C]250145.2984[/C][C]0.0782[/C][C]0.0528[/C][C]0.022[/C][C]0.7533[/C][/ROW]
[ROW][C]63[/C][C]246263[/C][C]224081.7735[/C][C]203396.4079[/C][C]244767.1391[/C][C]0.0178[/C][C]0.0232[/C][C]0.0334[/C][C]0.4445[/C][/ROW]
[ROW][C]64[/C][C]255765[/C][C]225489.4917[/C][C]202462.8523[/C][C]248516.1311[/C][C]0.005[/C][C]0.0385[/C][C]0.0329[/C][C]0.4978[/C][/ROW]
[ROW][C]65[/C][C]264319[/C][C]226795.7554[/C][C]201625.341[/C][C]251966.1699[/C][C]0.0017[/C][C]0.012[/C][C]0.0452[/C][C]0.5385[/C][/ROW]
[ROW][C]66[/C][C]268347[/C][C]223587.7669[/C][C]196387.246[/C][C]250788.2878[/C][C]6e-04[/C][C]0.0017[/C][C]0.0611[/C][C]0.4437[/C][/ROW]
[ROW][C]67[/C][C]273046[/C][C]216314.9077[/C][C]187198.6502[/C][C]245431.1651[/C][C]1e-04[/C][C]2e-04[/C][C]0.0811[/C][C]0.267[/C][/ROW]
[ROW][C]68[/C][C]273963[/C][C]215217.8353[/C][C]184294.8738[/C][C]246140.7969[/C][C]1e-04[/C][C]1e-04[/C][C]0.0829[/C][C]0.2562[/C][/ROW]
[ROW][C]69[/C][C]267430[/C][C]206566.2759[/C][C]173922.8559[/C][C]239209.6959[/C][C]1e-04[/C][C]0[/C][C]0.1271[/C][C]0.1271[/C][/ROW]
[ROW][C]70[/C][C]271993[/C][C]199690.2951[/C][C]163987.3499[/C][C]235393.2403[/C][C]0[/C][C]1e-04[/C][C]0.0681[/C][C]0.0778[/C][/ROW]
[ROW][C]71[/C][C]292710[/C][C]221329.7173[/C][C]182871.6831[/C][C]259787.7515[/C][C]1e-04[/C][C]0.0049[/C][C]0.0876[/C][C]0.4148[/C][/ROW]
[ROW][C]72[/C][C]295881[/C][C]223131.3564[/C][C]181897.6685[/C][C]264365.0443[/C][C]3e-04[/C][C]5e-04[/C][C]0.1155[/C][C]0.4542[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=71279&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=71279&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[57])
45246057-------
46235372-------
47258556-------
48260993-------
49254663-------
50250643-------
51243422-------
52247105-------
53248541-------
54245039-------
55237080-------
56237085-------
57225554-------
58226839218804.1262211693.9317225914.32060.01340.031400.0314
59247934240285.2257230451.0115250119.440.06370.99631e-040.9983
60248333241453.8855228897.944254009.82710.14140.15590.00110.9935
61246969238595.351222945.8214254244.88060.14710.11130.02210.9488
62245098231920.9893213696.6802250145.29840.07820.05280.0220.7533
63246263224081.7735203396.4079244767.13910.01780.02320.03340.4445
64255765225489.4917202462.8523248516.13110.0050.03850.03290.4978
65264319226795.7554201625.341251966.16990.00170.0120.04520.5385
66268347223587.7669196387.246250788.28786e-040.00170.06110.4437
67273046216314.9077187198.6502245431.16511e-042e-040.08110.267
68273963215217.8353184294.8738246140.79691e-041e-040.08290.2562
69267430206566.2759173922.8559239209.69591e-0400.12710.1271
70271993199690.2951163987.3499235393.240301e-040.06810.0778
71292710221329.7173182871.6831259787.75151e-040.00490.08760.4148
72295881223131.3564181897.6685264365.04433e-045e-040.11550.4542







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
580.01660.0367064559197.485500
590.02090.03180.034358503747.71161531472.59837844.1999
600.02650.02850.032347322215.739956795053.64557536.2493
610.03350.03510.03370117997.650160125789.64667754.0821
620.04010.05680.0378173633611.172782827353.95189100.9535
630.04710.0990.048492006810.3127151023930.01212289.1794
640.05210.13430.0603916606404.9689260392855.005816136.6928
650.05660.16540.07351407993882.8103403842983.481420095.8449
660.06210.20020.08752003388947.311581570312.795824115.769
670.06870.26230.1053218416837.4215845254965.258429073.2689
680.07330.2730.12033450994374.42531082140366.091732895.902
690.08060.29460.13483704392911.95881300661411.580636064.6837
700.09120.36210.15235227681139.06811602739852.156640034.2335
710.08870.32250.16445095144757.58581852197345.401543037.1624
720.09430.3260.17525292510642.57612081551565.213245624.024

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
58 & 0.0166 & 0.0367 & 0 & 64559197.4855 & 0 & 0 \tabularnewline
59 & 0.0209 & 0.0318 & 0.0343 & 58503747.711 & 61531472.5983 & 7844.1999 \tabularnewline
60 & 0.0265 & 0.0285 & 0.0323 & 47322215.7399 & 56795053.6455 & 7536.2493 \tabularnewline
61 & 0.0335 & 0.0351 & 0.033 & 70117997.6501 & 60125789.6466 & 7754.0821 \tabularnewline
62 & 0.0401 & 0.0568 & 0.0378 & 173633611.1727 & 82827353.9518 & 9100.9535 \tabularnewline
63 & 0.0471 & 0.099 & 0.048 & 492006810.3127 & 151023930.012 & 12289.1794 \tabularnewline
64 & 0.0521 & 0.1343 & 0.0603 & 916606404.9689 & 260392855.0058 & 16136.6928 \tabularnewline
65 & 0.0566 & 0.1654 & 0.0735 & 1407993882.8103 & 403842983.4814 & 20095.8449 \tabularnewline
66 & 0.0621 & 0.2002 & 0.0875 & 2003388947.311 & 581570312.7958 & 24115.769 \tabularnewline
67 & 0.0687 & 0.2623 & 0.105 & 3218416837.4215 & 845254965.2584 & 29073.2689 \tabularnewline
68 & 0.0733 & 0.273 & 0.1203 & 3450994374.4253 & 1082140366.0917 & 32895.902 \tabularnewline
69 & 0.0806 & 0.2946 & 0.1348 & 3704392911.9588 & 1300661411.5806 & 36064.6837 \tabularnewline
70 & 0.0912 & 0.3621 & 0.1523 & 5227681139.0681 & 1602739852.1566 & 40034.2335 \tabularnewline
71 & 0.0887 & 0.3225 & 0.1644 & 5095144757.5858 & 1852197345.4015 & 43037.1624 \tabularnewline
72 & 0.0943 & 0.326 & 0.1752 & 5292510642.5761 & 2081551565.2132 & 45624.024 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=71279&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]58[/C][C]0.0166[/C][C]0.0367[/C][C]0[/C][C]64559197.4855[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]59[/C][C]0.0209[/C][C]0.0318[/C][C]0.0343[/C][C]58503747.711[/C][C]61531472.5983[/C][C]7844.1999[/C][/ROW]
[ROW][C]60[/C][C]0.0265[/C][C]0.0285[/C][C]0.0323[/C][C]47322215.7399[/C][C]56795053.6455[/C][C]7536.2493[/C][/ROW]
[ROW][C]61[/C][C]0.0335[/C][C]0.0351[/C][C]0.033[/C][C]70117997.6501[/C][C]60125789.6466[/C][C]7754.0821[/C][/ROW]
[ROW][C]62[/C][C]0.0401[/C][C]0.0568[/C][C]0.0378[/C][C]173633611.1727[/C][C]82827353.9518[/C][C]9100.9535[/C][/ROW]
[ROW][C]63[/C][C]0.0471[/C][C]0.099[/C][C]0.048[/C][C]492006810.3127[/C][C]151023930.012[/C][C]12289.1794[/C][/ROW]
[ROW][C]64[/C][C]0.0521[/C][C]0.1343[/C][C]0.0603[/C][C]916606404.9689[/C][C]260392855.0058[/C][C]16136.6928[/C][/ROW]
[ROW][C]65[/C][C]0.0566[/C][C]0.1654[/C][C]0.0735[/C][C]1407993882.8103[/C][C]403842983.4814[/C][C]20095.8449[/C][/ROW]
[ROW][C]66[/C][C]0.0621[/C][C]0.2002[/C][C]0.0875[/C][C]2003388947.311[/C][C]581570312.7958[/C][C]24115.769[/C][/ROW]
[ROW][C]67[/C][C]0.0687[/C][C]0.2623[/C][C]0.105[/C][C]3218416837.4215[/C][C]845254965.2584[/C][C]29073.2689[/C][/ROW]
[ROW][C]68[/C][C]0.0733[/C][C]0.273[/C][C]0.1203[/C][C]3450994374.4253[/C][C]1082140366.0917[/C][C]32895.902[/C][/ROW]
[ROW][C]69[/C][C]0.0806[/C][C]0.2946[/C][C]0.1348[/C][C]3704392911.9588[/C][C]1300661411.5806[/C][C]36064.6837[/C][/ROW]
[ROW][C]70[/C][C]0.0912[/C][C]0.3621[/C][C]0.1523[/C][C]5227681139.0681[/C][C]1602739852.1566[/C][C]40034.2335[/C][/ROW]
[ROW][C]71[/C][C]0.0887[/C][C]0.3225[/C][C]0.1644[/C][C]5095144757.5858[/C][C]1852197345.4015[/C][C]43037.1624[/C][/ROW]
[ROW][C]72[/C][C]0.0943[/C][C]0.326[/C][C]0.1752[/C][C]5292510642.5761[/C][C]2081551565.2132[/C][C]45624.024[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=71279&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=71279&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
580.01660.0367064559197.485500
590.02090.03180.034358503747.71161531472.59837844.1999
600.02650.02850.032347322215.739956795053.64557536.2493
610.03350.03510.03370117997.650160125789.64667754.0821
620.04010.05680.0378173633611.172782827353.95189100.9535
630.04710.0990.048492006810.3127151023930.01212289.1794
640.05210.13430.0603916606404.9689260392855.005816136.6928
650.05660.16540.07351407993882.8103403842983.481420095.8449
660.06210.20020.08752003388947.311581570312.795824115.769
670.06870.26230.1053218416837.4215845254965.258429073.2689
680.07330.2730.12033450994374.42531082140366.091732895.902
690.08060.29460.13483704392911.95881300661411.580636064.6837
700.09120.36210.15235227681139.06811602739852.156640034.2335
710.08870.32250.16445095144757.58581852197345.401543037.1624
720.09430.3260.17525292510642.57612081551565.213245624.024



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