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 computationFri, 19 Dec 2008 14:26:09 -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/19/t12297220164iasquaomc4zv6p.htm/, Retrieved Tue, 14 May 2024 05:47:21 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=35265, Retrieved Tue, 14 May 2024 05:47:21 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact271
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 12:54:43] [73d6180dc45497329efd1b6934a84aba]
- RMP   [ARIMA Backward Selection] [ARIMA goudprijs] [2008-12-14 20:12:57] [73d6180dc45497329efd1b6934a84aba]
- RMPD    [ARIMA Forecasting] [ARIMA forecast: O...] [2008-12-14 22:42:36] [73d6180dc45497329efd1b6934a84aba]
-   PD      [ARIMA Forecasting] [arima forecast ol...] [2008-12-16 16:27:50] [73d6180dc45497329efd1b6934a84aba]
-   P           [ARIMA Forecasting] [Lambda -0,2 ARIMA...] [2008-12-19 21:26:09] [e81ac192d6ae6d77191d83851a692999] [Current]
- R  D            [ARIMA Forecasting] [ARIMA Forecast olie] [2008-12-22 13:09:43] [7458e879e85b911182071700fff19fbd]
- RMPD              [ARIMA Forecasting] [] [2009-12-30 22:22:39] [74be16979710d4c4e7c6647856088456]
-   PD                [ARIMA Forecasting] [] [2009-12-31 10:35:36] [74be16979710d4c4e7c6647856088456]
-   PD                [ARIMA Forecasting] [] [2009-12-31 10:39:14] [74be16979710d4c4e7c6647856088456]
- R PD            [ARIMA Forecasting] [Forecast BEL20] [2008-12-22 14:06:40] [7458e879e85b911182071700fff19fbd]
- RMPD              [ARIMA Forecasting] [] [2009-12-30 23:10:28] [74be16979710d4c4e7c6647856088456]
- RMPD              [ARIMA Forecasting] [] [2009-12-30 23:10:28] [74be16979710d4c4e7c6647856088456]
Feedback Forum

Post a new message
Dataseries X:
32.68
31.54
32.43
26.54
25.85
27.6
25.71
25.38
28.57
27.64
25.36
25.9
26.29
21.74
19.2
19.32
19.82
20.36
24.31
25.97
25.61
24.67
25.59
26.09
28.37
27.34
24.46
27.46
30.23
32.33
29.87
24.87
25.48
27.28
28.24
29.58
26.95
29.08
28.76
29.59
30.7
30.52
32.67
33.19
37.13
35.54
37.75
41.84
42.94
49.14
44.61
40.22
44.23
45.85
53.38
53.26
51.8
55.3
57.81
63.96
63.77
59.15
56.12
57.42
63.52
61.71
63.01
68.18
72.03
69.75
74.41
74.33
64.24
60.03
59.44
62.5
55.04
58.34
61.92
67.65
67.68
70.3
75.26
71.44
76.36
81.71
92.6
90.6
92.23
94.09
102.79
109.65
124.05
132.69
135.81
116.07
101.42
75.73
55.48




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35265&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[87])
7559.44-------
7662.5-------
7755.04-------
7858.34-------
7961.92-------
8067.65-------
8167.68-------
8270.3-------
8375.26-------
8471.44-------
8576.36-------
8681.71-------
8792.6-------
8890.693.868778.6331112.78770.36740.55230.99940.5523
8992.2392.632870.6735123.30980.48970.55170.99180.5008
9094.0993.492967.6684132.09310.48790.52560.96290.5181
91102.7992.901263.772139.54520.33890.48010.90350.505
92109.6593.306761.4893147.06810.27560.36480.82520.5103
93124.0593.028358.9211153.78480.15850.29590.79320.5055
94132.6993.219257.051160.69090.12580.18520.74720.5072
95135.8193.088155.13167.13070.1290.14720.68150.5052
96116.0793.17853.5556173.70710.28870.14970.70160.5056
97101.4293.116452.0122180.0270.42570.30240.64720.5046
9875.7393.158750.6619186.4330.35710.43110.59510.5047
9955.4893.129649.3662192.70730.22930.6340.50420.5042

