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, 06 Dec 2009 11:23:17 -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/06/t1260123875pl355f4rees9tz4.htm/, Retrieved Thu, 02 May 2024 08:24:09 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=64467, Retrieved Thu, 02 May 2024 08:24:09 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact180
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [] [2009-11-05 08:15:26] [74be16979710d4c4e7c6647856088456]
-   PD  [Univariate Data Series] [] [2009-11-11 08:16:12] [74be16979710d4c4e7c6647856088456]
- RMP       [ARIMA Forecasting] [] [2009-12-06 18:23:17] [2b679e8ec54382eeb0ec0b6bb527570a] [Current]
- R PD        [ARIMA Forecasting] [ARIMA Forecasting] [2009-12-12 14:17:13] [4f1a20f787b3465111b61213cdeef1a9]
-   PD        [ARIMA Forecasting] [] [2009-12-21 11:21:06] [5d885a68c2332cc44f6191ec94766bfa]
Feedback Forum

Post a new message
Dataseries X:
100.03
100.25
99.6
100.16
100.49
99.72
100.14
98.48
100.38
101.45
98.42
98.6
100.06
98.62
100.84
100.02
97.95
98.32
98.27
97.22
99.28
100.38
99.02
100.32
99.81
100.6
101.19
100.47
101.77
102.32
102.39
101.16
100.63
101.48
101.44
100.09
100.7
100.78
99.81
98.45
98.49
97.48
97.91
96.94
98.53
96.82
95.76
95.27
97.32
96.68
97.87
97.42
97.94
99.52
100.99
99.92
101.97
101.58
99.54
100.83




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 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 & 2 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=64467&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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=64467&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=64467&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'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[48])
36100.09-------
37100.7-------
38100.78-------
3999.81-------
4098.45-------
4198.49-------
4297.48-------
4397.91-------
4496.94-------
4598.53-------
4696.82-------
4795.76-------
4895.27-------
4997.3295.443593.253697.63340.04650.561700.5617
5096.6895.38792.302398.47160.20570.10973e-040.5296
5197.8795.649391.876599.42210.12430.29620.01530.5781
5297.4295.438491.084999.7920.18620.13680.08760.5302
5397.9495.378590.5131100.2440.15110.20540.1050.5174
5499.5295.361390.0329100.68970.0630.17140.21790.5134
55100.9995.438289.684101.19240.02930.08220.19990.5228
5699.9294.861888.7111101.01240.05350.02540.25390.4482
57101.9795.3988.867101.9130.0240.08670.17270.5144
58101.5895.71588.8398102.59030.04730.03730.37640.5505
5999.5495.086387.876102.29660.1130.03880.42730.4801
60100.8395.074987.5445102.60530.06710.12260.47970.4797

