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 computationThu, 10 Dec 2009 11:43:40 -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/10/t1260470990t57pusyhtctrpf5.htm/, Retrieved Fri, 19 Apr 2024 06:45:29 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=65718, Retrieved Fri, 19 Apr 2024 06:45:29 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact160
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2009-12-06 10:44:58] [1e83ffa964db6f7ea6ccc4e7b5acbbff]
-   PD    [ARIMA Forecasting] [arima forecast icp] [2009-12-10 18:43:40] [4f297b039e1043ebee7ff7a83b1eaaaa] [Current]
Feedback Forum

Post a new message
Dataseries X:
100.00
102.04
102.51
102.71
103.00
103.39
102.32
103.88
104.65
104.46
104.65
104.36
102.71
104.55
104.76
105.72
106.20
106.50
105.14
106.50
106.69
106.50
106.50
106.39
105.43
107.18
107.37
107.46
107.66
107.37
106.30
107.85
107.95
107.85
107.66
107.76
106.69
108.92
109.22
109.02
108.62
109.02
107.76
109.60
109.80
109.41
109.60
109.60
108.15
110.18
110.27
110.87
111.25
111.15
109.99
111.83
111.73
112.31
112.12
111.73
110.27
112.71
113.38
113.57
113.77
114.15
112.99
115.03
115.03
114.84
114.75
114.84
113.32
115.92
115.84
116.49
116.90
116.99
115.74
117.73
117.17
116.83
117.08
117.23
115.25
117.98
117.97
118.56
118.42
118.51
117.25
119.08
118.85
119.41
120.43
120.87
119.31
122.24
123.14
123.39
124.46
125.33
124.17
125.48
125.35
125.15
124.31
124.14
121.81
124.62
123.93
124.29
124.16
124.02
122.00
124.58
124.06




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=65718&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[105])
93118.85-------
94119.41-------
95120.43-------
96120.87-------
97119.31-------
98122.24-------
99123.14-------
100123.39-------
101124.46-------
102125.33-------
103124.17-------
104125.48-------
105125.35-------
106125.15125.9866124.8931127.10340.0710.868110.8681
107124.31127.1476125.5738128.76963e-040.992110.9851
108124.14127.649125.7099129.66153e-040.999410.9874
109121.81125.8729123.713128.12562e-040.934210.6754
110124.62129.2124126.6493131.90364e-04110.9975
111123.93130.2413127.3869133.254100.999910.9993
112124.29130.5274127.4348133.80641e-04110.999
113124.16131.753128.3799135.3470110.9998
114124.02132.7511129.116136.642010.99990.9999
115122131.4206127.6852135.429500.99990.99980.9985
116124.58132.9233128.9062137.25471e-0410.99960.9997
117124.06132.7741128.596137.29341e-040.99980.99940.9994

