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, 29 Dec 2010 15:41:30 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/29/t1293637160do6gsonc2gmm11w.htm/, Retrieved Fri, 03 May 2024 05:46:36 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=116916, Retrieved Fri, 03 May 2024 05:46:36 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact98
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Spectral Analysis] [Paper] [2010-12-29 15:15:23] [f9c71f724b8f3da7e2789afe36ffff39]
- RMPD    [ARIMA Forecasting] [Paper: ARIMA FORE...] [2010-12-29 15:41:30] [35c3410767ea63f72c8afa35bf7b6164] [Current]
Feedback Forum

Post a new message
Dataseries X:
49915
47469
45652
43492
41087
42931
67256
72316
65624
59450
52851
51214
44092
43752
40320
40551
38329
39530
59648
61031
55560
43877
38510
36085
35994
32617
30001
27894
26083
28817
48742
49915
40264
34276
30426
30793
29855
28081
26820
25782
22654
27373
43675
45096
38145
34017
31537
33814
36531
36935
36497
35110
33137
37407
53963
56602
49694
43957
41723
45599
42503
42153
39098
37449
34748
36548
53639
55289
47774
42156
38019




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116916&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116916&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116916&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'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[59])
4731537-------
4833814-------
4936531-------
5036935-------
5136497-------
5235110-------
5333137-------
5437407-------
5553963-------
5656602-------
5749694-------
5843957-------
5941723-------
604559943207.947438743.336748020.80160.16510.72730.99990.7273
614250344555.154838201.56951613.86050.28440.3860.98710.7842
624215343856.270236254.86152508.61750.34980.62040.94150.6855
633909842686.499834166.426452592.73290.23890.5420.88960.5756
643744941112.263431926.618852004.77660.25490.64150.85990.4562
653474838370.378228880.941149852.3380.26820.56250.81420.2836
663654843274.232232169.631556818.02350.16520.89140.80210.5888
675363963279.599447717.970182086.38670.15750.99730.83420.9877
685528965803.260548918.802686396.13380.15850.87650.80940.989
694777457489.616141457.515877425.65860.16970.58560.77830.9394
704215650998.871735686.921270404.44190.18590.62770.76150.8256
713801947888.721132704.609567427.80140.16110.71740.73190.7319

