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, 21 Dec 2008 12:13:36 -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/Dec/21/t1229887329cjpbinsc9jc4uf1.htm/, Retrieved Sun, 19 May 2024 11:28:41 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=35778, Retrieved Sun, 19 May 2024 11:28:41 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact156
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [(Partial) Autocorrelation Function] [] [2008-12-08 19:36:03] [d2d412c7f4d35ffbf5ee5ee89db327d4]
- RMP   [ARIMA Backward Selection] [arima backward] [2008-12-15 20:55:34] [7173087adebe3e3a714c80ea2417b3eb]
- RMPD      [ARIMA Forecasting] [aantal overnachti...] [2008-12-21 19:13:36] [f6a332ba2d530c028d935c5a5bbb53af] [Current]
Feedback Forum

Post a new message
Dataseries X:
655362
873127
1107897
1555964
1671159
1493308
2957796
2638691
1305669
1280496
921901
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 time1 seconds
R Server'George Udny Yule' @ 72.249.76.132

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35778&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'George Udny Yule' @ 72.249.76.132







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-------
61683118658917.0393478042.2004839791.87810.39660.01880.63060.0188
62847224896534.253715659.41411077409.09180.29660.98960.26780.6897
6310732561126311.8839945437.0451307186.72280.28270.99880.3560.9986
6415143261541810.04831360935.20941722684.88710.382910.9371
6515037341595361.74571414486.90681776236.58450.16040.81010.23671
6615077121526528.22951345653.39061707403.06840.41920.59750.63231
6728656982981919.18882801044.34993162794.02760.103910.75311
6827881282653294.92692472420.0882834169.76570.0720.01070.09241
6913915961381731.39181200856.5531562606.23070.457400.3921
7013663781355948.6471175073.80821536823.48590.4550.34960.43861
71946295956344.5665775469.72761137219.40540.456600.46470.8735
72859626861318.7471680443.90831042193.5860.49270.17860.54520.5452