\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[105]) \tabularnewline
93 & 118.85 & - & - & - & - & - & - & - \tabularnewline
94 & 119.41 & - & - & - & - & - & - & - \tabularnewline
95 & 120.43 & - & - & - & - & - & - & - \tabularnewline
96 & 120.87 & - & - & - & - & - & - & - \tabularnewline
97 & 119.31 & - & - & - & - & - & - & - \tabularnewline
98 & 122.24 & - & - & - & - & - & - & - \tabularnewline
99 & 123.14 & - & - & - & - & - & - & - \tabularnewline
100 & 123.39 & - & - & - & - & - & - & - \tabularnewline
101 & 124.46 & - & - & - & - & - & - & - \tabularnewline
102 & 125.33 & - & - & - & - & - & - & - \tabularnewline
103 & 124.17 & - & - & - & - & - & - & - \tabularnewline
104 & 125.48 & - & - & - & - & - & - & - \tabularnewline
105 & 125.35 & - & - & - & - & - & - & - \tabularnewline
106 & 125.15 & 125.9866 & 124.8931 & 127.1034 & 0.071 & 0.8681 & 1 & 0.8681 \tabularnewline
107 & 124.31 & 127.1476 & 125.5738 & 128.7696 & 3e-04 & 0.9921 & 1 & 0.9851 \tabularnewline
108 & 124.14 & 127.649 & 125.7099 & 129.6615 & 3e-04 & 0.9994 & 1 & 0.9874 \tabularnewline
109 & 121.81 & 125.8729 & 123.713 & 128.1256 & 2e-04 & 0.9342 & 1 & 0.6754 \tabularnewline
110 & 124.62 & 129.2124 & 126.6493 & 131.9036 & 4e-04 & 1 & 1 & 0.9975 \tabularnewline
111 & 123.93 & 130.2413 & 127.3869 & 133.2541 & 0 & 0.9999 & 1 & 0.9993 \tabularnewline
112 & 124.29 & 130.5274 & 127.4348 & 133.8064 & 1e-04 & 1 & 1 & 0.999 \tabularnewline
113 & 124.16 & 131.753 & 128.3799 & 135.347 & 0 & 1 & 1 & 0.9998 \tabularnewline
114 & 124.02 & 132.7511 & 129.116 & 136.642 & 0 & 1 & 0.9999 & 0.9999 \tabularnewline
115 & 122 & 131.4206 & 127.6852 & 135.4295 & 0 & 0.9999 & 0.9998 & 0.9985 \tabularnewline
116 & 124.58 & 132.9233 & 128.9062 & 137.2547 & 1e-04 & 1 & 0.9996 & 0.9997 \tabularnewline
117 & 124.06 & 132.7741 & 128.596 & 137.2934 & 1e-04 & 0.9998 & 0.9994 & 0.9994 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=65718&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[105])[/C][/ROW]
[ROW][C]93[/C][C]118.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]119.41[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]120.43[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]120.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]119.31[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]98[/C][C]122.24[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]99[/C][C]123.14[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]100[/C][C]123.39[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]101[/C][C]124.46[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]102[/C][C]125.33[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]103[/C][C]124.17[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]104[/C][C]125.48[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]105[/C][C]125.35[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]106[/C][C]125.15[/C][C]125.9866[/C][C]124.8931[/C][C]127.1034[/C][C]0.071[/C][C]0.8681[/C][C]1[/C][C]0.8681[/C][/ROW]
[ROW][C]107[/C][C]124.31[/C][C]127.1476[/C][C]125.5738[/C][C]128.7696[/C][C]3e-04[/C][C]0.9921[/C][C]1[/C][C]0.9851[/C][/ROW]
[ROW][C]108[/C][C]124.14[/C][C]127.649[/C][C]125.7099[/C][C]129.6615[/C][C]3e-04[/C][C]0.9994[/C][C]1[/C][C]0.9874[/C][/ROW]
[ROW][C]109[/C][C]121.81[/C][C]125.8729[/C][C]123.713[/C][C]128.1256[/C][C]2e-04[/C][C]0.9342[/C][C]1[/C][C]0.6754[/C][/ROW]
[ROW][C]110[/C][C]124.62[/C][C]129.2124[/C][C]126.6493[/C][C]131.9036[/C][C]4e-04[/C][C]1[/C][C]1[/C][C]0.9975[/C][/ROW]
[ROW][C]111[/C][C]123.93[/C][C]130.2413[/C][C]127.3869[/C][C]133.2541[/C][C]0[/C][C]0.9999[/C][C]1[/C][C]0.9993[/C][/ROW]
[ROW][C]112[/C][C]124.29[/C][C]130.5274[/C][C]127.4348[/C][C]133.8064[/C][C]1e-04[/C][C]1[/C][C]1[/C][C]0.999[/C][/ROW]
[ROW][C]113[/C][C]124.16[/C][C]131.753[/C][C]128.3799[/C][C]135.347[/C][C]0[/C][C]1[/C][C]1[/C][C]0.9998[/C][/ROW]
[ROW][C]114[/C][C]124.02[/C][C]132.7511[/C][C]129.116[/C][C]136.642[/C][C]0[/C][C]1[/C][C]0.9999[/C][C]0.9999[/C][/ROW]
[ROW][C]115[/C][C]122[/C][C]131.4206[/C][C]127.6852[/C][C]135.4295[/C][C]0[/C][C]0.9999[/C][C]0.9998[/C][C]0.9985[/C][/ROW]
[ROW][C]116[/C][C]124.58[/C][C]132.9233[/C][C]128.9062[/C][C]137.2547[/C][C]1e-04[/C][C]1[/C][C]0.9996[/C][C]0.9997[/C][/ROW]
[ROW][C]117[/C][C]124.06[/C][C]132.7741[/C][C]128.596[/C][C]137.2934[/C][C]1e-04[/C][C]0.9998[/C][C]0.9994[/C][C]0.9994[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=65718&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=65718&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[105])
93118.85-------
94119.41-------
95120.43-------
96120.87-------
97119.31-------
98122.24-------
99123.14-------
100123.39-------
101124.46-------
102125.33-------
103124.17-------
104125.48-------
105125.35-------
106125.15125.9866124.8931127.10340.0710.868110.8681
107124.31127.1476125.5738128.76963e-040.992110.9851
108124.14127.649125.7099129.66153e-040.999410.9874
109121.81125.8729123.713128.12562e-040.934210.6754
110124.62129.2124126.6493131.90364e-04110.9975
111123.93130.2413127.3869133.254100.999910.9993
112124.29130.5274127.4348133.80641e-04110.999
113124.16131.753128.3799135.3470110.9998
114124.02132.7511129.116136.642010.99990.9999
115122131.4206127.6852135.429500.99990.99980.9985
116124.58132.9233128.9062137.25471e-0410.99960.9997
117124.06132.7741128.596137.29341e-040.99980.99940.9994







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1060.0045-0.00666e-040.69990.05830.2415
1070.0065-0.02230.00198.0520.6710.8191
1080.008-0.02750.002312.31311.02611.013
1090.0091-0.03230.002716.50711.37561.1729
1100.0106-0.03550.00321.09011.75751.3257
1110.0118-0.04850.00439.83243.31941.8219
1120.0128-0.04780.00438.90463.2421.8006
1130.0139-0.05760.004857.65374.80452.1919
1140.015-0.06580.005576.23226.35272.5205
1150.0156-0.07170.00688.74797.39572.7195
1160.0166-0.06280.005269.61125.80092.4085
1170.0174-0.06560.005575.9356.32792.5155

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
106 & 0.0045 & -0.0066 & 6e-04 & 0.6999 & 0.0583 & 0.2415 \tabularnewline
107 & 0.0065 & -0.0223 & 0.0019 & 8.052 & 0.671 & 0.8191 \tabularnewline
108 & 0.008 & -0.0275 & 0.0023 & 12.3131 & 1.0261 & 1.013 \tabularnewline
109 & 0.0091 & -0.0323 & 0.0027 & 16.5071 & 1.3756 & 1.1729 \tabularnewline
110 & 0.0106 & -0.0355 & 0.003 & 21.0901 & 1.7575 & 1.3257 \tabularnewline
111 & 0.0118 & -0.0485 & 0.004 & 39.8324 & 3.3194 & 1.8219 \tabularnewline
112 & 0.0128 & -0.0478 & 0.004 & 38.9046 & 3.242 & 1.8006 \tabularnewline
113 & 0.0139 & -0.0576 & 0.0048 & 57.6537 & 4.8045 & 2.1919 \tabularnewline
114 & 0.015 & -0.0658 & 0.0055 & 76.2322 & 6.3527 & 2.5205 \tabularnewline
115 & 0.0156 & -0.0717 & 0.006 & 88.7479 & 7.3957 & 2.7195 \tabularnewline
116 & 0.0166 & -0.0628 & 0.0052 & 69.6112 & 5.8009 & 2.4085 \tabularnewline
117 & 0.0174 & -0.0656 & 0.0055 & 75.935 & 6.3279 & 2.5155 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=65718&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]106[/C][C]0.0045[/C][C]-0.0066[/C][C]6e-04[/C][C]0.6999[/C][C]0.0583[/C][C]0.2415[/C][/ROW]
[ROW][C]107[/C][C]0.0065[/C][C]-0.0223[/C][C]0.0019[/C][C]8.052[/C][C]0.671[/C][C]0.8191[/C][/ROW]
[ROW][C]108[/C][C]0.008[/C][C]-0.0275[/C][C]0.0023[/C][C]12.3131[/C][C]1.0261[/C][C]1.013[/C][/ROW]
[ROW][C]109[/C][C]0.0091[/C][C]-0.0323[/C][C]0.0027[/C][C]16.5071[/C][C]1.3756[/C][C]1.1729[/C][/ROW]
[ROW][C]110[/C][C]0.0106[/C][C]-0.0355[/C][C]0.003[/C][C]21.0901[/C][C]1.7575[/C][C]1.3257[/C][/ROW]
[ROW][C]111[/C][C]0.0118[/C][C]-0.0485[/C][C]0.004[/C][C]39.8324[/C][C]3.3194[/C][C]1.8219[/C][/ROW]
[ROW][C]112[/C][C]0.0128[/C][C]-0.0478[/C][C]0.004[/C][C]38.9046[/C][C]3.242[/C][C]1.8006[/C][/ROW]
[ROW][C]113[/C][C]0.0139[/C][C]-0.0576[/C][C]0.0048[/C][C]57.6537[/C][C]4.8045[/C][C]2.1919[/C][/ROW]
[ROW][C]114[/C][C]0.015[/C][C]-0.0658[/C][C]0.0055[/C][C]76.2322[/C][C]6.3527[/C][C]2.5205[/C][/ROW]
[ROW][C]115[/C][C]0.0156[/C][C]-0.0717[/C][C]0.006[/C][C]88.7479[/C][C]7.3957[/C][C]2.7195[/C][/ROW]
[ROW][C]116[/C][C]0.0166[/C][C]-0.0628[/C][C]0.0052[/C][C]69.6112[/C][C]5.8009[/C][C]2.4085[/C][/ROW]
[ROW][C]117[/C][C]0.0174[/C][C]-0.0656[/C][C]0.0055[/C][C]75.935[/C][C]6.3279[/C][C]2.5155[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=65718&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=65718&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
1060.0045-0.00666e-040.69990.05830.2415
1070.0065-0.02230.00198.0520.6710.8191
1080.008-0.02750.002312.31311.02611.013
1090.0091-0.03230.002716.50711.37561.1729
1100.0106-0.03550.00321.09011.75751.3257
1110.0118-0.04850.00439.83243.31941.8219
1120.0128-0.04780.00438.90463.2421.8006
1130.0139-0.05760.004857.65374.80452.1919
1140.015-0.06580.005576.23226.35272.5205
1150.0156-0.07170.00688.74797.39572.7195
1160.0166-0.06280.005269.61125.80092.4085
1170.0174-0.06560.005575.9356.32792.5155



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