\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[48]) \tabularnewline
36 & 100.09 & - & - & - & - & - & - & - \tabularnewline
37 & 100.7 & - & - & - & - & - & - & - \tabularnewline
38 & 100.78 & - & - & - & - & - & - & - \tabularnewline
39 & 99.81 & - & - & - & - & - & - & - \tabularnewline
40 & 98.45 & - & - & - & - & - & - & - \tabularnewline
41 & 98.49 & - & - & - & - & - & - & - \tabularnewline
42 & 97.48 & - & - & - & - & - & - & - \tabularnewline
43 & 97.91 & - & - & - & - & - & - & - \tabularnewline
44 & 96.94 & - & - & - & - & - & - & - \tabularnewline
45 & 98.53 & - & - & - & - & - & - & - \tabularnewline
46 & 96.82 & - & - & - & - & - & - & - \tabularnewline
47 & 95.76 & - & - & - & - & - & - & - \tabularnewline
48 & 95.27 & - & - & - & - & - & - & - \tabularnewline
49 & 97.32 & 95.4435 & 93.2536 & 97.6334 & 0.0465 & 0.5617 & 0 & 0.5617 \tabularnewline
50 & 96.68 & 95.387 & 92.3023 & 98.4716 & 0.2057 & 0.1097 & 3e-04 & 0.5296 \tabularnewline
51 & 97.87 & 95.6493 & 91.8765 & 99.4221 & 0.1243 & 0.2962 & 0.0153 & 0.5781 \tabularnewline
52 & 97.42 & 95.4384 & 91.0849 & 99.792 & 0.1862 & 0.1368 & 0.0876 & 0.5302 \tabularnewline
53 & 97.94 & 95.3785 & 90.5131 & 100.244 & 0.1511 & 0.2054 & 0.105 & 0.5174 \tabularnewline
54 & 99.52 & 95.3613 & 90.0329 & 100.6897 & 0.063 & 0.1714 & 0.2179 & 0.5134 \tabularnewline
55 & 100.99 & 95.4382 & 89.684 & 101.1924 & 0.0293 & 0.0822 & 0.1999 & 0.5228 \tabularnewline
56 & 99.92 & 94.8618 & 88.7111 & 101.0124 & 0.0535 & 0.0254 & 0.2539 & 0.4482 \tabularnewline
57 & 101.97 & 95.39 & 88.867 & 101.913 & 0.024 & 0.0867 & 0.1727 & 0.5144 \tabularnewline
58 & 101.58 & 95.715 & 88.8398 & 102.5903 & 0.0473 & 0.0373 & 0.3764 & 0.5505 \tabularnewline
59 & 99.54 & 95.0863 & 87.876 & 102.2966 & 0.113 & 0.0388 & 0.4273 & 0.4801 \tabularnewline
60 & 100.83 & 95.0749 & 87.5445 & 102.6053 & 0.0671 & 0.1226 & 0.4797 & 0.4797 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=64467&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[48])[/C][/ROW]
[ROW][C]36[/C][C]100.09[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]100.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]100.78[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]99.81[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]98.45[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]98.49[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]97.48[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]97.91[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]96.94[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]98.53[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]96.82[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]95.76[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]95.27[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]97.32[/C][C]95.4435[/C][C]93.2536[/C][C]97.6334[/C][C]0.0465[/C][C]0.5617[/C][C]0[/C][C]0.5617[/C][/ROW]
[ROW][C]50[/C][C]96.68[/C][C]95.387[/C][C]92.3023[/C][C]98.4716[/C][C]0.2057[/C][C]0.1097[/C][C]3e-04[/C][C]0.5296[/C][/ROW]
[ROW][C]51[/C][C]97.87[/C][C]95.6493[/C][C]91.8765[/C][C]99.4221[/C][C]0.1243[/C][C]0.2962[/C][C]0.0153[/C][C]0.5781[/C][/ROW]
[ROW][C]52[/C][C]97.42[/C][C]95.4384[/C][C]91.0849[/C][C]99.792[/C][C]0.1862[/C][C]0.1368[/C][C]0.0876[/C][C]0.5302[/C][/ROW]
[ROW][C]53[/C][C]97.94[/C][C]95.3785[/C][C]90.5131[/C][C]100.244[/C][C]0.1511[/C][C]0.2054[/C][C]0.105[/C][C]0.5174[/C][/ROW]
[ROW][C]54[/C][C]99.52[/C][C]95.3613[/C][C]90.0329[/C][C]100.6897[/C][C]0.063[/C][C]0.1714[/C][C]0.2179[/C][C]0.5134[/C][/ROW]
[ROW][C]55[/C][C]100.99[/C][C]95.4382[/C][C]89.684[/C][C]101.1924[/C][C]0.0293[/C][C]0.0822[/C][C]0.1999[/C][C]0.5228[/C][/ROW]
[ROW][C]56[/C][C]99.92[/C][C]94.8618[/C][C]88.7111[/C][C]101.0124[/C][C]0.0535[/C][C]0.0254[/C][C]0.2539[/C][C]0.4482[/C][/ROW]
[ROW][C]57[/C][C]101.97[/C][C]95.39[/C][C]88.867[/C][C]101.913[/C][C]0.024[/C][C]0.0867[/C][C]0.1727[/C][C]0.5144[/C][/ROW]
[ROW][C]58[/C][C]101.58[/C][C]95.715[/C][C]88.8398[/C][C]102.5903[/C][C]0.0473[/C][C]0.0373[/C][C]0.3764[/C][C]0.5505[/C][/ROW]
[ROW][C]59[/C][C]99.54[/C][C]95.0863[/C][C]87.876[/C][C]102.2966[/C][C]0.113[/C][C]0.0388[/C][C]0.4273[/C][C]0.4801[/C][/ROW]
[ROW][C]60[/C][C]100.83[/C][C]95.0749[/C][C]87.5445[/C][C]102.6053[/C][C]0.0671[/C][C]0.1226[/C][C]0.4797[/C][C]0.4797[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=64467&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=64467&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[48])
36100.09-------
37100.7-------
38100.78-------
3999.81-------
4098.45-------
4198.49-------
4297.48-------
4397.91-------
4496.94-------
4598.53-------
4696.82-------
4795.76-------
4895.27-------
4997.3295.443593.253697.63340.04650.561700.5617
5096.6895.38792.302398.47160.20570.10973e-040.5296
5197.8795.649391.876599.42210.12430.29620.01530.5781
5297.4295.438491.084999.7920.18620.13680.08760.5302
5397.9495.378590.5131100.2440.15110.20540.1050.5174
5499.5295.361390.0329100.68970.0630.17140.21790.5134
55100.9995.438289.684101.19240.02930.08220.19990.5228
5699.9294.861888.7111101.01240.05350.02540.25390.4482
57101.9795.3988.867101.9130.0240.08670.17270.5144
58101.5895.71588.8398102.59030.04730.03730.37640.5505
5999.5495.086387.876102.29660.1130.03880.42730.4801
60100.8395.074987.5445102.60530.06710.12260.47970.4797







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.01170.019703.521300
500.01650.01360.01661.67192.59661.6114
510.02010.02320.01884.93153.37491.8371
520.02330.02080.01933.92663.51281.8743
530.0260.02690.02086.56124.12252.0304
540.02850.04360.024617.29476.31792.5135
550.03080.05820.029430.82259.81853.1335
560.03310.05330.032425.585711.78943.4336
570.03490.0690.036543.296115.29023.9103
580.03660.06130.038934.397817.20094.1474
590.03870.04680.039719.835217.44044.1762
600.04040.06050.041433.121318.74724.3298

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0117 & 0.0197 & 0 & 3.5213 & 0 & 0 \tabularnewline
50 & 0.0165 & 0.0136 & 0.0166 & 1.6719 & 2.5966 & 1.6114 \tabularnewline
51 & 0.0201 & 0.0232 & 0.0188 & 4.9315 & 3.3749 & 1.8371 \tabularnewline
52 & 0.0233 & 0.0208 & 0.0193 & 3.9266 & 3.5128 & 1.8743 \tabularnewline
53 & 0.026 & 0.0269 & 0.0208 & 6.5612 & 4.1225 & 2.0304 \tabularnewline
54 & 0.0285 & 0.0436 & 0.0246 & 17.2947 & 6.3179 & 2.5135 \tabularnewline
55 & 0.0308 & 0.0582 & 0.0294 & 30.8225 & 9.8185 & 3.1335 \tabularnewline
56 & 0.0331 & 0.0533 & 0.0324 & 25.5857 & 11.7894 & 3.4336 \tabularnewline
57 & 0.0349 & 0.069 & 0.0365 & 43.2961 & 15.2902 & 3.9103 \tabularnewline
58 & 0.0366 & 0.0613 & 0.0389 & 34.3978 & 17.2009 & 4.1474 \tabularnewline
59 & 0.0387 & 0.0468 & 0.0397 & 19.8352 & 17.4404 & 4.1762 \tabularnewline
60 & 0.0404 & 0.0605 & 0.0414 & 33.1213 & 18.7472 & 4.3298 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=64467&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]49[/C][C]0.0117[/C][C]0.0197[/C][C]0[/C][C]3.5213[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.0165[/C][C]0.0136[/C][C]0.0166[/C][C]1.6719[/C][C]2.5966[/C][C]1.6114[/C][/ROW]
[ROW][C]51[/C][C]0.0201[/C][C]0.0232[/C][C]0.0188[/C][C]4.9315[/C][C]3.3749[/C][C]1.8371[/C][/ROW]
[ROW][C]52[/C][C]0.0233[/C][C]0.0208[/C][C]0.0193[/C][C]3.9266[/C][C]3.5128[/C][C]1.8743[/C][/ROW]
[ROW][C]53[/C][C]0.026[/C][C]0.0269[/C][C]0.0208[/C][C]6.5612[/C][C]4.1225[/C][C]2.0304[/C][/ROW]
[ROW][C]54[/C][C]0.0285[/C][C]0.0436[/C][C]0.0246[/C][C]17.2947[/C][C]6.3179[/C][C]2.5135[/C][/ROW]
[ROW][C]55[/C][C]0.0308[/C][C]0.0582[/C][C]0.0294[/C][C]30.8225[/C][C]9.8185[/C][C]3.1335[/C][/ROW]
[ROW][C]56[/C][C]0.0331[/C][C]0.0533[/C][C]0.0324[/C][C]25.5857[/C][C]11.7894[/C][C]3.4336[/C][/ROW]
[ROW][C]57[/C][C]0.0349[/C][C]0.069[/C][C]0.0365[/C][C]43.2961[/C][C]15.2902[/C][C]3.9103[/C][/ROW]
[ROW][C]58[/C][C]0.0366[/C][C]0.0613[/C][C]0.0389[/C][C]34.3978[/C][C]17.2009[/C][C]4.1474[/C][/ROW]
[ROW][C]59[/C][C]0.0387[/C][C]0.0468[/C][C]0.0397[/C][C]19.8352[/C][C]17.4404[/C][C]4.1762[/C][/ROW]
[ROW][C]60[/C][C]0.0404[/C][C]0.0605[/C][C]0.0414[/C][C]33.1213[/C][C]18.7472[/C][C]4.3298[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=64467&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=64467&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
490.01170.019703.521300
500.01650.01360.01661.67192.59661.6114
510.02010.02320.01884.93153.37491.8371
520.02330.02080.01933.92663.51281.8743
530.0260.02690.02086.56124.12252.0304
540.02850.04360.024617.29476.31792.5135
550.03080.05820.029430.82259.81853.1335
560.03310.05330.032425.585711.78943.4336
570.03490.0690.036543.296115.29023.9103
580.03660.06130.038934.397817.20094.1474
590.03870.04680.039719.835217.44044.1762
600.04040.06050.041433.121318.74724.3298



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