\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 & 658917.0393 & 478042.2004 & 839791.8781 & 0.3966 & 0.0188 & 0.6306 & 0.0188 \tabularnewline
62 & 847224 & 896534.253 & 715659.4141 & 1077409.0918 & 0.2966 & 0.9896 & 0.2678 & 0.6897 \tabularnewline
63 & 1073256 & 1126311.8839 & 945437.045 & 1307186.7228 & 0.2827 & 0.9988 & 0.356 & 0.9986 \tabularnewline
64 & 1514326 & 1541810.0483 & 1360935.2094 & 1722684.8871 & 0.3829 & 1 & 0.937 & 1 \tabularnewline
65 & 1503734 & 1595361.7457 & 1414486.9068 & 1776236.5845 & 0.1604 & 0.8101 & 0.2367 & 1 \tabularnewline
66 & 1507712 & 1526528.2295 & 1345653.3906 & 1707403.0684 & 0.4192 & 0.5975 & 0.6323 & 1 \tabularnewline
67 & 2865698 & 2981919.1888 & 2801044.3499 & 3162794.0276 & 0.1039 & 1 & 0.7531 & 1 \tabularnewline
68 & 2788128 & 2653294.9269 & 2472420.088 & 2834169.7657 & 0.072 & 0.0107 & 0.0924 & 1 \tabularnewline
69 & 1391596 & 1381731.3918 & 1200856.553 & 1562606.2307 & 0.4574 & 0 & 0.392 & 1 \tabularnewline
70 & 1366378 & 1355948.647 & 1175073.8082 & 1536823.4859 & 0.455 & 0.3496 & 0.4386 & 1 \tabularnewline
71 & 946295 & 956344.5665 & 775469.7276 & 1137219.4054 & 0.4566 & 0 & 0.4647 & 0.8735 \tabularnewline
72 & 859626 & 861318.7471 & 680443.9083 & 1042193.586 & 0.4927 & 0.1786 & 0.5452 & 0.5452 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35778&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]658917.0393[/C][C]478042.2004[/C][C]839791.8781[/C][C]0.3966[/C][C]0.0188[/C][C]0.6306[/C][C]0.0188[/C][/ROW]
[ROW][C]62[/C][C]847224[/C][C]896534.253[/C][C]715659.4141[/C][C]1077409.0918[/C][C]0.2966[/C][C]0.9896[/C][C]0.2678[/C][C]0.6897[/C][/ROW]
[ROW][C]63[/C][C]1073256[/C][C]1126311.8839[/C][C]945437.045[/C][C]1307186.7228[/C][C]0.2827[/C][C]0.9988[/C][C]0.356[/C][C]0.9986[/C][/ROW]
[ROW][C]64[/C][C]1514326[/C][C]1541810.0483[/C][C]1360935.2094[/C][C]1722684.8871[/C][C]0.3829[/C][C]1[/C][C]0.937[/C][C]1[/C][/ROW]
[ROW][C]65[/C][C]1503734[/C][C]1595361.7457[/C][C]1414486.9068[/C][C]1776236.5845[/C][C]0.1604[/C][C]0.8101[/C][C]0.2367[/C][C]1[/C][/ROW]
[ROW][C]66[/C][C]1507712[/C][C]1526528.2295[/C][C]1345653.3906[/C][C]1707403.0684[/C][C]0.4192[/C][C]0.5975[/C][C]0.6323[/C][C]1[/C][/ROW]
[ROW][C]67[/C][C]2865698[/C][C]2981919.1888[/C][C]2801044.3499[/C][C]3162794.0276[/C][C]0.1039[/C][C]1[/C][C]0.7531[/C][C]1[/C][/ROW]
[ROW][C]68[/C][C]2788128[/C][C]2653294.9269[/C][C]2472420.088[/C][C]2834169.7657[/C][C]0.072[/C][C]0.0107[/C][C]0.0924[/C][C]1[/C][/ROW]
[ROW][C]69[/C][C]1391596[/C][C]1381731.3918[/C][C]1200856.553[/C][C]1562606.2307[/C][C]0.4574[/C][C]0[/C][C]0.392[/C][C]1[/C][/ROW]
[ROW][C]70[/C][C]1366378[/C][C]1355948.647[/C][C]1175073.8082[/C][C]1536823.4859[/C][C]0.455[/C][C]0.3496[/C][C]0.4386[/C][C]1[/C][/ROW]
[ROW][C]71[/C][C]946295[/C][C]956344.5665[/C][C]775469.7276[/C][C]1137219.4054[/C][C]0.4566[/C][C]0[/C][C]0.4647[/C][C]0.8735[/C][/ROW]
[ROW][C]72[/C][C]859626[/C][C]861318.7471[/C][C]680443.9083[/C][C]1042193.586[/C][C]0.4927[/C][C]0.1786[/C][C]0.5452[/C][C]0.5452[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35778&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35778&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-------
61683118658917.0393478042.2004839791.87810.39660.01880.63060.0188
62847224896534.253715659.41411077409.09180.29660.98960.26780.6897
6310732561126311.8839945437.0451307186.72280.28270.99880.3560.9986
6415143261541810.04831360935.20941722684.88710.382910.9371
6515037341595361.74571414486.90681776236.58450.16040.81010.23671
6615077121526528.22951345653.39061707403.06840.41920.59750.63231
6728656982981919.18882801044.34993162794.02760.103910.75311
6827881282653294.92692472420.0882834169.76570.0720.01070.09241
6913915961381731.39181200856.5531562606.23070.457400.3921
7013663781355948.6471175073.80821536823.48590.4550.34960.43861
71946295956344.5665775469.72761137219.40540.456600.46470.8735
72859626861318.7471680443.90831042193.5860.49270.17860.54520.5452







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.14010.03670.0031585686499.893848807208.32456986.2156
620.1029-0.0550.00462431501048.3102202625087.359214234.6439
630.0819-0.04710.00392814926817.6775234577234.806515315.9144
640.0599-0.01780.0015755372908.375562947742.36467933.9613
650.0578-0.05740.00488395643774.2247699636981.185426450.6518
660.0605-0.01230.001354050493.020329504207.75175431.7776
670.0309-0.0390.003213507364717.84661125613726.487233550.1673
680.03480.05080.004218179957607.00421514996467.250338922.9555
690.06680.00716e-0497310494.02088109207.83512847.6671
700.06810.00776e-04108771403.14789064283.59573010.6949
710.0965-0.01059e-04100993786.92838416148.91072901.06
720.1071-0.0022e-042865392.8797238782.74488.654

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.1401 & 0.0367 & 0.0031 & 585686499.8938 & 48807208.3245 & 6986.2156 \tabularnewline
62 & 0.1029 & -0.055 & 0.0046 & 2431501048.3102 & 202625087.3592 & 14234.6439 \tabularnewline
63 & 0.0819 & -0.0471 & 0.0039 & 2814926817.6775 & 234577234.8065 & 15315.9144 \tabularnewline
64 & 0.0599 & -0.0178 & 0.0015 & 755372908.3755 & 62947742.3646 & 7933.9613 \tabularnewline
65 & 0.0578 & -0.0574 & 0.0048 & 8395643774.2247 & 699636981.1854 & 26450.6518 \tabularnewline
66 & 0.0605 & -0.0123 & 0.001 & 354050493.0203 & 29504207.7517 & 5431.7776 \tabularnewline
67 & 0.0309 & -0.039 & 0.0032 & 13507364717.8466 & 1125613726.4872 & 33550.1673 \tabularnewline
68 & 0.0348 & 0.0508 & 0.0042 & 18179957607.0042 & 1514996467.2503 & 38922.9555 \tabularnewline
69 & 0.0668 & 0.0071 & 6e-04 & 97310494.0208 & 8109207.8351 & 2847.6671 \tabularnewline
70 & 0.0681 & 0.0077 & 6e-04 & 108771403.1478 & 9064283.5957 & 3010.6949 \tabularnewline
71 & 0.0965 & -0.0105 & 9e-04 & 100993786.9283 & 8416148.9107 & 2901.06 \tabularnewline
72 & 0.1071 & -0.002 & 2e-04 & 2865392.8797 & 238782.74 & 488.654 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35778&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.1401[/C][C]0.0367[/C][C]0.0031[/C][C]585686499.8938[/C][C]48807208.3245[/C][C]6986.2156[/C][/ROW]
[ROW][C]62[/C][C]0.1029[/C][C]-0.055[/C][C]0.0046[/C][C]2431501048.3102[/C][C]202625087.3592[/C][C]14234.6439[/C][/ROW]
[ROW][C]63[/C][C]0.0819[/C][C]-0.0471[/C][C]0.0039[/C][C]2814926817.6775[/C][C]234577234.8065[/C][C]15315.9144[/C][/ROW]
[ROW][C]64[/C][C]0.0599[/C][C]-0.0178[/C][C]0.0015[/C][C]755372908.3755[/C][C]62947742.3646[/C][C]7933.9613[/C][/ROW]
[ROW][C]65[/C][C]0.0578[/C][C]-0.0574[/C][C]0.0048[/C][C]8395643774.2247[/C][C]699636981.1854[/C][C]26450.6518[/C][/ROW]
[ROW][C]66[/C][C]0.0605[/C][C]-0.0123[/C][C]0.001[/C][C]354050493.0203[/C][C]29504207.7517[/C][C]5431.7776[/C][/ROW]
[ROW][C]67[/C][C]0.0309[/C][C]-0.039[/C][C]0.0032[/C][C]13507364717.8466[/C][C]1125613726.4872[/C][C]33550.1673[/C][/ROW]
[ROW][C]68[/C][C]0.0348[/C][C]0.0508[/C][C]0.0042[/C][C]18179957607.0042[/C][C]1514996467.2503[/C][C]38922.9555[/C][/ROW]
[ROW][C]69[/C][C]0.0668[/C][C]0.0071[/C][C]6e-04[/C][C]97310494.0208[/C][C]8109207.8351[/C][C]2847.6671[/C][/ROW]
[ROW][C]70[/C][C]0.0681[/C][C]0.0077[/C][C]6e-04[/C][C]108771403.1478[/C][C]9064283.5957[/C][C]3010.6949[/C][/ROW]
[ROW][C]71[/C][C]0.0965[/C][C]-0.0105[/C][C]9e-04[/C][C]100993786.9283[/C][C]8416148.9107[/C][C]2901.06[/C][/ROW]
[ROW][C]72[/C][C]0.1071[/C][C]-0.002[/C][C]2e-04[/C][C]2865392.8797[/C][C]238782.74[/C][C]488.654[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35778&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35778&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.14010.03670.0031585686499.893848807208.32456986.2156
620.1029-0.0550.00462431501048.3102202625087.359214234.6439
630.0819-0.04710.00392814926817.6775234577234.806515315.9144
640.0599-0.01780.0015755372908.375562947742.36467933.9613
650.0578-0.05740.00488395643774.2247699636981.185426450.6518
660.0605-0.01230.001354050493.020329504207.75175431.7776
670.0309-0.0390.003213507364717.84661125613726.487233550.1673
680.03480.05080.004218179957607.00421514996467.250338922.9555
690.06680.00716e-0497310494.02088109207.83512847.6671
700.06810.00776e-04108771403.14789064283.59573010.6949
710.0965-0.01059e-04100993786.92838416148.91072901.06
720.1071-0.0022e-042865392.8797238782.74488.654



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