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 computationMon, 15 Dec 2008 16:20:43 -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/16/t1229383289xurswyfhx2wyqak.htm/, Retrieved Wed, 15 May 2024 08:54:43 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33864, Retrieved Wed, 15 May 2024 08:54:43 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact146
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Central Tendency] [Central Tendency:...] [2008-12-12 13:08:46] [6816386b1f3c2f6c0c9f2aa1e5bc9362]
- RMPD  [Mean Plot] [Mean plot - prijs...] [2008-12-12 14:56:05] [6816386b1f3c2f6c0c9f2aa1e5bc9362]
- RMPD    [Tukey lambda PPCC Plot] [PPCC: Bel 20] [2008-12-12 15:02:48] [6816386b1f3c2f6c0c9f2aa1e5bc9362]
- RMP       [ARIMA Backward Selection] [Arima: Bel 20] [2008-12-14 20:11:31] [6816386b1f3c2f6c0c9f2aa1e5bc9362]
F RMPD        [ARIMA Forecasting] [Arima forecasting...] [2008-12-14 22:14:13] [6816386b1f3c2f6c0c9f2aa1e5bc9362]
-   PD          [ARIMA Forecasting] [Arima forecasting...] [2008-12-14 22:31:41] [6816386b1f3c2f6c0c9f2aa1e5bc9362]
-                   [ARIMA Forecasting] [arima forecast do...] [2008-12-15 23:20:43] [e81ac192d6ae6d77191d83851a692999] [Current]
Feedback Forum

Post a new message
Dataseries X:
10967,87
10433,56
10665,78
10666,71
10682,74
10777,22
10052,6
10213,97
10546,82
10767,2
10444,5
10314,68
9042,56
9220,75
9721,84
9978,53
9923,81
9892,56
10500,98
10179,35
10080,48
9492,44
8616,49
8685,4
8160,67
8048,1
8641,21
8526,63
8474,21
7916,13
7977,64
8334,59
8623,36
9098,03
9154,34
9284,73
9492,49
9682,35
9762,12
10124,63
10540,05
10601,61
10323,73
10418,4
10092,96
10364,91
10152,09
10032,8
10204,59
10001,6
10411,75
10673,38
10539,51
10723,78
10682,06
10283,19
10377,18
10486,64
10545,38
10554,27
10532,54
10324,31
10695,25
10827,81
10872,48
10971,19
11145,65
11234,68
11333,88
10997,97
11036,89
11257,35
11533,59
11963,12
12185,15
12377,62
12512,89
12631,48
12268,53
12754,8
13407,75
13480,21
13673,28
13239,71
13557,69
13901,28
13200,58
13406,97
12538,12
12419,57
12193,88
12656,63
12812,48
12056,67
11322,38
11530,75
11114,08
9181,73
8614,55




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time11 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 & 11 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33864&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]11 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=33864&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33864&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 time11 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[87])
7512185.15-------
7612377.62-------
7712512.89-------
7812631.48-------
7912268.53-------
8012754.8-------
8113407.75-------
8213480.21-------
8313673.28-------
8413239.71-------
8513557.69-------
8613901.28-------
8713200.58-------
8813406.9713155.844112489.465113822.2230.23010.44770.9890.4477
8912538.1213152.987912180.036914125.9390.10770.30440.90140.4618
9012419.5713152.805611947.374114358.23710.11660.84120.80170.469
9112193.8813152.793911752.885614552.70230.08970.84770.89220.4733
9212656.6313152.793211582.303714723.28270.26790.88430.69030.4762
9312812.4813152.793211428.515914877.07050.34940.71360.3860.4783
9412056.6713152.793211287.363615018.22270.12470.63970.36540.48
9511322.3813152.793211156.165415149.42090.03620.8590.30470.4813
9611530.7513152.793211033.072115272.51420.06680.95470.4680.4824
9711114.0813152.793210916.744815388.84150.0370.92250.36130.4833
989181.7313152.793210806.17715499.40935e-040.95570.26590.4841
998614.5513152.793210700.589515604.99681e-040.99920.48480.4848

