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 computationSat, 04 Dec 2010 13:18:15 +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/04/t129146857439aalvc674lyhwz.htm/, Retrieved Sun, 05 May 2024 00:55:56 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=105132, Retrieved Sun, 05 May 2024 00:55:56 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact153
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
-   PD        [ARIMA Forecasting] [Model 2 CPI] [2010-12-04 13:18:15] [b6992a7b26e556359948e164e4227eba] [Current]
Feedback Forum

Post a new message
Dataseries X:
115.65
116.00
115.92
116.10
116.44
116.65
117.45
117.58
117.43
117.24
117.25
117.29
117.83
118.22
118.11
118.23
118.15
118.23
119.03
119.38
118.97
118.78
118.97
118.94
119.86
120.09
120.13
120.15
119.90
120.00
120.84
121.17
120.81
121.00
121.12
121.29
122.09
121.88
121.31
121.33
121.45
121.67
122.78
122.84
122.34
122.37
122.72
122.68
122.78
123.08
122.92
123.51
124.18
124.05
124.36
123.87
123.84
123.85
123.83
123.84
124.27
124.56
124.57
124.87
125.08
124.86
124.89
124.58
124.83
124.97
125.19
125.42
125.74
126.07
126.35
126.69
126.85
127.12
127.43
127.49
128.05
127.85
128.35
128.29
128.38
128.80
129.18
130.14
130.77
131.19
131.32
131.41
131.61
131.69
131.94
131.70
132.54
132.74
133.02
132.76
133.05
132.74
133.16
133.10
133.37
133.15
133.18
133.29
133.76
134.51
134.82
134.71
134.52
134.86
135.11
135.28
135.61
135.22
135.47
135.42
135.85
136.27
136.30
136.85
137.05
137.03
137.45
137.49
137.55
138.04
138.03
137.75
138.27
138.99
139.74
139.70
139.97
140.21
140.78
140.80
140.64
140.42
140.85
140.96
141.04
141.71
141.60
142.11
142.59
142.56
143.00
143.18
143.15
143.10
143.45
143.59
143.92
144.66
144.34
144.82
144.49
144.41
144.99
144.95
145.00
145.66
146.68
147.38
147.94
149.12
149.95
150.19
151.16
151.74
152.56
152.09
152.46
152.66
152.38
152.59
152.88
153.29
152.35
152.49
152.20
151.57
151.55
151.79
151.52
151.76
151.92
152.20
152.75
153.49
153.78
154.10
154.62
154.65
154.81
154.92
155.40
155.63
155.76




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 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 & 3 seconds \tabularnewline
R Server & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105132&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]3 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=105132&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105132&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 time3 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[191])
179152.38-------
180152.59-------
181152.88-------
182153.29-------
183152.35-------
184152.49-------
185152.2-------
186151.57-------
187151.55-------
188151.79-------
189151.52-------
190151.76-------
191151.92-------
192152.2152.0437151.3299152.76090.33460.63230.06770.6323
193152.75152.4923151.4046153.58780.32240.69950.24390.8471
194153.49153.1315151.7652154.51010.30510.70620.41090.9575
195153.78153.149151.5555154.75930.22120.33910.83460.9327
196154.1153.4386151.6435155.2550.23770.35630.8470.9494
197154.62153.6512151.675155.65310.17140.33020.92230.955
198154.65153.6721151.5321155.84230.18860.1960.97120.9432
199154.81154.1538151.855156.48740.29080.33840.98560.9697
200154.92154.1568151.7155156.63740.27320.30290.96930.9614
201155.4154.1961151.6197156.81620.18390.29410.97730.9557
202155.63154.3231151.6169157.07770.17620.22180.96590.9564
203155.76154.5902151.7572157.47590.21340.240.96510.9651

