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 computationTue, 08 Dec 2009 10:36:01 -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/08/t1260293840e1vmyjnkywkf2py.htm/, Retrieved Sat, 27 Apr 2024 21:02:46 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=64754, Retrieved Sat, 27 Apr 2024 21:02:46 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact168
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2009-12-08 17:36:01] [7dd0431c761b876151627bfbf92230c8] [Current]
-    D    [ARIMA Forecasting] [ARIMA forecasting...] [2009-12-10 10:14:16] [e3c32faf833f030d3b397185b633f75f]
-   P       [ARIMA Forecasting] [Forecasting] [2009-12-19 10:30:06] [e3c32faf833f030d3b397185b633f75f]
-    D    [ARIMA Forecasting] [arima forecasting] [2009-12-10 16:12:08] [74be16979710d4c4e7c6647856088456]
Feedback Forum

Post a new message
Dataseries X:
90398
90269
90390
88219
87032
87175
92603
93571
94118
92159
89528
89955
89587
89488
88521
86587
85159
84915
91378
92729
92194
89664
86285
86858
87184
86629
85220
84816
84831
84957
90951
92134
91790
86625
83324
82719
83614
81640
78665
77828
75728
72187
79357
81329
77304
75576
72932
74291
74988
73302
70483
69848
66466
67610
75091
76207
73454
72008
71362
74250




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=64754&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=64754&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=64754&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[48])
3682719-------
3783614-------
3881640-------
3978665-------
4077828-------
4175728-------
4272187-------
4379357-------
4481329-------
4577304-------
4675576-------
4772932-------
4874291-------
497498874937.099172242.871777631.32650.48520.680800.6808
507330273470.923369661.612477280.23430.46540.217500.3365
517048371084.447266419.381575749.51290.40030.17577e-040.089
526984870220.778864834.237575607.320.44610.4620.00280.0693
536646668664.41262642.218574686.60550.23710.350.01080.0335
546761066288.045159691.166872884.92330.34720.47890.03980.0087
557509173093.179865967.817380218.54240.29130.93430.04240.3709
567620774814.627167197.358682431.89560.36010.47170.04680.5536
577345471998.92463919.643880078.20410.3620.15370.0990.2891
587200869447.46960931.204877963.73320.27780.17820.07920.1325
597136266604.873257672.978475536.7680.14830.11790.08250.0458
607425067444.516158115.489876773.54250.07640.20520.07520.0752

