Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 10 Jan 2008 13:35:40 -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/2008/Jan/10/t1199997220nt6wwf8lytwvo2a.htm/, Retrieved Thu, 16 May 2024 02:12:40 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=7944, Retrieved Thu, 16 May 2024 02:12:40 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact299
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA forecasting...] [2008-01-10 20:35:40] [c5caf8a1e3802eaf41184f28719e74c9] [Current]
Feedback Forum

Post a new message
Dataseries X:
36845
35338
35022
34777
26887
23970
22780
17351
21382
24561
17409
11514
31514
27071
29462
26105
22397
23843
21705
18089
20764
25316
17704
15548
28029
29383
36438
32034
22679
24319
18004
17537
20366
22782
19169
13807
29743
25591
29096
26482
22405
27044
17970
18730
19684
19785
18479
10698
31956
29506
34506
27165
26736
23691
18157
17328
18205
20995
17382
9367




Summary of compuational 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 compuational 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=7944&T=0

[TABLE]
[ROW][C]Summary of compuational 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=7944&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7944&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 compuational 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[48])
3613807-------
3729743-------
3825591-------
3929096-------
4026482-------
4122405-------
4227044-------
4317970-------
4418730-------
4519684-------
4619785-------
4718479-------
4810698-------
493195627109.455921584.330132634.58170.042810.17511
502950626096.405119885.368932307.44130.1410.03220.56341
513450631500.623125120.988437880.25780.17790.730.771
522716528425.287822001.931134848.64450.35030.03180.72341
532673622378.211615943.374928813.04820.09220.07240.49670.9998
542369125890.766319452.905832328.62680.25150.39850.36281
551815717947.725311509.067624386.3830.47460.04020.49730.9863
561732818237.251711798.383924676.11960.3910.50970.44040.9891
571820519945.741913506.818626384.66520.29810.78720.53180.9976
582099520971.837214532.899327410.77510.49720.80020.64110.9991
591738218750.872712311.930925189.81450.33850.24730.5330.9929
60936711932.94015493.997418371.88290.21740.04860.64650.6465