\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 & 59.44 & - & - & - & - & - & - & - \tabularnewline
76 & 62.5 & - & - & - & - & - & - & - \tabularnewline
77 & 55.04 & - & - & - & - & - & - & - \tabularnewline
78 & 58.34 & - & - & - & - & - & - & - \tabularnewline
79 & 61.92 & - & - & - & - & - & - & - \tabularnewline
80 & 67.65 & - & - & - & - & - & - & - \tabularnewline
81 & 67.68 & - & - & - & - & - & - & - \tabularnewline
82 & 70.3 & - & - & - & - & - & - & - \tabularnewline
83 & 75.26 & - & - & - & - & - & - & - \tabularnewline
84 & 71.44 & - & - & - & - & - & - & - \tabularnewline
85 & 76.36 & - & - & - & - & - & - & - \tabularnewline
86 & 81.71 & - & - & - & - & - & - & - \tabularnewline
87 & 92.6 & - & - & - & - & - & - & - \tabularnewline
88 & 90.6 & 93.8687 & 78.6331 & 112.7877 & 0.3674 & 0.5523 & 0.9994 & 0.5523 \tabularnewline
89 & 92.23 & 92.6328 & 70.6735 & 123.3098 & 0.4897 & 0.5517 & 0.9918 & 0.5008 \tabularnewline
90 & 94.09 & 93.4929 & 67.6684 & 132.0931 & 0.4879 & 0.5256 & 0.9629 & 0.5181 \tabularnewline
91 & 102.79 & 92.9012 & 63.772 & 139.5452 & 0.3389 & 0.4801 & 0.9035 & 0.505 \tabularnewline
92 & 109.65 & 93.3067 & 61.4893 & 147.0681 & 0.2756 & 0.3648 & 0.8252 & 0.5103 \tabularnewline
93 & 124.05 & 93.0283 & 58.9211 & 153.7848 & 0.1585 & 0.2959 & 0.7932 & 0.5055 \tabularnewline
94 & 132.69 & 93.2192 & 57.051 & 160.6909 & 0.1258 & 0.1852 & 0.7472 & 0.5072 \tabularnewline
95 & 135.81 & 93.0881 & 55.13 & 167.1307 & 0.129 & 0.1472 & 0.6815 & 0.5052 \tabularnewline
96 & 116.07 & 93.178 & 53.5556 & 173.7071 & 0.2887 & 0.1497 & 0.7016 & 0.5056 \tabularnewline
97 & 101.42 & 93.1164 & 52.0122 & 180.027 & 0.4257 & 0.3024 & 0.6472 & 0.5046 \tabularnewline
98 & 75.73 & 93.1587 & 50.6619 & 186.433 & 0.3571 & 0.4311 & 0.5951 & 0.5047 \tabularnewline
99 & 55.48 & 93.1296 & 49.3662 & 192.7073 & 0.2293 & 0.634 & 0.5042 & 0.5042 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35265&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]59.44[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]62.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]55.04[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]58.34[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]61.92[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]67.65[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]67.68[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]70.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]75.26[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]71.44[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]76.36[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]81.71[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]92.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]90.6[/C][C]93.8687[/C][C]78.6331[/C][C]112.7877[/C][C]0.3674[/C][C]0.5523[/C][C]0.9994[/C][C]0.5523[/C][/ROW]
[ROW][C]89[/C][C]92.23[/C][C]92.6328[/C][C]70.6735[/C][C]123.3098[/C][C]0.4897[/C][C]0.5517[/C][C]0.9918[/C][C]0.5008[/C][/ROW]
[ROW][C]90[/C][C]94.09[/C][C]93.4929[/C][C]67.6684[/C][C]132.0931[/C][C]0.4879[/C][C]0.5256[/C][C]0.9629[/C][C]0.5181[/C][/ROW]
[ROW][C]91[/C][C]102.79[/C][C]92.9012[/C][C]63.772[/C][C]139.5452[/C][C]0.3389[/C][C]0.4801[/C][C]0.9035[/C][C]0.505[/C][/ROW]
[ROW][C]92[/C][C]109.65[/C][C]93.3067[/C][C]61.4893[/C][C]147.0681[/C][C]0.2756[/C][C]0.3648[/C][C]0.8252[/C][C]0.5103[/C][/ROW]
[ROW][C]93[/C][C]124.05[/C][C]93.0283[/C][C]58.9211[/C][C]153.7848[/C][C]0.1585[/C][C]0.2959[/C][C]0.7932[/C][C]0.5055[/C][/ROW]
[ROW][C]94[/C][C]132.69[/C][C]93.2192[/C][C]57.051[/C][C]160.6909[/C][C]0.1258[/C][C]0.1852[/C][C]0.7472[/C][C]0.5072[/C][/ROW]
[ROW][C]95[/C][C]135.81[/C][C]93.0881[/C][C]55.13[/C][C]167.1307[/C][C]0.129[/C][C]0.1472[/C][C]0.6815[/C][C]0.5052[/C][/ROW]
[ROW][C]96[/C][C]116.07[/C][C]93.178[/C][C]53.5556[/C][C]173.7071[/C][C]0.2887[/C][C]0.1497[/C][C]0.7016[/C][C]0.5056[/C][/ROW]
[ROW][C]97[/C][C]101.42[/C][C]93.1164[/C][C]52.0122[/C][C]180.027[/C][C]0.4257[/C][C]0.3024[/C][C]0.6472[/C][C]0.5046[/C][/ROW]
[ROW][C]98[/C][C]75.73[/C][C]93.1587[/C][C]50.6619[/C][C]186.433[/C][C]0.3571[/C][C]0.4311[/C][C]0.5951[/C][C]0.5047[/C][/ROW]
[ROW][C]99[/C][C]55.48[/C][C]93.1296[/C][C]49.3662[/C][C]192.7073[/C][C]0.2293[/C][C]0.634[/C][C]0.5042[/C][C]0.5042[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35265&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35265&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])
7559.44-------
7662.5-------
7755.04-------
7858.34-------
7961.92-------
8067.65-------
8167.68-------
8270.3-------
8375.26-------
8471.44-------
8576.36-------
8681.71-------
8792.6-------
8890.693.868778.6331112.78770.36740.55230.99940.5523
8992.2392.632870.6735123.30980.48970.55170.99180.5008
9094.0993.492967.6684132.09310.48790.52560.96290.5181
91102.7992.901263.772139.54520.33890.48010.90350.505
92109.6593.306761.4893147.06810.27560.36480.82520.5103
93124.0593.028358.9211153.78480.15850.29590.79320.5055
94132.6993.219257.051160.69090.12580.18520.74720.5072
95135.8193.088155.13167.13070.1290.14720.68150.5052
96116.0793.17853.5556173.70710.28870.14970.70160.5056
97101.4293.116452.0122180.0270.42570.30240.64720.5046
9875.7393.158750.6619186.4330.35710.43110.59510.5047
9955.4893.129649.3662192.70730.22930.6340.50420.5042







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
880.1028-0.03480.002910.68460.89040.9436
890.169-0.00434e-040.16220.01350.1163
900.21060.00645e-040.35650.02970.1724
910.25620.10640.008997.78858.1492.8547
920.2940.17520.0146267.102522.25854.7179
930.33320.33350.0278962.348580.19578.9552
940.36930.42340.03531557.943129.828611.3942
950.40580.45890.03821825.1569152.096412.3327
960.44090.24570.0205524.041443.67016.6083
970.47620.08920.007468.95065.74592.3971
980.5108-0.18710.0156303.758825.31325.0312
990.5455-0.40430.03371417.4951118.124610.8685

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
88 & 0.1028 & -0.0348 & 0.0029 & 10.6846 & 0.8904 & 0.9436 \tabularnewline
89 & 0.169 & -0.0043 & 4e-04 & 0.1622 & 0.0135 & 0.1163 \tabularnewline
90 & 0.2106 & 0.0064 & 5e-04 & 0.3565 & 0.0297 & 0.1724 \tabularnewline
91 & 0.2562 & 0.1064 & 0.0089 & 97.7885 & 8.149 & 2.8547 \tabularnewline
92 & 0.294 & 0.1752 & 0.0146 & 267.1025 & 22.2585 & 4.7179 \tabularnewline
93 & 0.3332 & 0.3335 & 0.0278 & 962.3485 & 80.1957 & 8.9552 \tabularnewline
94 & 0.3693 & 0.4234 & 0.0353 & 1557.943 & 129.8286 & 11.3942 \tabularnewline
95 & 0.4058 & 0.4589 & 0.0382 & 1825.1569 & 152.0964 & 12.3327 \tabularnewline
96 & 0.4409 & 0.2457 & 0.0205 & 524.0414 & 43.6701 & 6.6083 \tabularnewline
97 & 0.4762 & 0.0892 & 0.0074 & 68.9506 & 5.7459 & 2.3971 \tabularnewline
98 & 0.5108 & -0.1871 & 0.0156 & 303.7588 & 25.3132 & 5.0312 \tabularnewline
99 & 0.5455 & -0.4043 & 0.0337 & 1417.4951 & 118.1246 & 10.8685 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35265&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.1028[/C][C]-0.0348[/C][C]0.0029[/C][C]10.6846[/C][C]0.8904[/C][C]0.9436[/C][/ROW]
[ROW][C]89[/C][C]0.169[/C][C]-0.0043[/C][C]4e-04[/C][C]0.1622[/C][C]0.0135[/C][C]0.1163[/C][/ROW]
[ROW][C]90[/C][C]0.2106[/C][C]0.0064[/C][C]5e-04[/C][C]0.3565[/C][C]0.0297[/C][C]0.1724[/C][/ROW]
[ROW][C]91[/C][C]0.2562[/C][C]0.1064[/C][C]0.0089[/C][C]97.7885[/C][C]8.149[/C][C]2.8547[/C][/ROW]
[ROW][C]92[/C][C]0.294[/C][C]0.1752[/C][C]0.0146[/C][C]267.1025[/C][C]22.2585[/C][C]4.7179[/C][/ROW]
[ROW][C]93[/C][C]0.3332[/C][C]0.3335[/C][C]0.0278[/C][C]962.3485[/C][C]80.1957[/C][C]8.9552[/C][/ROW]
[ROW][C]94[/C][C]0.3693[/C][C]0.4234[/C][C]0.0353[/C][C]1557.943[/C][C]129.8286[/C][C]11.3942[/C][/ROW]
[ROW][C]95[/C][C]0.4058[/C][C]0.4589[/C][C]0.0382[/C][C]1825.1569[/C][C]152.0964[/C][C]12.3327[/C][/ROW]
[ROW][C]96[/C][C]0.4409[/C][C]0.2457[/C][C]0.0205[/C][C]524.0414[/C][C]43.6701[/C][C]6.6083[/C][/ROW]
[ROW][C]97[/C][C]0.4762[/C][C]0.0892[/C][C]0.0074[/C][C]68.9506[/C][C]5.7459[/C][C]2.3971[/C][/ROW]
[ROW][C]98[/C][C]0.5108[/C][C]-0.1871[/C][C]0.0156[/C][C]303.7588[/C][C]25.3132[/C][C]5.0312[/C][/ROW]
[ROW][C]99[/C][C]0.5455[/C][C]-0.4043[/C][C]0.0337[/C][C]1417.4951[/C][C]118.1246[/C][C]10.8685[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35265&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35265&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.1028-0.03480.002910.68460.89040.9436
890.169-0.00434e-040.16220.01350.1163
900.21060.00645e-040.35650.02970.1724
910.25620.10640.008997.78858.1492.8547
920.2940.17520.0146267.102522.25854.7179
930.33320.33350.0278962.348580.19578.9552
940.36930.42340.03531557.943129.828611.3942
950.40580.45890.03821825.1569152.096412.3327
960.44090.24570.0205524.041443.67016.6083
970.47620.08920.007468.95065.74592.3971
980.5108-0.18710.0156303.758825.31325.0312
990.5455-0.40430.03371417.4951118.124610.8685



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