\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 & 82719 & - & - & - & - & - & - & - \tabularnewline
37 & 83614 & - & - & - & - & - & - & - \tabularnewline
38 & 81640 & - & - & - & - & - & - & - \tabularnewline
39 & 78665 & - & - & - & - & - & - & - \tabularnewline
40 & 77828 & - & - & - & - & - & - & - \tabularnewline
41 & 75728 & - & - & - & - & - & - & - \tabularnewline
42 & 72187 & - & - & - & - & - & - & - \tabularnewline
43 & 79357 & - & - & - & - & - & - & - \tabularnewline
44 & 81329 & - & - & - & - & - & - & - \tabularnewline
45 & 77304 & - & - & - & - & - & - & - \tabularnewline
46 & 75576 & - & - & - & - & - & - & - \tabularnewline
47 & 72932 & - & - & - & - & - & - & - \tabularnewline
48 & 74291 & - & - & - & - & - & - & - \tabularnewline
49 & 74988 & 74937.0991 & 72242.8717 & 77631.3265 & 0.4852 & 0.6808 & 0 & 0.6808 \tabularnewline
50 & 73302 & 73470.9233 & 69661.6124 & 77280.2343 & 0.4654 & 0.2175 & 0 & 0.3365 \tabularnewline
51 & 70483 & 71084.4472 & 66419.3815 & 75749.5129 & 0.4003 & 0.1757 & 7e-04 & 0.089 \tabularnewline
52 & 69848 & 70220.7788 & 64834.2375 & 75607.32 & 0.4461 & 0.462 & 0.0028 & 0.0693 \tabularnewline
53 & 66466 & 68664.412 & 62642.2185 & 74686.6055 & 0.2371 & 0.35 & 0.0108 & 0.0335 \tabularnewline
54 & 67610 & 66288.0451 & 59691.1668 & 72884.9233 & 0.3472 & 0.4789 & 0.0398 & 0.0087 \tabularnewline
55 & 75091 & 73093.1798 & 65967.8173 & 80218.5424 & 0.2913 & 0.9343 & 0.0424 & 0.3709 \tabularnewline
56 & 76207 & 74814.6271 & 67197.3586 & 82431.8956 & 0.3601 & 0.4717 & 0.0468 & 0.5536 \tabularnewline
57 & 73454 & 71998.924 & 63919.6438 & 80078.2041 & 0.362 & 0.1537 & 0.099 & 0.2891 \tabularnewline
58 & 72008 & 69447.469 & 60931.2048 & 77963.7332 & 0.2778 & 0.1782 & 0.0792 & 0.1325 \tabularnewline
59 & 71362 & 66604.8732 & 57672.9784 & 75536.768 & 0.1483 & 0.1179 & 0.0825 & 0.0458 \tabularnewline
60 & 74250 & 67444.5161 & 58115.4898 & 76773.5425 & 0.0764 & 0.2052 & 0.0752 & 0.0752 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=64754&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]82719[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]83614[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]81640[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]78665[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]77828[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]75728[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]72187[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]79357[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]81329[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]77304[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]75576[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]72932[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]74291[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]74988[/C][C]74937.0991[/C][C]72242.8717[/C][C]77631.3265[/C][C]0.4852[/C][C]0.6808[/C][C]0[/C][C]0.6808[/C][/ROW]
[ROW][C]50[/C][C]73302[/C][C]73470.9233[/C][C]69661.6124[/C][C]77280.2343[/C][C]0.4654[/C][C]0.2175[/C][C]0[/C][C]0.3365[/C][/ROW]
[ROW][C]51[/C][C]70483[/C][C]71084.4472[/C][C]66419.3815[/C][C]75749.5129[/C][C]0.4003[/C][C]0.1757[/C][C]7e-04[/C][C]0.089[/C][/ROW]
[ROW][C]52[/C][C]69848[/C][C]70220.7788[/C][C]64834.2375[/C][C]75607.32[/C][C]0.4461[/C][C]0.462[/C][C]0.0028[/C][C]0.0693[/C][/ROW]
[ROW][C]53[/C][C]66466[/C][C]68664.412[/C][C]62642.2185[/C][C]74686.6055[/C][C]0.2371[/C][C]0.35[/C][C]0.0108[/C][C]0.0335[/C][/ROW]
[ROW][C]54[/C][C]67610[/C][C]66288.0451[/C][C]59691.1668[/C][C]72884.9233[/C][C]0.3472[/C][C]0.4789[/C][C]0.0398[/C][C]0.0087[/C][/ROW]
[ROW][C]55[/C][C]75091[/C][C]73093.1798[/C][C]65967.8173[/C][C]80218.5424[/C][C]0.2913[/C][C]0.9343[/C][C]0.0424[/C][C]0.3709[/C][/ROW]
[ROW][C]56[/C][C]76207[/C][C]74814.6271[/C][C]67197.3586[/C][C]82431.8956[/C][C]0.3601[/C][C]0.4717[/C][C]0.0468[/C][C]0.5536[/C][/ROW]
[ROW][C]57[/C][C]73454[/C][C]71998.924[/C][C]63919.6438[/C][C]80078.2041[/C][C]0.362[/C][C]0.1537[/C][C]0.099[/C][C]0.2891[/C][/ROW]
[ROW][C]58[/C][C]72008[/C][C]69447.469[/C][C]60931.2048[/C][C]77963.7332[/C][C]0.2778[/C][C]0.1782[/C][C]0.0792[/C][C]0.1325[/C][/ROW]
[ROW][C]59[/C][C]71362[/C][C]66604.8732[/C][C]57672.9784[/C][C]75536.768[/C][C]0.1483[/C][C]0.1179[/C][C]0.0825[/C][C]0.0458[/C][/ROW]
[ROW][C]60[/C][C]74250[/C][C]67444.5161[/C][C]58115.4898[/C][C]76773.5425[/C][C]0.0764[/C][C]0.2052[/C][C]0.0752[/C][C]0.0752[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=64754&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=64754&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])
3682719-------
3783614-------
3881640-------
3978665-------
4077828-------
4175728-------
4272187-------
4379357-------
4481329-------
4577304-------
4675576-------
4772932-------
4874291-------
497498874937.099172242.871777631.32650.48520.680800.6808
507330273470.923369661.612477280.23430.46540.217500.3365
517048371084.447266419.381575749.51290.40030.17577e-040.089
526984870220.778864834.237575607.320.44610.4620.00280.0693
536646668664.41262642.218574686.60550.23710.350.01080.0335
546761066288.045159691.166872884.92330.34720.47890.03980.0087
557509173093.179865967.817380218.54240.29130.93430.04240.3709
567620774814.627167197.358682431.89560.36010.47170.04680.5536
577345471998.92463919.643880078.20410.3620.15370.0990.2891
587200869447.46960931.204877963.73320.27780.17820.07920.1325
597136266604.873257672.978475536.7680.14830.11790.08250.0458
607425067444.516158115.489876773.54250.07640.20520.07520.0752







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.01837e-0402590.902800
500.0265-0.00230.001528535.090415562.9966124.7517
510.0335-0.00850.0038361738.7044130954.8992361.8769
520.0391-0.00530.0042138964.0091132957.1767364.6329
530.0447-0.0320.00984833015.40991072968.82331035.8421
540.05080.01990.01151747564.87941185401.49931088.7615
550.04970.02730.01373991285.491586242.06941259.461
560.05190.01860.01431938702.26921630299.59441276.8319
570.05730.02020.0152117246.26581684404.78011297.8462
580.06260.03690.01726556319.14792171596.21691473.6337
590.06840.07140.022122630255.25654031474.31142007.8532
600.07060.10090.028746314610.71927555069.0122748.6486

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0183 & 7e-04 & 0 & 2590.9028 & 0 & 0 \tabularnewline
50 & 0.0265 & -0.0023 & 0.0015 & 28535.0904 & 15562.9966 & 124.7517 \tabularnewline
51 & 0.0335 & -0.0085 & 0.0038 & 361738.7044 & 130954.8992 & 361.8769 \tabularnewline
52 & 0.0391 & -0.0053 & 0.0042 & 138964.0091 & 132957.1767 & 364.6329 \tabularnewline
53 & 0.0447 & -0.032 & 0.0098 & 4833015.4099 & 1072968.8233 & 1035.8421 \tabularnewline
54 & 0.0508 & 0.0199 & 0.0115 & 1747564.8794 & 1185401.4993 & 1088.7615 \tabularnewline
55 & 0.0497 & 0.0273 & 0.0137 & 3991285.49 & 1586242.0694 & 1259.461 \tabularnewline
56 & 0.0519 & 0.0186 & 0.0143 & 1938702.2692 & 1630299.5944 & 1276.8319 \tabularnewline
57 & 0.0573 & 0.0202 & 0.015 & 2117246.2658 & 1684404.7801 & 1297.8462 \tabularnewline
58 & 0.0626 & 0.0369 & 0.0172 & 6556319.1479 & 2171596.2169 & 1473.6337 \tabularnewline
59 & 0.0684 & 0.0714 & 0.0221 & 22630255.2565 & 4031474.3114 & 2007.8532 \tabularnewline
60 & 0.0706 & 0.1009 & 0.0287 & 46314610.7192 & 7555069.012 & 2748.6486 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=64754&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.0183[/C][C]7e-04[/C][C]0[/C][C]2590.9028[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.0265[/C][C]-0.0023[/C][C]0.0015[/C][C]28535.0904[/C][C]15562.9966[/C][C]124.7517[/C][/ROW]
[ROW][C]51[/C][C]0.0335[/C][C]-0.0085[/C][C]0.0038[/C][C]361738.7044[/C][C]130954.8992[/C][C]361.8769[/C][/ROW]
[ROW][C]52[/C][C]0.0391[/C][C]-0.0053[/C][C]0.0042[/C][C]138964.0091[/C][C]132957.1767[/C][C]364.6329[/C][/ROW]
[ROW][C]53[/C][C]0.0447[/C][C]-0.032[/C][C]0.0098[/C][C]4833015.4099[/C][C]1072968.8233[/C][C]1035.8421[/C][/ROW]
[ROW][C]54[/C][C]0.0508[/C][C]0.0199[/C][C]0.0115[/C][C]1747564.8794[/C][C]1185401.4993[/C][C]1088.7615[/C][/ROW]
[ROW][C]55[/C][C]0.0497[/C][C]0.0273[/C][C]0.0137[/C][C]3991285.49[/C][C]1586242.0694[/C][C]1259.461[/C][/ROW]
[ROW][C]56[/C][C]0.0519[/C][C]0.0186[/C][C]0.0143[/C][C]1938702.2692[/C][C]1630299.5944[/C][C]1276.8319[/C][/ROW]
[ROW][C]57[/C][C]0.0573[/C][C]0.0202[/C][C]0.015[/C][C]2117246.2658[/C][C]1684404.7801[/C][C]1297.8462[/C][/ROW]
[ROW][C]58[/C][C]0.0626[/C][C]0.0369[/C][C]0.0172[/C][C]6556319.1479[/C][C]2171596.2169[/C][C]1473.6337[/C][/ROW]
[ROW][C]59[/C][C]0.0684[/C][C]0.0714[/C][C]0.0221[/C][C]22630255.2565[/C][C]4031474.3114[/C][C]2007.8532[/C][/ROW]
[ROW][C]60[/C][C]0.0706[/C][C]0.1009[/C][C]0.0287[/C][C]46314610.7192[/C][C]7555069.012[/C][C]2748.6486[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=64754&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=64754&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.01837e-0402590.902800
500.0265-0.00230.001528535.090415562.9966124.7517
510.0335-0.00850.0038361738.7044130954.8992361.8769
520.0391-0.00530.0042138964.0091132957.1767364.6329
530.0447-0.0320.00984833015.40991072968.82331035.8421
540.05080.01990.01151747564.87941185401.49931088.7615
550.04970.02730.01373991285.491586242.06941259.461
560.05190.01860.01431938702.26921630299.59441276.8319
570.05730.02020.0152117246.26581684404.78011297.8462
580.06260.03690.01726556319.14792171596.21691473.6337
590.06840.07140.022122630255.25654031474.31142007.8532
600.07060.10090.028746314610.71927555069.0122748.6486



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