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 computationSat, 08 Dec 2012 12:07:57 -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/2012/Dec/08/t1354986519twdx17kp61lu9ok.htm/, Retrieved Fri, 29 Mar 2024 11:03:35 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=197688, Retrieved Fri, 29 Mar 2024 11:03:35 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact111
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Explorative Data Analysis] [Run Sequence gebo...] [2008-12-12 13:32:37] [76963dc1903f0f612b6153510a3818cf]
- R  D  [Univariate Explorative Data Analysis] [Run Sequence gebo...] [2008-12-17 12:14:40] [76963dc1903f0f612b6153510a3818cf]
-         [Univariate Explorative Data Analysis] [Run Sequence Plot...] [2008-12-22 18:19:51] [1ce0d16c8f4225c977b42c8fa93bc163]
- RMP       [Univariate Data Series] [Identifying Integ...] [2009-11-22 12:08:06] [b98453cac15ba1066b407e146608df68]
- RMP         [Standard Deviation-Mean Plot] [Births] [2010-11-29 10:52:49] [b98453cac15ba1066b407e146608df68]
- RMP           [ARIMA Forecasting] [Births] [2010-11-29 20:53:49] [b98453cac15ba1066b407e146608df68]
- R PD            [ARIMA Forecasting] [Forecasting] [2011-12-05 20:51:34] [c035d973aa8488be257660c2dc4ec375]
- R P                 [ARIMA Forecasting] [PR-WS9-Forecast] [2012-12-08 17:07:57] [8dfbd7005bbb2cc4a26b500e2e7611ce] [Current]
Feedback Forum

Post a new message
Dataseries X:
655362
873127
1107897
1555964
1671159
1493308
2957796
2638691
1305669
1280496
921900
867888
652586
913831
1108544
1555827
1699283
1509458
3268975
2425016
1312703
1365498
934453
775019
651142
843192
1146766
1652601
1465906
1652734
2922334
2702805
1458956
1410363
1019279
936574
708917
885295
1099663
1576220
1487870
1488635
2882530
2677026
1404398
1344370
936865
872705
628151
953712
1160384
1400618
1661511
1495347
2918786
2775677
1407026
1370199
964526
850851
683118
847224
1073256
1514326
1503734
1507712
2865698
2788128
1391596
1366378
946295
859626




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=197688&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'Herman Ole Andreas Wold' @ wold.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[60])
48872705-------
49628151-------
50953712-------
511160384-------
521400618-------
531661511-------
541495347-------
552918786-------
562775677-------
571407026-------
581370199-------
59964526-------
60850851-------
61683118650770.4083462051.4744839489.34230.36850.01890.59290.0189
62847224898957.4931710238.55911087676.4270.29550.98750.28480.6913
6310732561144812.0023956093.06841333530.93620.22870.9990.43580.9989
6415143261528767.10851340048.17451717486.04240.440410.90841
6515037341555733.71531367014.78131744452.64920.29460.66640.1361
6615077121555744.30961367025.37561744463.24350.30890.70550.73481
6728656982914054.04682725335.11283102772.98070.307810.48041
6827881282730538.2142541819.28012919257.1480.27490.08020.31961
6913915961426884.38791238165.4541615603.32190.35700.58171
7013663781381541.79121192822.85731570260.72510.43740.45840.54691
71946295981263.1376792544.20371169982.07150.358200.5690.9122
72859626888052.5919699333.6581076771.52590.38390.27260.65040.6504