\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 & 13807 & - & - & - & - & - & - & - \tabularnewline
37 & 29743 & - & - & - & - & - & - & - \tabularnewline
38 & 25591 & - & - & - & - & - & - & - \tabularnewline
39 & 29096 & - & - & - & - & - & - & - \tabularnewline
40 & 26482 & - & - & - & - & - & - & - \tabularnewline
41 & 22405 & - & - & - & - & - & - & - \tabularnewline
42 & 27044 & - & - & - & - & - & - & - \tabularnewline
43 & 17970 & - & - & - & - & - & - & - \tabularnewline
44 & 18730 & - & - & - & - & - & - & - \tabularnewline
45 & 19684 & - & - & - & - & - & - & - \tabularnewline
46 & 19785 & - & - & - & - & - & - & - \tabularnewline
47 & 18479 & - & - & - & - & - & - & - \tabularnewline
48 & 10698 & - & - & - & - & - & - & - \tabularnewline
49 & 31956 & 27109.4559 & 21584.3301 & 32634.5817 & 0.0428 & 1 & 0.1751 & 1 \tabularnewline
50 & 29506 & 26096.4051 & 19885.3689 & 32307.4413 & 0.141 & 0.0322 & 0.5634 & 1 \tabularnewline
51 & 34506 & 31500.6231 & 25120.9884 & 37880.2578 & 0.1779 & 0.73 & 0.77 & 1 \tabularnewline
52 & 27165 & 28425.2878 & 22001.9311 & 34848.6445 & 0.3503 & 0.0318 & 0.7234 & 1 \tabularnewline
53 & 26736 & 22378.2116 & 15943.3749 & 28813.0482 & 0.0922 & 0.0724 & 0.4967 & 0.9998 \tabularnewline
54 & 23691 & 25890.7663 & 19452.9058 & 32328.6268 & 0.2515 & 0.3985 & 0.3628 & 1 \tabularnewline
55 & 18157 & 17947.7253 & 11509.0676 & 24386.383 & 0.4746 & 0.0402 & 0.4973 & 0.9863 \tabularnewline
56 & 17328 & 18237.2517 & 11798.3839 & 24676.1196 & 0.391 & 0.5097 & 0.4404 & 0.9891 \tabularnewline
57 & 18205 & 19945.7419 & 13506.8186 & 26384.6652 & 0.2981 & 0.7872 & 0.5318 & 0.9976 \tabularnewline
58 & 20995 & 20971.8372 & 14532.8993 & 27410.7751 & 0.4972 & 0.8002 & 0.6411 & 0.9991 \tabularnewline
59 & 17382 & 18750.8727 & 12311.9309 & 25189.8145 & 0.3385 & 0.2473 & 0.533 & 0.9929 \tabularnewline
60 & 9367 & 11932.9401 & 5493.9974 & 18371.8829 & 0.2174 & 0.0486 & 0.6465 & 0.6465 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=7944&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]13807[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]29743[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]25591[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]29096[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]26482[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]22405[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]27044[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]17970[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]18730[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]19684[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]19785[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]18479[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]10698[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]31956[/C][C]27109.4559[/C][C]21584.3301[/C][C]32634.5817[/C][C]0.0428[/C][C]1[/C][C]0.1751[/C][C]1[/C][/ROW]
[ROW][C]50[/C][C]29506[/C][C]26096.4051[/C][C]19885.3689[/C][C]32307.4413[/C][C]0.141[/C][C]0.0322[/C][C]0.5634[/C][C]1[/C][/ROW]
[ROW][C]51[/C][C]34506[/C][C]31500.6231[/C][C]25120.9884[/C][C]37880.2578[/C][C]0.1779[/C][C]0.73[/C][C]0.77[/C][C]1[/C][/ROW]
[ROW][C]52[/C][C]27165[/C][C]28425.2878[/C][C]22001.9311[/C][C]34848.6445[/C][C]0.3503[/C][C]0.0318[/C][C]0.7234[/C][C]1[/C][/ROW]
[ROW][C]53[/C][C]26736[/C][C]22378.2116[/C][C]15943.3749[/C][C]28813.0482[/C][C]0.0922[/C][C]0.0724[/C][C]0.4967[/C][C]0.9998[/C][/ROW]
[ROW][C]54[/C][C]23691[/C][C]25890.7663[/C][C]19452.9058[/C][C]32328.6268[/C][C]0.2515[/C][C]0.3985[/C][C]0.3628[/C][C]1[/C][/ROW]
[ROW][C]55[/C][C]18157[/C][C]17947.7253[/C][C]11509.0676[/C][C]24386.383[/C][C]0.4746[/C][C]0.0402[/C][C]0.4973[/C][C]0.9863[/C][/ROW]
[ROW][C]56[/C][C]17328[/C][C]18237.2517[/C][C]11798.3839[/C][C]24676.1196[/C][C]0.391[/C][C]0.5097[/C][C]0.4404[/C][C]0.9891[/C][/ROW]
[ROW][C]57[/C][C]18205[/C][C]19945.7419[/C][C]13506.8186[/C][C]26384.6652[/C][C]0.2981[/C][C]0.7872[/C][C]0.5318[/C][C]0.9976[/C][/ROW]
[ROW][C]58[/C][C]20995[/C][C]20971.8372[/C][C]14532.8993[/C][C]27410.7751[/C][C]0.4972[/C][C]0.8002[/C][C]0.6411[/C][C]0.9991[/C][/ROW]
[ROW][C]59[/C][C]17382[/C][C]18750.8727[/C][C]12311.9309[/C][C]25189.8145[/C][C]0.3385[/C][C]0.2473[/C][C]0.533[/C][C]0.9929[/C][/ROW]
[ROW][C]60[/C][C]9367[/C][C]11932.9401[/C][C]5493.9974[/C][C]18371.8829[/C][C]0.2174[/C][C]0.0486[/C][C]0.6465[/C][C]0.6465[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=7944&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7944&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])
3613807-------
3729743-------
3825591-------
3929096-------
4026482-------
4122405-------
4227044-------
4317970-------
4418730-------
4519684-------
4619785-------
4718479-------
4810698-------
493195627109.455921584.330132634.58170.042810.17511
502950626096.405119885.368932307.44130.1410.03220.56341
513450631500.623125120.988437880.25780.17790.730.771
522716528425.287822001.931134848.64450.35030.03180.72341
532673622378.211615943.374928813.04820.09220.07240.49670.9998
542369125890.766319452.905832328.62680.25150.39850.36281
551815717947.725311509.067624386.3830.47460.04020.49730.9863
561732818237.251711798.383924676.11960.3910.50970.44040.9891
571820519945.741913506.818626384.66520.29810.78720.53180.9976
582099520971.837214532.899327410.77510.49720.80020.64110.9991
591738218750.872712311.930925189.81450.33850.24730.5330.9929
60936711932.94015493.997418371.88290.21740.04860.64650.6465







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.1040.17880.014923488989.72241957415.81021399.0768
500.12140.13070.010911625337.5828968778.1319984.2653
510.10330.09540.0089032290.4844752690.8737867.5776
520.1153-0.04430.00371588325.4149132360.4512363.8138
530.14670.19470.016218990320.08321582526.67361257.9852
540.1269-0.0850.00714838971.8355403247.653635.0178
550.1830.01170.00143795.90883649.659160.4124
560.1801-0.04990.0042826738.711868894.8926262.4784
570.1647-0.08730.00733030182.2595252515.1883502.5089
580.15660.00111e-04536.515244.70966.6865
590.1752-0.0730.00611873812.4965156151.0414395.1595
600.2753-0.2150.01796584048.7759548670.7313740.7231

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.104 & 0.1788 & 0.0149 & 23488989.7224 & 1957415.8102 & 1399.0768 \tabularnewline
50 & 0.1214 & 0.1307 & 0.0109 & 11625337.5828 & 968778.1319 & 984.2653 \tabularnewline
51 & 0.1033 & 0.0954 & 0.008 & 9032290.4844 & 752690.8737 & 867.5776 \tabularnewline
52 & 0.1153 & -0.0443 & 0.0037 & 1588325.4149 & 132360.4512 & 363.8138 \tabularnewline
53 & 0.1467 & 0.1947 & 0.0162 & 18990320.0832 & 1582526.6736 & 1257.9852 \tabularnewline
54 & 0.1269 & -0.085 & 0.0071 & 4838971.8355 & 403247.653 & 635.0178 \tabularnewline
55 & 0.183 & 0.0117 & 0.001 & 43795.9088 & 3649.6591 & 60.4124 \tabularnewline
56 & 0.1801 & -0.0499 & 0.0042 & 826738.7118 & 68894.8926 & 262.4784 \tabularnewline
57 & 0.1647 & -0.0873 & 0.0073 & 3030182.2595 & 252515.1883 & 502.5089 \tabularnewline
58 & 0.1566 & 0.0011 & 1e-04 & 536.5152 & 44.7096 & 6.6865 \tabularnewline
59 & 0.1752 & -0.073 & 0.0061 & 1873812.4965 & 156151.0414 & 395.1595 \tabularnewline
60 & 0.2753 & -0.215 & 0.0179 & 6584048.7759 & 548670.7313 & 740.7231 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=7944&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.104[/C][C]0.1788[/C][C]0.0149[/C][C]23488989.7224[/C][C]1957415.8102[/C][C]1399.0768[/C][/ROW]
[ROW][C]50[/C][C]0.1214[/C][C]0.1307[/C][C]0.0109[/C][C]11625337.5828[/C][C]968778.1319[/C][C]984.2653[/C][/ROW]
[ROW][C]51[/C][C]0.1033[/C][C]0.0954[/C][C]0.008[/C][C]9032290.4844[/C][C]752690.8737[/C][C]867.5776[/C][/ROW]
[ROW][C]52[/C][C]0.1153[/C][C]-0.0443[/C][C]0.0037[/C][C]1588325.4149[/C][C]132360.4512[/C][C]363.8138[/C][/ROW]
[ROW][C]53[/C][C]0.1467[/C][C]0.1947[/C][C]0.0162[/C][C]18990320.0832[/C][C]1582526.6736[/C][C]1257.9852[/C][/ROW]
[ROW][C]54[/C][C]0.1269[/C][C]-0.085[/C][C]0.0071[/C][C]4838971.8355[/C][C]403247.653[/C][C]635.0178[/C][/ROW]
[ROW][C]55[/C][C]0.183[/C][C]0.0117[/C][C]0.001[/C][C]43795.9088[/C][C]3649.6591[/C][C]60.4124[/C][/ROW]
[ROW][C]56[/C][C]0.1801[/C][C]-0.0499[/C][C]0.0042[/C][C]826738.7118[/C][C]68894.8926[/C][C]262.4784[/C][/ROW]
[ROW][C]57[/C][C]0.1647[/C][C]-0.0873[/C][C]0.0073[/C][C]3030182.2595[/C][C]252515.1883[/C][C]502.5089[/C][/ROW]
[ROW][C]58[/C][C]0.1566[/C][C]0.0011[/C][C]1e-04[/C][C]536.5152[/C][C]44.7096[/C][C]6.6865[/C][/ROW]
[ROW][C]59[/C][C]0.1752[/C][C]-0.073[/C][C]0.0061[/C][C]1873812.4965[/C][C]156151.0414[/C][C]395.1595[/C][/ROW]
[ROW][C]60[/C][C]0.2753[/C][C]-0.215[/C][C]0.0179[/C][C]6584048.7759[/C][C]548670.7313[/C][C]740.7231[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=7944&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7944&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.1040.17880.014923488989.72241957415.81021399.0768
500.12140.13070.010911625337.5828968778.1319984.2653
510.10330.09540.0089032290.4844752690.8737867.5776
520.1153-0.04430.00371588325.4149132360.4512363.8138
530.14670.19470.016218990320.08321582526.67361257.9852
540.1269-0.0850.00714838971.8355403247.653635.0178
550.1830.01170.00143795.90883649.659160.4124
560.1801-0.04990.0042826738.711868894.8926262.4784
570.1647-0.08730.00733030182.2595252515.1883502.5089
580.15660.00111e-04536.515244.70966.6865
590.1752-0.0730.00611873812.4965156151.0414395.1595
600.2753-0.2150.01796584048.7759548670.7313740.7231



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 0 ; par8 = 1 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 0 ; par8 = 1 ; 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,fx))
(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.se <- array(0, dim=fx)
perf.mse <- 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.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
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 = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
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:12] <- 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.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[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')