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, 14 Dec 2008 15:31:41 -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/14/t1229293953ofwvqugdxxzvw3d.htm/, Retrieved Wed, 15 May 2024 07:29:14 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33580, Retrieved Wed, 15 May 2024 07:29:14 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact211
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] [14a75ec03b2c0d8ddd8b141a7b1594fd] [Current]
-                   [ARIMA Forecasting] [arima forecast do...] [2008-12-15 23:20:43] [73d6180dc45497329efd1b6934a84aba]
-   PD              [ARIMA Forecasting] [Arima forecasting...] [2008-12-19 23:09:36] [6816386b1f3c2f6c0c9f2aa1e5bc9362]
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 time2 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 & 2 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33580&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33580&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33580&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'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[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.844312489.465413822.22330.23010.44770.9890.4477
8912538.1213152.988212180.037414125.93910.10770.30450.90140.4618
9012419.5713152.805911947.374714358.23710.11660.84120.80170.469
9112193.8813152.794211752.886314552.70210.08970.84770.89220.4733
9212656.6313152.793511582.304514723.28250.26790.88430.69030.4762
9312812.4813152.793411428.516714877.07020.34940.71360.3860.4783
9412056.6713152.793411287.364515018.22230.12470.63970.36540.48
9511322.3813152.793411156.166415149.42050.03620.8590.30470.4813
9611530.7513152.793411033.073115272.51380.06680.95470.4680.4824
9711114.0813152.793410916.745815388.84110.0370.92250.36130.4833
989181.7313152.793410806.178115499.40885e-040.95570.26590.4841
998614.5513152.793410700.590715604.99621e-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.8443 & 12489.4654 & 13822.2233 & 0.2301 & 0.4477 & 0.989 & 0.4477 \tabularnewline
89 & 12538.12 & 13152.9882 & 12180.0374 & 14125.9391 & 0.1077 & 0.3045 & 0.9014 & 0.4618 \tabularnewline
90 & 12419.57 & 13152.8059 & 11947.3747 & 14358.2371 & 0.1166 & 0.8412 & 0.8017 & 0.469 \tabularnewline
91 & 12193.88 & 13152.7942 & 11752.8863 & 14552.7021 & 0.0897 & 0.8477 & 0.8922 & 0.4733 \tabularnewline
92 & 12656.63 & 13152.7935 & 11582.3045 & 14723.2825 & 0.2679 & 0.8843 & 0.6903 & 0.4762 \tabularnewline
93 & 12812.48 & 13152.7934 & 11428.5167 & 14877.0702 & 0.3494 & 0.7136 & 0.386 & 0.4783 \tabularnewline
94 & 12056.67 & 13152.7934 & 11287.3645 & 15018.2223 & 0.1247 & 0.6397 & 0.3654 & 0.48 \tabularnewline
95 & 11322.38 & 13152.7934 & 11156.1664 & 15149.4205 & 0.0362 & 0.859 & 0.3047 & 0.4813 \tabularnewline
96 & 11530.75 & 13152.7934 & 11033.0731 & 15272.5138 & 0.0668 & 0.9547 & 0.468 & 0.4824 \tabularnewline
97 & 11114.08 & 13152.7934 & 10916.7458 & 15388.8411 & 0.037 & 0.9225 & 0.3613 & 0.4833 \tabularnewline
98 & 9181.73 & 13152.7934 & 10806.1781 & 15499.4088 & 5e-04 & 0.9557 & 0.2659 & 0.4841 \tabularnewline
99 & 8614.55 & 13152.7934 & 10700.5907 & 15604.9962 & 1e-04 & 0.9992 & 0.4848 & 0.4848 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33580&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.8443[/C][C]12489.4654[/C][C]13822.2233[/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.9882[/C][C]12180.0374[/C][C]14125.9391[/C][C]0.1077[/C][C]0.3045[/C][C]0.9014[/C][C]0.4618[/C][/ROW]
[ROW][C]90[/C][C]12419.57[/C][C]13152.8059[/C][C]11947.3747[/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.7942[/C][C]11752.8863[/C][C]14552.7021[/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.7935[/C][C]11582.3045[/C][C]14723.2825[/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.7934[/C][C]11428.5167[/C][C]14877.0702[/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.7934[/C][C]11287.3645[/C][C]15018.2223[/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.7934[/C][C]11156.1664[/C][C]15149.4205[/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.7934[/C][C]11033.0731[/C][C]15272.5138[/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.7934[/C][C]10916.7458[/C][C]15388.8411[/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.7934[/C][C]10806.1781[/C][C]15499.4088[/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.7934[/C][C]10700.5907[/C][C]15604.9962[/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=33580&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33580&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.844312489.465413822.22330.23010.44770.9890.4477
8912538.1213152.988212180.037414125.93910.10770.30450.90140.4618
9012419.5713152.805911947.374714358.23710.11660.84120.80170.469
9112193.8813152.794211752.886314552.70210.08970.84770.89220.4733
9212656.6313152.793511582.304514723.28250.26790.88430.69030.4762
9312812.4813152.793411428.516714877.07020.34940.71360.3860.4783
9412056.6713152.793411287.364515018.22230.12470.63970.36540.48
9511322.3813152.793411156.166415149.42050.03620.8590.30470.4813
9611530.7513152.793411033.073115272.51380.06680.95470.4680.4824
9711114.0813152.793410916.745815388.84110.0370.92250.36130.4833
989181.7313152.793410806.178115499.40885e-040.95570.26590.4841
998614.5513152.793410700.590715604.99621e-040.99920.48480.4848







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
880.02580.01910.001663064.10055255.341772.4937
890.0377-0.04670.0039378062.925531505.2438177.4972
900.0468-0.05570.0046537634.843244802.9036211.667
910.0543-0.07290.0061919516.576626.375276.8147
920.0609-0.03770.0031246178.205320514.8504143.2301
930.0669-0.02590.0022115813.23689651.103198.24
940.0724-0.08330.00691201486.5869100123.8822316.4236
950.0775-0.13920.01163350413.3459279201.1122528.3948
960.0822-0.12330.01032631024.9075219252.0756468.2436
970.0867-0.1550.01294156352.4732346362.7061588.5259
980.091-0.30190.025215769344.81091314112.06761146.3473
990.0951-0.3450.028820595653.48231716304.45691310.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.1005 & 5255.3417 & 72.4937 \tabularnewline
89 & 0.0377 & -0.0467 & 0.0039 & 378062.9255 & 31505.2438 & 177.4972 \tabularnewline
90 & 0.0468 & -0.0557 & 0.0046 & 537634.8432 & 44802.9036 & 211.667 \tabularnewline
91 & 0.0543 & -0.0729 & 0.0061 & 919516.5 & 76626.375 & 276.8147 \tabularnewline
92 & 0.0609 & -0.0377 & 0.0031 & 246178.2053 & 20514.8504 & 143.2301 \tabularnewline
93 & 0.0669 & -0.0259 & 0.0022 & 115813.2368 & 9651.1031 & 98.24 \tabularnewline
94 & 0.0724 & -0.0833 & 0.0069 & 1201486.5869 & 100123.8822 & 316.4236 \tabularnewline
95 & 0.0775 & -0.1392 & 0.0116 & 3350413.3459 & 279201.1122 & 528.3948 \tabularnewline
96 & 0.0822 & -0.1233 & 0.0103 & 2631024.9075 & 219252.0756 & 468.2436 \tabularnewline
97 & 0.0867 & -0.155 & 0.0129 & 4156352.4732 & 346362.7061 & 588.5259 \tabularnewline
98 & 0.091 & -0.3019 & 0.0252 & 15769344.8109 & 1314112.0676 & 1146.3473 \tabularnewline
99 & 0.0951 & -0.345 & 0.0288 & 20595653.4823 & 1716304.4569 & 1310.078 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33580&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.1005[/C][C]5255.3417[/C][C]72.4937[/C][/ROW]
[ROW][C]89[/C][C]0.0377[/C][C]-0.0467[/C][C]0.0039[/C][C]378062.9255[/C][C]31505.2438[/C][C]177.4972[/C][/ROW]
[ROW][C]90[/C][C]0.0468[/C][C]-0.0557[/C][C]0.0046[/C][C]537634.8432[/C][C]44802.9036[/C][C]211.667[/C][/ROW]
[ROW][C]91[/C][C]0.0543[/C][C]-0.0729[/C][C]0.0061[/C][C]919516.5[/C][C]76626.375[/C][C]276.8147[/C][/ROW]
[ROW][C]92[/C][C]0.0609[/C][C]-0.0377[/C][C]0.0031[/C][C]246178.2053[/C][C]20514.8504[/C][C]143.2301[/C][/ROW]
[ROW][C]93[/C][C]0.0669[/C][C]-0.0259[/C][C]0.0022[/C][C]115813.2368[/C][C]9651.1031[/C][C]98.24[/C][/ROW]
[ROW][C]94[/C][C]0.0724[/C][C]-0.0833[/C][C]0.0069[/C][C]1201486.5869[/C][C]100123.8822[/C][C]316.4236[/C][/ROW]
[ROW][C]95[/C][C]0.0775[/C][C]-0.1392[/C][C]0.0116[/C][C]3350413.3459[/C][C]279201.1122[/C][C]528.3948[/C][/ROW]
[ROW][C]96[/C][C]0.0822[/C][C]-0.1233[/C][C]0.0103[/C][C]2631024.9075[/C][C]219252.0756[/C][C]468.2436[/C][/ROW]
[ROW][C]97[/C][C]0.0867[/C][C]-0.155[/C][C]0.0129[/C][C]4156352.4732[/C][C]346362.7061[/C][C]588.5259[/C][/ROW]
[ROW][C]98[/C][C]0.091[/C][C]-0.3019[/C][C]0.0252[/C][C]15769344.8109[/C][C]1314112.0676[/C][C]1146.3473[/C][/ROW]
[ROW][C]99[/C][C]0.0951[/C][C]-0.345[/C][C]0.0288[/C][C]20595653.4823[/C][C]1716304.4569[/C][C]1310.078[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33580&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33580&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.10055255.341772.4937
890.0377-0.04670.0039378062.925531505.2438177.4972
900.0468-0.05570.0046537634.843244802.9036211.667
910.0543-0.07290.0061919516.576626.375276.8147
920.0609-0.03770.0031246178.205320514.8504143.2301
930.0669-0.02590.0022115813.23689651.103198.24
940.0724-0.08330.00691201486.5869100123.8822316.4236
950.0775-0.13920.01163350413.3459279201.1122528.3948
960.0822-0.12330.01032631024.9075219252.0756468.2436
970.0867-0.1550.01294156352.4732346362.7061588.5259
980.091-0.30190.025215769344.81091314112.06761146.3473
990.0951-0.3450.028820595653.48231716304.45691310.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 ;
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')