\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[59]) \tabularnewline
47 & 31537 & - & - & - & - & - & - & - \tabularnewline
48 & 33814 & - & - & - & - & - & - & - \tabularnewline
49 & 36531 & - & - & - & - & - & - & - \tabularnewline
50 & 36935 & - & - & - & - & - & - & - \tabularnewline
51 & 36497 & - & - & - & - & - & - & - \tabularnewline
52 & 35110 & - & - & - & - & - & - & - \tabularnewline
53 & 33137 & - & - & - & - & - & - & - \tabularnewline
54 & 37407 & - & - & - & - & - & - & - \tabularnewline
55 & 53963 & - & - & - & - & - & - & - \tabularnewline
56 & 56602 & - & - & - & - & - & - & - \tabularnewline
57 & 49694 & - & - & - & - & - & - & - \tabularnewline
58 & 43957 & - & - & - & - & - & - & - \tabularnewline
59 & 41723 & - & - & - & - & - & - & - \tabularnewline
60 & 45599 & 43207.9474 & 38743.3367 & 48020.8016 & 0.1651 & 0.7273 & 0.9999 & 0.7273 \tabularnewline
61 & 42503 & 44555.1548 & 38201.569 & 51613.8605 & 0.2844 & 0.386 & 0.9871 & 0.7842 \tabularnewline
62 & 42153 & 43856.2702 & 36254.861 & 52508.6175 & 0.3498 & 0.6204 & 0.9415 & 0.6855 \tabularnewline
63 & 39098 & 42686.4998 & 34166.4264 & 52592.7329 & 0.2389 & 0.542 & 0.8896 & 0.5756 \tabularnewline
64 & 37449 & 41112.2634 & 31926.6188 & 52004.7766 & 0.2549 & 0.6415 & 0.8599 & 0.4562 \tabularnewline
65 & 34748 & 38370.3782 & 28880.9411 & 49852.338 & 0.2682 & 0.5625 & 0.8142 & 0.2836 \tabularnewline
66 & 36548 & 43274.2322 & 32169.6315 & 56818.0235 & 0.1652 & 0.8914 & 0.8021 & 0.5888 \tabularnewline
67 & 53639 & 63279.5994 & 47717.9701 & 82086.3867 & 0.1575 & 0.9973 & 0.8342 & 0.9877 \tabularnewline
68 & 55289 & 65803.2605 & 48918.8026 & 86396.1338 & 0.1585 & 0.8765 & 0.8094 & 0.989 \tabularnewline
69 & 47774 & 57489.6161 & 41457.5158 & 77425.6586 & 0.1697 & 0.5856 & 0.7783 & 0.9394 \tabularnewline
70 & 42156 & 50998.8717 & 35686.9212 & 70404.4419 & 0.1859 & 0.6277 & 0.7615 & 0.8256 \tabularnewline
71 & 38019 & 47888.7211 & 32704.6095 & 67427.8014 & 0.1611 & 0.7174 & 0.7319 & 0.7319 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116916&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[59])[/C][/ROW]
[ROW][C]47[/C][C]31537[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]33814[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]36531[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]36935[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]36497[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]35110[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]33137[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]37407[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]53963[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]56602[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]49694[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]43957[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]41723[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]45599[/C][C]43207.9474[/C][C]38743.3367[/C][C]48020.8016[/C][C]0.1651[/C][C]0.7273[/C][C]0.9999[/C][C]0.7273[/C][/ROW]
[ROW][C]61[/C][C]42503[/C][C]44555.1548[/C][C]38201.569[/C][C]51613.8605[/C][C]0.2844[/C][C]0.386[/C][C]0.9871[/C][C]0.7842[/C][/ROW]
[ROW][C]62[/C][C]42153[/C][C]43856.2702[/C][C]36254.861[/C][C]52508.6175[/C][C]0.3498[/C][C]0.6204[/C][C]0.9415[/C][C]0.6855[/C][/ROW]
[ROW][C]63[/C][C]39098[/C][C]42686.4998[/C][C]34166.4264[/C][C]52592.7329[/C][C]0.2389[/C][C]0.542[/C][C]0.8896[/C][C]0.5756[/C][/ROW]
[ROW][C]64[/C][C]37449[/C][C]41112.2634[/C][C]31926.6188[/C][C]52004.7766[/C][C]0.2549[/C][C]0.6415[/C][C]0.8599[/C][C]0.4562[/C][/ROW]
[ROW][C]65[/C][C]34748[/C][C]38370.3782[/C][C]28880.9411[/C][C]49852.338[/C][C]0.2682[/C][C]0.5625[/C][C]0.8142[/C][C]0.2836[/C][/ROW]
[ROW][C]66[/C][C]36548[/C][C]43274.2322[/C][C]32169.6315[/C][C]56818.0235[/C][C]0.1652[/C][C]0.8914[/C][C]0.8021[/C][C]0.5888[/C][/ROW]
[ROW][C]67[/C][C]53639[/C][C]63279.5994[/C][C]47717.9701[/C][C]82086.3867[/C][C]0.1575[/C][C]0.9973[/C][C]0.8342[/C][C]0.9877[/C][/ROW]
[ROW][C]68[/C][C]55289[/C][C]65803.2605[/C][C]48918.8026[/C][C]86396.1338[/C][C]0.1585[/C][C]0.8765[/C][C]0.8094[/C][C]0.989[/C][/ROW]
[ROW][C]69[/C][C]47774[/C][C]57489.6161[/C][C]41457.5158[/C][C]77425.6586[/C][C]0.1697[/C][C]0.5856[/C][C]0.7783[/C][C]0.9394[/C][/ROW]
[ROW][C]70[/C][C]42156[/C][C]50998.8717[/C][C]35686.9212[/C][C]70404.4419[/C][C]0.1859[/C][C]0.6277[/C][C]0.7615[/C][C]0.8256[/C][/ROW]
[ROW][C]71[/C][C]38019[/C][C]47888.7211[/C][C]32704.6095[/C][C]67427.8014[/C][C]0.1611[/C][C]0.7174[/C][C]0.7319[/C][C]0.7319[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116916&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116916&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[59])
4731537-------
4833814-------
4936531-------
5036935-------
5136497-------
5235110-------
5333137-------
5437407-------
5553963-------
5656602-------
5749694-------
5843957-------
5941723-------
604559943207.947438743.336748020.80160.16510.72730.99990.7273
614250344555.154838201.56951613.86050.28440.3860.98710.7842
624215343856.270236254.86152508.61750.34980.62040.94150.6855
633909842686.499834166.426452592.73290.23890.5420.88960.5756
643744941112.263431926.618852004.77660.25490.64150.85990.4562
653474838370.378228880.941149852.3380.26820.56250.81420.2836
663654843274.232232169.631556818.02350.16520.89140.80210.5888
675363963279.599447717.970182086.38670.15750.99730.83420.9877
685528965803.260548918.802686396.13380.15850.87650.80940.989
694777457489.616141457.515877425.65860.16970.58560.77830.9394
704215650998.871735686.921270404.44190.18590.62770.76150.8256
713801947888.721132704.609567427.80140.16110.71740.73190.7319







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
600.05680.055305717132.741800
610.0808-0.04610.05074211339.32464964236.03322228.0566
620.1007-0.03880.04672901129.44014276533.83552067.9782
630.1184-0.08410.056112877330.96616426733.11812535.1002
640.1352-0.08910.062713419498.61527825286.21752797.3713
650.1527-0.09440.06813121624.07718708009.19412950.9336
660.1597-0.15540.080545242199.32413927179.21273731.9136
670.1516-0.15230.089492941157.073923803926.44534878.9268
680.1597-0.15980.0973110549674.088633442342.85015782.9355
690.1769-0.1690.104494393195.662439537428.13146287.8795
700.1941-0.17340.110778196379.258743051878.23396561.393
710.2082-0.20610.118797411395.252447581837.98546897.959

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
60 & 0.0568 & 0.0553 & 0 & 5717132.7418 & 0 & 0 \tabularnewline
61 & 0.0808 & -0.0461 & 0.0507 & 4211339.3246 & 4964236.0332 & 2228.0566 \tabularnewline
62 & 0.1007 & -0.0388 & 0.0467 & 2901129.4401 & 4276533.8355 & 2067.9782 \tabularnewline
63 & 0.1184 & -0.0841 & 0.0561 & 12877330.9661 & 6426733.1181 & 2535.1002 \tabularnewline
64 & 0.1352 & -0.0891 & 0.0627 & 13419498.6152 & 7825286.2175 & 2797.3713 \tabularnewline
65 & 0.1527 & -0.0944 & 0.068 & 13121624.0771 & 8708009.1941 & 2950.9336 \tabularnewline
66 & 0.1597 & -0.1554 & 0.0805 & 45242199.324 & 13927179.2127 & 3731.9136 \tabularnewline
67 & 0.1516 & -0.1523 & 0.0894 & 92941157.0739 & 23803926.4453 & 4878.9268 \tabularnewline
68 & 0.1597 & -0.1598 & 0.0973 & 110549674.0886 & 33442342.8501 & 5782.9355 \tabularnewline
69 & 0.1769 & -0.169 & 0.1044 & 94393195.6624 & 39537428.1314 & 6287.8795 \tabularnewline
70 & 0.1941 & -0.1734 & 0.1107 & 78196379.2587 & 43051878.2339 & 6561.393 \tabularnewline
71 & 0.2082 & -0.2061 & 0.1187 & 97411395.2524 & 47581837.9854 & 6897.959 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=116916&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]60[/C][C]0.0568[/C][C]0.0553[/C][C]0[/C][C]5717132.7418[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]61[/C][C]0.0808[/C][C]-0.0461[/C][C]0.0507[/C][C]4211339.3246[/C][C]4964236.0332[/C][C]2228.0566[/C][/ROW]
[ROW][C]62[/C][C]0.1007[/C][C]-0.0388[/C][C]0.0467[/C][C]2901129.4401[/C][C]4276533.8355[/C][C]2067.9782[/C][/ROW]
[ROW][C]63[/C][C]0.1184[/C][C]-0.0841[/C][C]0.0561[/C][C]12877330.9661[/C][C]6426733.1181[/C][C]2535.1002[/C][/ROW]
[ROW][C]64[/C][C]0.1352[/C][C]-0.0891[/C][C]0.0627[/C][C]13419498.6152[/C][C]7825286.2175[/C][C]2797.3713[/C][/ROW]
[ROW][C]65[/C][C]0.1527[/C][C]-0.0944[/C][C]0.068[/C][C]13121624.0771[/C][C]8708009.1941[/C][C]2950.9336[/C][/ROW]
[ROW][C]66[/C][C]0.1597[/C][C]-0.1554[/C][C]0.0805[/C][C]45242199.324[/C][C]13927179.2127[/C][C]3731.9136[/C][/ROW]
[ROW][C]67[/C][C]0.1516[/C][C]-0.1523[/C][C]0.0894[/C][C]92941157.0739[/C][C]23803926.4453[/C][C]4878.9268[/C][/ROW]
[ROW][C]68[/C][C]0.1597[/C][C]-0.1598[/C][C]0.0973[/C][C]110549674.0886[/C][C]33442342.8501[/C][C]5782.9355[/C][/ROW]
[ROW][C]69[/C][C]0.1769[/C][C]-0.169[/C][C]0.1044[/C][C]94393195.6624[/C][C]39537428.1314[/C][C]6287.8795[/C][/ROW]
[ROW][C]70[/C][C]0.1941[/C][C]-0.1734[/C][C]0.1107[/C][C]78196379.2587[/C][C]43051878.2339[/C][C]6561.393[/C][/ROW]
[ROW][C]71[/C][C]0.2082[/C][C]-0.2061[/C][C]0.1187[/C][C]97411395.2524[/C][C]47581837.9854[/C][C]6897.959[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=116916&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=116916&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
600.05680.055305717132.741800
610.0808-0.04610.05074211339.32464964236.03322228.0566
620.1007-0.03880.04672901129.44014276533.83552067.9782
630.1184-0.08410.056112877330.96616426733.11812535.1002
640.1352-0.08910.062713419498.61527825286.21752797.3713
650.1527-0.09440.06813121624.07718708009.19412950.9336
660.1597-0.15540.080545242199.32413927179.21273731.9136
670.1516-0.15230.089492941157.073923803926.44534878.9268
680.1597-0.15980.0973110549674.088633442342.85015782.9355
690.1769-0.1690.104494393195.662439537428.13146287.8795
700.1941-0.17340.110778196379.258743051878.23396561.393
710.2082-0.20610.118797411395.252447581837.98546897.959



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