\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[87]) \tabularnewline
75 & 12185.15 & - & - & - & - & - & - & - \tabularnewline
76 & 12377.62 & - & - & - & - & - & - & - \tabularnewline
77 & 12512.89 & - & - & - & - & - & - & - \tabularnewline
78 & 12631.48 & - & - & - & - & - & - & - \tabularnewline
79 & 12268.53 & - & - & - & - & - & - & - \tabularnewline
80 & 12754.8 & - & - & - & - & - & - & - \tabularnewline
81 & 13407.75 & - & - & - & - & - & - & - \tabularnewline
82 & 13480.21 & - & - & - & - & - & - & - \tabularnewline
83 & 13673.28 & - & - & - & - & - & - & - \tabularnewline
84 & 13239.71 & - & - & - & - & - & - & - \tabularnewline
85 & 13557.69 & - & - & - & - & - & - & - \tabularnewline
86 & 13901.28 & - & - & - & - & - & - & - \tabularnewline
87 & 13200.58 & - & - & - & - & - & - & - \tabularnewline
88 & 13406.97 & 13155.8441 & 12489.4651 & 13822.223 & 0.2301 & 0.4477 & 0.989 & 0.4477 \tabularnewline
89 & 12538.12 & 13152.9879 & 12180.0369 & 14125.939 & 0.1077 & 0.3044 & 0.9014 & 0.4618 \tabularnewline
90 & 12419.57 & 13152.8056 & 11947.3741 & 14358.2371 & 0.1166 & 0.8412 & 0.8017 & 0.469 \tabularnewline
91 & 12193.88 & 13152.7939 & 11752.8856 & 14552.7023 & 0.0897 & 0.8477 & 0.8922 & 0.4733 \tabularnewline
92 & 12656.63 & 13152.7932 & 11582.3037 & 14723.2827 & 0.2679 & 0.8843 & 0.6903 & 0.4762 \tabularnewline
93 & 12812.48 & 13152.7932 & 11428.5159 & 14877.0705 & 0.3494 & 0.7136 & 0.386 & 0.4783 \tabularnewline
94 & 12056.67 & 13152.7932 & 11287.3636 & 15018.2227 & 0.1247 & 0.6397 & 0.3654 & 0.48 \tabularnewline
95 & 11322.38 & 13152.7932 & 11156.1654 & 15149.4209 & 0.0362 & 0.859 & 0.3047 & 0.4813 \tabularnewline
96 & 11530.75 & 13152.7932 & 11033.0721 & 15272.5142 & 0.0668 & 0.9547 & 0.468 & 0.4824 \tabularnewline
97 & 11114.08 & 13152.7932 & 10916.7448 & 15388.8415 & 0.037 & 0.9225 & 0.3613 & 0.4833 \tabularnewline
98 & 9181.73 & 13152.7932 & 10806.177 & 15499.4093 & 5e-04 & 0.9557 & 0.2659 & 0.4841 \tabularnewline
99 & 8614.55 & 13152.7932 & 10700.5895 & 15604.9968 & 1e-04 & 0.9992 & 0.4848 & 0.4848 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33864&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[87])[/C][/ROW]
[ROW][C]75[/C][C]12185.15[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]12377.62[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]12512.89[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]12631.48[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]12268.53[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]12754.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]13407.75[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]13480.21[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]13673.28[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]13239.71[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]13557.69[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]13901.28[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]13200.58[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]13406.97[/C][C]13155.8441[/C][C]12489.4651[/C][C]13822.223[/C][C]0.2301[/C][C]0.4477[/C][C]0.989[/C][C]0.4477[/C][/ROW]
[ROW][C]89[/C][C]12538.12[/C][C]13152.9879[/C][C]12180.0369[/C][C]14125.939[/C][C]0.1077[/C][C]0.3044[/C][C]0.9014[/C][C]0.4618[/C][/ROW]
[ROW][C]90[/C][C]12419.57[/C][C]13152.8056[/C][C]11947.3741[/C][C]14358.2371[/C][C]0.1166[/C][C]0.8412[/C][C]0.8017[/C][C]0.469[/C][/ROW]
[ROW][C]91[/C][C]12193.88[/C][C]13152.7939[/C][C]11752.8856[/C][C]14552.7023[/C][C]0.0897[/C][C]0.8477[/C][C]0.8922[/C][C]0.4733[/C][/ROW]
[ROW][C]92[/C][C]12656.63[/C][C]13152.7932[/C][C]11582.3037[/C][C]14723.2827[/C][C]0.2679[/C][C]0.8843[/C][C]0.6903[/C][C]0.4762[/C][/ROW]
[ROW][C]93[/C][C]12812.48[/C][C]13152.7932[/C][C]11428.5159[/C][C]14877.0705[/C][C]0.3494[/C][C]0.7136[/C][C]0.386[/C][C]0.4783[/C][/ROW]
[ROW][C]94[/C][C]12056.67[/C][C]13152.7932[/C][C]11287.3636[/C][C]15018.2227[/C][C]0.1247[/C][C]0.6397[/C][C]0.3654[/C][C]0.48[/C][/ROW]
[ROW][C]95[/C][C]11322.38[/C][C]13152.7932[/C][C]11156.1654[/C][C]15149.4209[/C][C]0.0362[/C][C]0.859[/C][C]0.3047[/C][C]0.4813[/C][/ROW]
[ROW][C]96[/C][C]11530.75[/C][C]13152.7932[/C][C]11033.0721[/C][C]15272.5142[/C][C]0.0668[/C][C]0.9547[/C][C]0.468[/C][C]0.4824[/C][/ROW]
[ROW][C]97[/C][C]11114.08[/C][C]13152.7932[/C][C]10916.7448[/C][C]15388.8415[/C][C]0.037[/C][C]0.9225[/C][C]0.3613[/C][C]0.4833[/C][/ROW]
[ROW][C]98[/C][C]9181.73[/C][C]13152.7932[/C][C]10806.177[/C][C]15499.4093[/C][C]5e-04[/C][C]0.9557[/C][C]0.2659[/C][C]0.4841[/C][/ROW]
[ROW][C]99[/C][C]8614.55[/C][C]13152.7932[/C][C]10700.5895[/C][C]15604.9968[/C][C]1e-04[/C][C]0.9992[/C][C]0.4848[/C][C]0.4848[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33864&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33864&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[87])
7512185.15-------
7612377.62-------
7712512.89-------
7812631.48-------
7912268.53-------
8012754.8-------
8113407.75-------
8213480.21-------
8313673.28-------
8413239.71-------
8513557.69-------
8613901.28-------
8713200.58-------
8813406.9713155.844112489.465113822.2230.23010.44770.9890.4477
8912538.1213152.987912180.036914125.9390.10770.30440.90140.4618
9012419.5713152.805611947.374114358.23710.11660.84120.80170.469
9112193.8813152.793911752.885614552.70230.08970.84770.89220.4733
9212656.6313152.793211582.303714723.28270.26790.88430.69030.4762
9312812.4813152.793211428.515914877.07050.34940.71360.3860.4783
9412056.6713152.793211287.363615018.22270.12470.63970.36540.48
9511322.3813152.793211156.165415149.42090.03620.8590.30470.4813
9611530.7513152.793211033.072115272.51420.06680.95470.4680.4824
9711114.0813152.793210916.744815388.84150.0370.92250.36130.4833
989181.7313152.793210806.17715499.40935e-040.95570.26590.4841
998614.5513152.793210700.589515604.99681e-040.99920.48480.4848







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
880.02580.01910.001663064.22485255.352172.4938
890.0377-0.04670.0039378062.582531505.2152177.4971
900.0468-0.05570.0046537634.429744802.8691211.6669
910.0543-0.07290.0061919515.958676626.3299276.8146
920.0609-0.03770.0031246177.925220514.8271143.23
930.0669-0.02590.0022115813.04469651.087198.2399
940.0724-0.08330.00691201485.9681100123.8307316.4235
950.0775-0.13920.01163350412.3125279201.026528.3948
960.0822-0.12330.01032631023.9918219251.9993468.2435
970.0867-0.1550.01294156351.3222346362.6102588.5258
980.091-0.30190.025215769342.5691314111.88071146.3472
990.0951-0.3450.028820595650.92021716304.24331310.078

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
88 & 0.0258 & 0.0191 & 0.0016 & 63064.2248 & 5255.3521 & 72.4938 \tabularnewline
89 & 0.0377 & -0.0467 & 0.0039 & 378062.5825 & 31505.2152 & 177.4971 \tabularnewline
90 & 0.0468 & -0.0557 & 0.0046 & 537634.4297 & 44802.8691 & 211.6669 \tabularnewline
91 & 0.0543 & -0.0729 & 0.0061 & 919515.9586 & 76626.3299 & 276.8146 \tabularnewline
92 & 0.0609 & -0.0377 & 0.0031 & 246177.9252 & 20514.8271 & 143.23 \tabularnewline
93 & 0.0669 & -0.0259 & 0.0022 & 115813.0446 & 9651.0871 & 98.2399 \tabularnewline
94 & 0.0724 & -0.0833 & 0.0069 & 1201485.9681 & 100123.8307 & 316.4235 \tabularnewline
95 & 0.0775 & -0.1392 & 0.0116 & 3350412.3125 & 279201.026 & 528.3948 \tabularnewline
96 & 0.0822 & -0.1233 & 0.0103 & 2631023.9918 & 219251.9993 & 468.2435 \tabularnewline
97 & 0.0867 & -0.155 & 0.0129 & 4156351.3222 & 346362.6102 & 588.5258 \tabularnewline
98 & 0.091 & -0.3019 & 0.0252 & 15769342.569 & 1314111.8807 & 1146.3472 \tabularnewline
99 & 0.0951 & -0.345 & 0.0288 & 20595650.9202 & 1716304.2433 & 1310.078 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33864&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]88[/C][C]0.0258[/C][C]0.0191[/C][C]0.0016[/C][C]63064.2248[/C][C]5255.3521[/C][C]72.4938[/C][/ROW]
[ROW][C]89[/C][C]0.0377[/C][C]-0.0467[/C][C]0.0039[/C][C]378062.5825[/C][C]31505.2152[/C][C]177.4971[/C][/ROW]
[ROW][C]90[/C][C]0.0468[/C][C]-0.0557[/C][C]0.0046[/C][C]537634.4297[/C][C]44802.8691[/C][C]211.6669[/C][/ROW]
[ROW][C]91[/C][C]0.0543[/C][C]-0.0729[/C][C]0.0061[/C][C]919515.9586[/C][C]76626.3299[/C][C]276.8146[/C][/ROW]
[ROW][C]92[/C][C]0.0609[/C][C]-0.0377[/C][C]0.0031[/C][C]246177.9252[/C][C]20514.8271[/C][C]143.23[/C][/ROW]
[ROW][C]93[/C][C]0.0669[/C][C]-0.0259[/C][C]0.0022[/C][C]115813.0446[/C][C]9651.0871[/C][C]98.2399[/C][/ROW]
[ROW][C]94[/C][C]0.0724[/C][C]-0.0833[/C][C]0.0069[/C][C]1201485.9681[/C][C]100123.8307[/C][C]316.4235[/C][/ROW]
[ROW][C]95[/C][C]0.0775[/C][C]-0.1392[/C][C]0.0116[/C][C]3350412.3125[/C][C]279201.026[/C][C]528.3948[/C][/ROW]
[ROW][C]96[/C][C]0.0822[/C][C]-0.1233[/C][C]0.0103[/C][C]2631023.9918[/C][C]219251.9993[/C][C]468.2435[/C][/ROW]
[ROW][C]97[/C][C]0.0867[/C][C]-0.155[/C][C]0.0129[/C][C]4156351.3222[/C][C]346362.6102[/C][C]588.5258[/C][/ROW]
[ROW][C]98[/C][C]0.091[/C][C]-0.3019[/C][C]0.0252[/C][C]15769342.569[/C][C]1314111.8807[/C][C]1146.3472[/C][/ROW]
[ROW][C]99[/C][C]0.0951[/C][C]-0.345[/C][C]0.0288[/C][C]20595650.9202[/C][C]1716304.2433[/C][C]1310.078[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33864&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33864&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
880.02580.01910.001663064.22485255.352172.4938
890.0377-0.04670.0039378062.582531505.2152177.4971
900.0468-0.05570.0046537634.429744802.8691211.6669
910.0543-0.07290.0061919515.958676626.3299276.8146
920.0609-0.03770.0031246177.925220514.8271143.23
930.0669-0.02590.0022115813.04469651.087198.2399
940.0724-0.08330.00691201485.9681100123.8307316.4235
950.0775-0.13920.01163350412.3125279201.026528.3948
960.0822-0.12330.01032631023.9918219251.9993468.2435
970.0867-0.1550.01294156351.3222346362.6102588.5258
980.091-0.30190.025215769342.5691314111.88071146.3472
990.0951-0.3450.028820595650.92021716304.24331310.078



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 1 ; par7 = 0 ; par8 = 0 ; par9 = 0 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 1 ; par7 = 0 ; par8 = 0 ; par9 = 0 ; par10 = FALSE ; par11 = ; par12 = ; par13 = ; par14 = ; par15 = ; par16 = ; par17 = ; par18 = ; par19 = ; par20 = ;
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')