\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[191]) \tabularnewline
179 & 152.38 & - & - & - & - & - & - & - \tabularnewline
180 & 152.59 & - & - & - & - & - & - & - \tabularnewline
181 & 152.88 & - & - & - & - & - & - & - \tabularnewline
182 & 153.29 & - & - & - & - & - & - & - \tabularnewline
183 & 152.35 & - & - & - & - & - & - & - \tabularnewline
184 & 152.49 & - & - & - & - & - & - & - \tabularnewline
185 & 152.2 & - & - & - & - & - & - & - \tabularnewline
186 & 151.57 & - & - & - & - & - & - & - \tabularnewline
187 & 151.55 & - & - & - & - & - & - & - \tabularnewline
188 & 151.79 & - & - & - & - & - & - & - \tabularnewline
189 & 151.52 & - & - & - & - & - & - & - \tabularnewline
190 & 151.76 & - & - & - & - & - & - & - \tabularnewline
191 & 151.92 & - & - & - & - & - & - & - \tabularnewline
192 & 152.2 & 152.0437 & 151.3299 & 152.7609 & 0.3346 & 0.6323 & 0.0677 & 0.6323 \tabularnewline
193 & 152.75 & 152.4923 & 151.4046 & 153.5878 & 0.3224 & 0.6995 & 0.2439 & 0.8471 \tabularnewline
194 & 153.49 & 153.1315 & 151.7652 & 154.5101 & 0.3051 & 0.7062 & 0.4109 & 0.9575 \tabularnewline
195 & 153.78 & 153.149 & 151.5555 & 154.7593 & 0.2212 & 0.3391 & 0.8346 & 0.9327 \tabularnewline
196 & 154.1 & 153.4386 & 151.6435 & 155.255 & 0.2377 & 0.3563 & 0.847 & 0.9494 \tabularnewline
197 & 154.62 & 153.6512 & 151.675 & 155.6531 & 0.1714 & 0.3302 & 0.9223 & 0.955 \tabularnewline
198 & 154.65 & 153.6721 & 151.5321 & 155.8423 & 0.1886 & 0.196 & 0.9712 & 0.9432 \tabularnewline
199 & 154.81 & 154.1538 & 151.855 & 156.4874 & 0.2908 & 0.3384 & 0.9856 & 0.9697 \tabularnewline
200 & 154.92 & 154.1568 & 151.7155 & 156.6374 & 0.2732 & 0.3029 & 0.9693 & 0.9614 \tabularnewline
201 & 155.4 & 154.1961 & 151.6197 & 156.8162 & 0.1839 & 0.2941 & 0.9773 & 0.9557 \tabularnewline
202 & 155.63 & 154.3231 & 151.6169 & 157.0777 & 0.1762 & 0.2218 & 0.9659 & 0.9564 \tabularnewline
203 & 155.76 & 154.5902 & 151.7572 & 157.4759 & 0.2134 & 0.24 & 0.9651 & 0.9651 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105132&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[191])[/C][/ROW]
[ROW][C]179[/C][C]152.38[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]180[/C][C]152.59[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]181[/C][C]152.88[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]182[/C][C]153.29[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]183[/C][C]152.35[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]184[/C][C]152.49[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]185[/C][C]152.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]186[/C][C]151.57[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]187[/C][C]151.55[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]188[/C][C]151.79[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]189[/C][C]151.52[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]190[/C][C]151.76[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]191[/C][C]151.92[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]192[/C][C]152.2[/C][C]152.0437[/C][C]151.3299[/C][C]152.7609[/C][C]0.3346[/C][C]0.6323[/C][C]0.0677[/C][C]0.6323[/C][/ROW]
[ROW][C]193[/C][C]152.75[/C][C]152.4923[/C][C]151.4046[/C][C]153.5878[/C][C]0.3224[/C][C]0.6995[/C][C]0.2439[/C][C]0.8471[/C][/ROW]
[ROW][C]194[/C][C]153.49[/C][C]153.1315[/C][C]151.7652[/C][C]154.5101[/C][C]0.3051[/C][C]0.7062[/C][C]0.4109[/C][C]0.9575[/C][/ROW]
[ROW][C]195[/C][C]153.78[/C][C]153.149[/C][C]151.5555[/C][C]154.7593[/C][C]0.2212[/C][C]0.3391[/C][C]0.8346[/C][C]0.9327[/C][/ROW]
[ROW][C]196[/C][C]154.1[/C][C]153.4386[/C][C]151.6435[/C][C]155.255[/C][C]0.2377[/C][C]0.3563[/C][C]0.847[/C][C]0.9494[/C][/ROW]
[ROW][C]197[/C][C]154.62[/C][C]153.6512[/C][C]151.675[/C][C]155.6531[/C][C]0.1714[/C][C]0.3302[/C][C]0.9223[/C][C]0.955[/C][/ROW]
[ROW][C]198[/C][C]154.65[/C][C]153.6721[/C][C]151.5321[/C][C]155.8423[/C][C]0.1886[/C][C]0.196[/C][C]0.9712[/C][C]0.9432[/C][/ROW]
[ROW][C]199[/C][C]154.81[/C][C]154.1538[/C][C]151.855[/C][C]156.4874[/C][C]0.2908[/C][C]0.3384[/C][C]0.9856[/C][C]0.9697[/C][/ROW]
[ROW][C]200[/C][C]154.92[/C][C]154.1568[/C][C]151.7155[/C][C]156.6374[/C][C]0.2732[/C][C]0.3029[/C][C]0.9693[/C][C]0.9614[/C][/ROW]
[ROW][C]201[/C][C]155.4[/C][C]154.1961[/C][C]151.6197[/C][C]156.8162[/C][C]0.1839[/C][C]0.2941[/C][C]0.9773[/C][C]0.9557[/C][/ROW]
[ROW][C]202[/C][C]155.63[/C][C]154.3231[/C][C]151.6169[/C][C]157.0777[/C][C]0.1762[/C][C]0.2218[/C][C]0.9659[/C][C]0.9564[/C][/ROW]
[ROW][C]203[/C][C]155.76[/C][C]154.5902[/C][C]151.7572[/C][C]157.4759[/C][C]0.2134[/C][C]0.24[/C][C]0.9651[/C][C]0.9651[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=105132&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105132&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[191])
179152.38-------
180152.59-------
181152.88-------
182153.29-------
183152.35-------
184152.49-------
185152.2-------
186151.57-------
187151.55-------
188151.79-------
189151.52-------
190151.76-------
191151.92-------
192152.2152.0437151.3299152.76090.33460.63230.06770.6323
193152.75152.4923151.4046153.58780.32240.69950.24390.8471
194153.49153.1315151.7652154.51010.30510.70620.41090.9575
195153.78153.149151.5555154.75930.22120.33910.83460.9327
196154.1153.4386151.6435155.2550.23770.35630.8470.9494
197154.62153.6512151.675155.65310.17140.33020.92230.955
198154.65153.6721151.5321155.84230.18860.1960.97120.9432
199154.81154.1538151.855156.48740.29080.33840.98560.9697
200154.92154.1568151.7155156.63740.27320.30290.96930.9614
201155.4154.1961151.6197156.81620.18390.29410.97730.9557
202155.63154.3231151.6169157.07770.17620.22180.96590.9564
203155.76154.5902151.7572157.47590.21340.240.96510.9651







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1920.00240.00100.024400
1930.00370.00170.00140.06640.04540.2131
1940.00460.00230.00170.12850.07310.2704
1950.00540.00410.00230.39810.15440.3929
1960.0060.00430.00270.43740.2110.4593
1970.00660.00630.00330.93870.33230.5764
1980.00720.00640.00370.95630.42140.6492
1990.00770.00430.00380.43050.42260.65
2000.00820.0050.00390.58250.44030.6636
2010.00870.00780.00431.44950.54120.7357
2020.00910.00850.00471.70790.64730.8045
2030.00950.00760.00491.36850.70740.8411

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
192 & 0.0024 & 0.001 & 0 & 0.0244 & 0 & 0 \tabularnewline
193 & 0.0037 & 0.0017 & 0.0014 & 0.0664 & 0.0454 & 0.2131 \tabularnewline
194 & 0.0046 & 0.0023 & 0.0017 & 0.1285 & 0.0731 & 0.2704 \tabularnewline
195 & 0.0054 & 0.0041 & 0.0023 & 0.3981 & 0.1544 & 0.3929 \tabularnewline
196 & 0.006 & 0.0043 & 0.0027 & 0.4374 & 0.211 & 0.4593 \tabularnewline
197 & 0.0066 & 0.0063 & 0.0033 & 0.9387 & 0.3323 & 0.5764 \tabularnewline
198 & 0.0072 & 0.0064 & 0.0037 & 0.9563 & 0.4214 & 0.6492 \tabularnewline
199 & 0.0077 & 0.0043 & 0.0038 & 0.4305 & 0.4226 & 0.65 \tabularnewline
200 & 0.0082 & 0.005 & 0.0039 & 0.5825 & 0.4403 & 0.6636 \tabularnewline
201 & 0.0087 & 0.0078 & 0.0043 & 1.4495 & 0.5412 & 0.7357 \tabularnewline
202 & 0.0091 & 0.0085 & 0.0047 & 1.7079 & 0.6473 & 0.8045 \tabularnewline
203 & 0.0095 & 0.0076 & 0.0049 & 1.3685 & 0.7074 & 0.8411 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105132&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]192[/C][C]0.0024[/C][C]0.001[/C][C]0[/C][C]0.0244[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]193[/C][C]0.0037[/C][C]0.0017[/C][C]0.0014[/C][C]0.0664[/C][C]0.0454[/C][C]0.2131[/C][/ROW]
[ROW][C]194[/C][C]0.0046[/C][C]0.0023[/C][C]0.0017[/C][C]0.1285[/C][C]0.0731[/C][C]0.2704[/C][/ROW]
[ROW][C]195[/C][C]0.0054[/C][C]0.0041[/C][C]0.0023[/C][C]0.3981[/C][C]0.1544[/C][C]0.3929[/C][/ROW]
[ROW][C]196[/C][C]0.006[/C][C]0.0043[/C][C]0.0027[/C][C]0.4374[/C][C]0.211[/C][C]0.4593[/C][/ROW]
[ROW][C]197[/C][C]0.0066[/C][C]0.0063[/C][C]0.0033[/C][C]0.9387[/C][C]0.3323[/C][C]0.5764[/C][/ROW]
[ROW][C]198[/C][C]0.0072[/C][C]0.0064[/C][C]0.0037[/C][C]0.9563[/C][C]0.4214[/C][C]0.6492[/C][/ROW]
[ROW][C]199[/C][C]0.0077[/C][C]0.0043[/C][C]0.0038[/C][C]0.4305[/C][C]0.4226[/C][C]0.65[/C][/ROW]
[ROW][C]200[/C][C]0.0082[/C][C]0.005[/C][C]0.0039[/C][C]0.5825[/C][C]0.4403[/C][C]0.6636[/C][/ROW]
[ROW][C]201[/C][C]0.0087[/C][C]0.0078[/C][C]0.0043[/C][C]1.4495[/C][C]0.5412[/C][C]0.7357[/C][/ROW]
[ROW][C]202[/C][C]0.0091[/C][C]0.0085[/C][C]0.0047[/C][C]1.7079[/C][C]0.6473[/C][C]0.8045[/C][/ROW]
[ROW][C]203[/C][C]0.0095[/C][C]0.0076[/C][C]0.0049[/C][C]1.3685[/C][C]0.7074[/C][C]0.8411[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=105132&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105132&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
1920.00240.00100.024400
1930.00370.00170.00140.06640.04540.2131
1940.00460.00230.00170.12850.07310.2704
1950.00540.00410.00230.39810.15440.3929
1960.0060.00430.00270.43740.2110.4593
1970.00660.00630.00330.93870.33230.5764
1980.00720.00640.00370.95630.42140.6492
1990.00770.00430.00380.43050.42260.65
2000.00820.0050.00390.58250.44030.6636
2010.00870.00780.00431.44950.54120.7357
2020.00910.00850.00471.70790.64730.8045
2030.00950.00760.00491.36850.70740.8411



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