\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[60]) \tabularnewline
48 & 872705 & - & - & - & - & - & - & - \tabularnewline
49 & 628151 & - & - & - & - & - & - & - \tabularnewline
50 & 953712 & - & - & - & - & - & - & - \tabularnewline
51 & 1160384 & - & - & - & - & - & - & - \tabularnewline
52 & 1400618 & - & - & - & - & - & - & - \tabularnewline
53 & 1661511 & - & - & - & - & - & - & - \tabularnewline
54 & 1495347 & - & - & - & - & - & - & - \tabularnewline
55 & 2918786 & - & - & - & - & - & - & - \tabularnewline
56 & 2775677 & - & - & - & - & - & - & - \tabularnewline
57 & 1407026 & - & - & - & - & - & - & - \tabularnewline
58 & 1370199 & - & - & - & - & - & - & - \tabularnewline
59 & 964526 & - & - & - & - & - & - & - \tabularnewline
60 & 850851 & - & - & - & - & - & - & - \tabularnewline
61 & 683118 & 650770.4083 & 462051.4744 & 839489.3423 & 0.3685 & 0.0189 & 0.5929 & 0.0189 \tabularnewline
62 & 847224 & 898957.4931 & 710238.5591 & 1087676.427 & 0.2955 & 0.9875 & 0.2848 & 0.6913 \tabularnewline
63 & 1073256 & 1144812.0023 & 956093.0684 & 1333530.9362 & 0.2287 & 0.999 & 0.4358 & 0.9989 \tabularnewline
64 & 1514326 & 1528767.1085 & 1340048.1745 & 1717486.0424 & 0.4404 & 1 & 0.9084 & 1 \tabularnewline
65 & 1503734 & 1555733.7153 & 1367014.7813 & 1744452.6492 & 0.2946 & 0.6664 & 0.136 & 1 \tabularnewline
66 & 1507712 & 1555744.3096 & 1367025.3756 & 1744463.2435 & 0.3089 & 0.7055 & 0.7348 & 1 \tabularnewline
67 & 2865698 & 2914054.0468 & 2725335.1128 & 3102772.9807 & 0.3078 & 1 & 0.4804 & 1 \tabularnewline
68 & 2788128 & 2730538.214 & 2541819.2801 & 2919257.148 & 0.2749 & 0.0802 & 0.3196 & 1 \tabularnewline
69 & 1391596 & 1426884.3879 & 1238165.454 & 1615603.3219 & 0.357 & 0 & 0.5817 & 1 \tabularnewline
70 & 1366378 & 1381541.7912 & 1192822.8573 & 1570260.7251 & 0.4374 & 0.4584 & 0.5469 & 1 \tabularnewline
71 & 946295 & 981263.1376 & 792544.2037 & 1169982.0715 & 0.3582 & 0 & 0.569 & 0.9122 \tabularnewline
72 & 859626 & 888052.5919 & 699333.658 & 1076771.5259 & 0.3839 & 0.2726 & 0.6504 & 0.6504 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=197688&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[60])[/C][/ROW]
[ROW][C]48[/C][C]872705[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]628151[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]953712[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]1160384[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]1400618[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]1661511[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]1495347[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]2918786[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]2775677[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]1407026[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]1370199[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]964526[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]850851[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]683118[/C][C]650770.4083[/C][C]462051.4744[/C][C]839489.3423[/C][C]0.3685[/C][C]0.0189[/C][C]0.5929[/C][C]0.0189[/C][/ROW]
[ROW][C]62[/C][C]847224[/C][C]898957.4931[/C][C]710238.5591[/C][C]1087676.427[/C][C]0.2955[/C][C]0.9875[/C][C]0.2848[/C][C]0.6913[/C][/ROW]
[ROW][C]63[/C][C]1073256[/C][C]1144812.0023[/C][C]956093.0684[/C][C]1333530.9362[/C][C]0.2287[/C][C]0.999[/C][C]0.4358[/C][C]0.9989[/C][/ROW]
[ROW][C]64[/C][C]1514326[/C][C]1528767.1085[/C][C]1340048.1745[/C][C]1717486.0424[/C][C]0.4404[/C][C]1[/C][C]0.9084[/C][C]1[/C][/ROW]
[ROW][C]65[/C][C]1503734[/C][C]1555733.7153[/C][C]1367014.7813[/C][C]1744452.6492[/C][C]0.2946[/C][C]0.6664[/C][C]0.136[/C][C]1[/C][/ROW]
[ROW][C]66[/C][C]1507712[/C][C]1555744.3096[/C][C]1367025.3756[/C][C]1744463.2435[/C][C]0.3089[/C][C]0.7055[/C][C]0.7348[/C][C]1[/C][/ROW]
[ROW][C]67[/C][C]2865698[/C][C]2914054.0468[/C][C]2725335.1128[/C][C]3102772.9807[/C][C]0.3078[/C][C]1[/C][C]0.4804[/C][C]1[/C][/ROW]
[ROW][C]68[/C][C]2788128[/C][C]2730538.214[/C][C]2541819.2801[/C][C]2919257.148[/C][C]0.2749[/C][C]0.0802[/C][C]0.3196[/C][C]1[/C][/ROW]
[ROW][C]69[/C][C]1391596[/C][C]1426884.3879[/C][C]1238165.454[/C][C]1615603.3219[/C][C]0.357[/C][C]0[/C][C]0.5817[/C][C]1[/C][/ROW]
[ROW][C]70[/C][C]1366378[/C][C]1381541.7912[/C][C]1192822.8573[/C][C]1570260.7251[/C][C]0.4374[/C][C]0.4584[/C][C]0.5469[/C][C]1[/C][/ROW]
[ROW][C]71[/C][C]946295[/C][C]981263.1376[/C][C]792544.2037[/C][C]1169982.0715[/C][C]0.3582[/C][C]0[/C][C]0.569[/C][C]0.9122[/C][/ROW]
[ROW][C]72[/C][C]859626[/C][C]888052.5919[/C][C]699333.658[/C][C]1076771.5259[/C][C]0.3839[/C][C]0.2726[/C][C]0.6504[/C][C]0.6504[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=197688&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=197688&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[60])
48872705-------
49628151-------
50953712-------
511160384-------
521400618-------
531661511-------
541495347-------
552918786-------
562775677-------
571407026-------
581370199-------
59964526-------
60850851-------
61683118650770.4083462051.4744839489.34230.36850.01890.59290.0189
62847224898957.4931710238.55911087676.4270.29550.98750.28480.6913
6310732561144812.0023956093.06841333530.93620.22870.9990.43580.9989
6415143261528767.10851340048.17451717486.04240.440410.90841
6515037341555733.71531367014.78131744452.64920.29460.66640.1361
6615077121555744.30961367025.37561744463.24350.30890.70550.73481
6728656982914054.04682725335.11283102772.98070.307810.48041
6827881282730538.2142541819.28012919257.1480.27490.08020.31961
6913915961426884.38791238165.4541615603.32190.35700.58171
7013663781381541.79121192822.85731570260.72510.43740.45840.54691
71946295981263.1376792544.20371169982.07150.358200.5690.9122
72859626888052.5919699333.6581076771.52590.38390.27260.65040.6504







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.1480.049701046366687.054300
620.1071-0.05750.05362676354305.8411861360496.447743143.4873
630.0841-0.06250.05665120261466.80332947660819.899554292.3643
640.063-0.00940.0448208545613.33262262882018.257847569.7595
650.0619-0.03340.04252703970386.26242351099691.858748488.1397
660.0619-0.03090.04062307102760.99182343766870.047648412.4661
670.033-0.01660.03722338307257.85972342986925.449348404.4102
680.03530.02110.03513316583447.31672464686490.682749645.609
690.0675-0.02470.0341245270321.7492329195805.245648261.7427
700.0697-0.0110.0317229940563.39822119270281.060946035.5328
710.0981-0.03560.0321222770646.71832037770314.302545141.6694
720.1084-0.0320.032808071129.62161935295382.245743991.9923

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.148 & 0.0497 & 0 & 1046366687.0543 & 0 & 0 \tabularnewline
62 & 0.1071 & -0.0575 & 0.0536 & 2676354305.841 & 1861360496.4477 & 43143.4873 \tabularnewline
63 & 0.0841 & -0.0625 & 0.0566 & 5120261466.8033 & 2947660819.8995 & 54292.3643 \tabularnewline
64 & 0.063 & -0.0094 & 0.0448 & 208545613.3326 & 2262882018.2578 & 47569.7595 \tabularnewline
65 & 0.0619 & -0.0334 & 0.0425 & 2703970386.2624 & 2351099691.8587 & 48488.1397 \tabularnewline
66 & 0.0619 & -0.0309 & 0.0406 & 2307102760.9918 & 2343766870.0476 & 48412.4661 \tabularnewline
67 & 0.033 & -0.0166 & 0.0372 & 2338307257.8597 & 2342986925.4493 & 48404.4102 \tabularnewline
68 & 0.0353 & 0.0211 & 0.0351 & 3316583447.3167 & 2464686490.6827 & 49645.609 \tabularnewline
69 & 0.0675 & -0.0247 & 0.034 & 1245270321.749 & 2329195805.2456 & 48261.7427 \tabularnewline
70 & 0.0697 & -0.011 & 0.0317 & 229940563.3982 & 2119270281.0609 & 46035.5328 \tabularnewline
71 & 0.0981 & -0.0356 & 0.032 & 1222770646.7183 & 2037770314.3025 & 45141.6694 \tabularnewline
72 & 0.1084 & -0.032 & 0.032 & 808071129.6216 & 1935295382.2457 & 43991.9923 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=197688&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]61[/C][C]0.148[/C][C]0.0497[/C][C]0[/C][C]1046366687.0543[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.1071[/C][C]-0.0575[/C][C]0.0536[/C][C]2676354305.841[/C][C]1861360496.4477[/C][C]43143.4873[/C][/ROW]
[ROW][C]63[/C][C]0.0841[/C][C]-0.0625[/C][C]0.0566[/C][C]5120261466.8033[/C][C]2947660819.8995[/C][C]54292.3643[/C][/ROW]
[ROW][C]64[/C][C]0.063[/C][C]-0.0094[/C][C]0.0448[/C][C]208545613.3326[/C][C]2262882018.2578[/C][C]47569.7595[/C][/ROW]
[ROW][C]65[/C][C]0.0619[/C][C]-0.0334[/C][C]0.0425[/C][C]2703970386.2624[/C][C]2351099691.8587[/C][C]48488.1397[/C][/ROW]
[ROW][C]66[/C][C]0.0619[/C][C]-0.0309[/C][C]0.0406[/C][C]2307102760.9918[/C][C]2343766870.0476[/C][C]48412.4661[/C][/ROW]
[ROW][C]67[/C][C]0.033[/C][C]-0.0166[/C][C]0.0372[/C][C]2338307257.8597[/C][C]2342986925.4493[/C][C]48404.4102[/C][/ROW]
[ROW][C]68[/C][C]0.0353[/C][C]0.0211[/C][C]0.0351[/C][C]3316583447.3167[/C][C]2464686490.6827[/C][C]49645.609[/C][/ROW]
[ROW][C]69[/C][C]0.0675[/C][C]-0.0247[/C][C]0.034[/C][C]1245270321.749[/C][C]2329195805.2456[/C][C]48261.7427[/C][/ROW]
[ROW][C]70[/C][C]0.0697[/C][C]-0.011[/C][C]0.0317[/C][C]229940563.3982[/C][C]2119270281.0609[/C][C]46035.5328[/C][/ROW]
[ROW][C]71[/C][C]0.0981[/C][C]-0.0356[/C][C]0.032[/C][C]1222770646.7183[/C][C]2037770314.3025[/C][C]45141.6694[/C][/ROW]
[ROW][C]72[/C][C]0.1084[/C][C]-0.032[/C][C]0.032[/C][C]808071129.6216[/C][C]1935295382.2457[/C][C]43991.9923[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=197688&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=197688&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
610.1480.049701046366687.054300
620.1071-0.05750.05362676354305.8411861360496.447743143.4873
630.0841-0.06250.05665120261466.80332947660819.899554292.3643
640.063-0.00940.0448208545613.33262262882018.257847569.7595
650.0619-0.03340.04252703970386.26242351099691.858748488.1397
660.0619-0.03090.04062307102760.99182343766870.047648412.4661
670.033-0.01660.03722338307257.85972342986925.449348404.4102
680.03530.02110.03513316583447.31672464686490.682749645.609
690.0675-0.02470.0341245270321.7492329195805.245648261.7427
700.0697-0.0110.0317229940563.39822119270281.060946035.5328
710.0981-0.03560.0321222770646.71832037770314.302545141.6694
720.1084-0.0320.032808071129.62161935295382.245743991.9923



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