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, 26 Dec 2010 15:04:44 +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/26/t1293375920dm6qxx256rhpzia.htm/, Retrieved Mon, 06 May 2024 13:24:48 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=115645, Retrieved Mon, 06 May 2024 13:24:48 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact108
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA forecast soc] [2010-12-26 15:04:44] [346ac46ef4f6bb745e48fc42fac6253b] [Current]
Feedback Forum

Post a new message
Dataseries X:
104.71
105.35
106.31
106.26
106.97
107.04
106.98
107.05
107.33
107.3
107.28
107.58
109.03
110.43
111.01
111.01
110.76
111.13
111.07
111.09
110.96
110.64
110.62
110.59
111.33
113.94
114.61
114.64
114.62
114.71
114.72
114.66
114.76
114.68
114.75
114.74
116.36
117.53
118.82
119.83
119.97
121.29
120.94
121.02
120.98
121.02
120.89
120.76
123.28
123.98
125.91
125.84
125.98
127.24
127.23
127.82
127.59
127.74
127.44
127.35




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115645&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[48])
36114.74-------
37116.36-------
38117.53-------
39118.82-------
40119.83-------
41119.97-------
42121.29-------
43120.94-------
44121.02-------
45120.98-------
46121.02-------
47120.89-------
48120.76-------
49123.28121.3447120.2729122.41652e-040.857510.8575
50123.98121.402119.674123.12990.00170.016610.7667
51125.91121.827119.4268124.22734e-040.03940.9930.8082
52125.84122.2453119.2386125.25190.00960.00840.94230.8335
53125.98122.2574118.6915125.82330.02040.02450.89570.7948
54127.24122.8381118.7608126.91550.01720.06550.77160.8411
55127.23122.6758118.127127.22460.02490.02460.77270.7955
56127.82122.7192117.7339127.70460.02250.03810.7480.7794
57127.59122.6627117.2704128.0550.03660.03040.72960.7554
58127.74122.6702116.8963128.44410.04260.04750.71230.7416
59127.44122.5997116.466128.73340.0610.05020.70760.7217
60127.35122.5352116.0605129.00990.07250.06880.70450.7045

\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 & 114.74 & - & - & - & - & - & - & - \tabularnewline
37 & 116.36 & - & - & - & - & - & - & - \tabularnewline
38 & 117.53 & - & - & - & - & - & - & - \tabularnewline
39 & 118.82 & - & - & - & - & - & - & - \tabularnewline
40 & 119.83 & - & - & - & - & - & - & - \tabularnewline
41 & 119.97 & - & - & - & - & - & - & - \tabularnewline
42 & 121.29 & - & - & - & - & - & - & - \tabularnewline
43 & 120.94 & - & - & - & - & - & - & - \tabularnewline
44 & 121.02 & - & - & - & - & - & - & - \tabularnewline
45 & 120.98 & - & - & - & - & - & - & - \tabularnewline
46 & 121.02 & - & - & - & - & - & - & - \tabularnewline
47 & 120.89 & - & - & - & - & - & - & - \tabularnewline
48 & 120.76 & - & - & - & - & - & - & - \tabularnewline
49 & 123.28 & 121.3447 & 120.2729 & 122.4165 & 2e-04 & 0.8575 & 1 & 0.8575 \tabularnewline
50 & 123.98 & 121.402 & 119.674 & 123.1299 & 0.0017 & 0.0166 & 1 & 0.7667 \tabularnewline
51 & 125.91 & 121.827 & 119.4268 & 124.2273 & 4e-04 & 0.0394 & 0.993 & 0.8082 \tabularnewline
52 & 125.84 & 122.2453 & 119.2386 & 125.2519 & 0.0096 & 0.0084 & 0.9423 & 0.8335 \tabularnewline
53 & 125.98 & 122.2574 & 118.6915 & 125.8233 & 0.0204 & 0.0245 & 0.8957 & 0.7948 \tabularnewline
54 & 127.24 & 122.8381 & 118.7608 & 126.9155 & 0.0172 & 0.0655 & 0.7716 & 0.8411 \tabularnewline
55 & 127.23 & 122.6758 & 118.127 & 127.2246 & 0.0249 & 0.0246 & 0.7727 & 0.7955 \tabularnewline
56 & 127.82 & 122.7192 & 117.7339 & 127.7046 & 0.0225 & 0.0381 & 0.748 & 0.7794 \tabularnewline
57 & 127.59 & 122.6627 & 117.2704 & 128.055 & 0.0366 & 0.0304 & 0.7296 & 0.7554 \tabularnewline
58 & 127.74 & 122.6702 & 116.8963 & 128.4441 & 0.0426 & 0.0475 & 0.7123 & 0.7416 \tabularnewline
59 & 127.44 & 122.5997 & 116.466 & 128.7334 & 0.061 & 0.0502 & 0.7076 & 0.7217 \tabularnewline
60 & 127.35 & 122.5352 & 116.0605 & 129.0099 & 0.0725 & 0.0688 & 0.7045 & 0.7045 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115645&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]114.74[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]116.36[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]117.53[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]118.82[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]119.83[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]119.97[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]121.29[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]120.94[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]121.02[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]120.98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]121.02[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]120.89[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]120.76[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]123.28[/C][C]121.3447[/C][C]120.2729[/C][C]122.4165[/C][C]2e-04[/C][C]0.8575[/C][C]1[/C][C]0.8575[/C][/ROW]
[ROW][C]50[/C][C]123.98[/C][C]121.402[/C][C]119.674[/C][C]123.1299[/C][C]0.0017[/C][C]0.0166[/C][C]1[/C][C]0.7667[/C][/ROW]
[ROW][C]51[/C][C]125.91[/C][C]121.827[/C][C]119.4268[/C][C]124.2273[/C][C]4e-04[/C][C]0.0394[/C][C]0.993[/C][C]0.8082[/C][/ROW]
[ROW][C]52[/C][C]125.84[/C][C]122.2453[/C][C]119.2386[/C][C]125.2519[/C][C]0.0096[/C][C]0.0084[/C][C]0.9423[/C][C]0.8335[/C][/ROW]
[ROW][C]53[/C][C]125.98[/C][C]122.2574[/C][C]118.6915[/C][C]125.8233[/C][C]0.0204[/C][C]0.0245[/C][C]0.8957[/C][C]0.7948[/C][/ROW]
[ROW][C]54[/C][C]127.24[/C][C]122.8381[/C][C]118.7608[/C][C]126.9155[/C][C]0.0172[/C][C]0.0655[/C][C]0.7716[/C][C]0.8411[/C][/ROW]
[ROW][C]55[/C][C]127.23[/C][C]122.6758[/C][C]118.127[/C][C]127.2246[/C][C]0.0249[/C][C]0.0246[/C][C]0.7727[/C][C]0.7955[/C][/ROW]
[ROW][C]56[/C][C]127.82[/C][C]122.7192[/C][C]117.7339[/C][C]127.7046[/C][C]0.0225[/C][C]0.0381[/C][C]0.748[/C][C]0.7794[/C][/ROW]
[ROW][C]57[/C][C]127.59[/C][C]122.6627[/C][C]117.2704[/C][C]128.055[/C][C]0.0366[/C][C]0.0304[/C][C]0.7296[/C][C]0.7554[/C][/ROW]
[ROW][C]58[/C][C]127.74[/C][C]122.6702[/C][C]116.8963[/C][C]128.4441[/C][C]0.0426[/C][C]0.0475[/C][C]0.7123[/C][C]0.7416[/C][/ROW]
[ROW][C]59[/C][C]127.44[/C][C]122.5997[/C][C]116.466[/C][C]128.7334[/C][C]0.061[/C][C]0.0502[/C][C]0.7076[/C][C]0.7217[/C][/ROW]
[ROW][C]60[/C][C]127.35[/C][C]122.5352[/C][C]116.0605[/C][C]129.0099[/C][C]0.0725[/C][C]0.0688[/C][C]0.7045[/C][C]0.7045[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115645&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115645&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])
36114.74-------
37116.36-------
38117.53-------
39118.82-------
40119.83-------
41119.97-------
42121.29-------
43120.94-------
44121.02-------
45120.98-------
46121.02-------
47120.89-------
48120.76-------
49123.28121.3447120.2729122.41652e-040.857510.8575
50123.98121.402119.674123.12990.00170.016610.7667
51125.91121.827119.4268124.22734e-040.03940.9930.8082
52125.84122.2453119.2386125.25190.00960.00840.94230.8335
53125.98122.2574118.6915125.82330.02040.02450.89570.7948
54127.24122.8381118.7608126.91550.01720.06550.77160.8411
55127.23122.6758118.127127.22460.02490.02460.77270.7955
56127.82122.7192117.7339127.70460.02250.03810.7480.7794
57127.59122.6627117.2704128.0550.03660.03040.72960.7554
58127.74122.6702116.8963128.44410.04260.04750.71230.7416
59127.44122.5997116.466128.73340.0610.05020.70760.7217
60127.35122.5352116.0605129.00990.07250.06880.70450.7045







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.00450.015903.745400
500.00730.02120.01866.64625.19582.2794
510.01010.03350.023616.67059.02073.0034
520.01250.02940.02512.92229.99613.1617
530.01490.03040.026113.857910.76843.2815
540.01690.03580.027719.376512.20313.4933
550.01890.03710.029120.740913.42283.6637
560.02070.04160.030626.017714.99723.8726
570.02240.04020.031724.278516.02844.0036
580.0240.04130.032725.70316.99594.1226
590.02550.03950.033323.428617.58074.1929
600.0270.03930.033823.182518.04754.2482

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0045 & 0.0159 & 0 & 3.7454 & 0 & 0 \tabularnewline
50 & 0.0073 & 0.0212 & 0.0186 & 6.6462 & 5.1958 & 2.2794 \tabularnewline
51 & 0.0101 & 0.0335 & 0.0236 & 16.6705 & 9.0207 & 3.0034 \tabularnewline
52 & 0.0125 & 0.0294 & 0.025 & 12.9222 & 9.9961 & 3.1617 \tabularnewline
53 & 0.0149 & 0.0304 & 0.0261 & 13.8579 & 10.7684 & 3.2815 \tabularnewline
54 & 0.0169 & 0.0358 & 0.0277 & 19.3765 & 12.2031 & 3.4933 \tabularnewline
55 & 0.0189 & 0.0371 & 0.0291 & 20.7409 & 13.4228 & 3.6637 \tabularnewline
56 & 0.0207 & 0.0416 & 0.0306 & 26.0177 & 14.9972 & 3.8726 \tabularnewline
57 & 0.0224 & 0.0402 & 0.0317 & 24.2785 & 16.0284 & 4.0036 \tabularnewline
58 & 0.024 & 0.0413 & 0.0327 & 25.703 & 16.9959 & 4.1226 \tabularnewline
59 & 0.0255 & 0.0395 & 0.0333 & 23.4286 & 17.5807 & 4.1929 \tabularnewline
60 & 0.027 & 0.0393 & 0.0338 & 23.1825 & 18.0475 & 4.2482 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115645&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.0045[/C][C]0.0159[/C][C]0[/C][C]3.7454[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.0073[/C][C]0.0212[/C][C]0.0186[/C][C]6.6462[/C][C]5.1958[/C][C]2.2794[/C][/ROW]
[ROW][C]51[/C][C]0.0101[/C][C]0.0335[/C][C]0.0236[/C][C]16.6705[/C][C]9.0207[/C][C]3.0034[/C][/ROW]
[ROW][C]52[/C][C]0.0125[/C][C]0.0294[/C][C]0.025[/C][C]12.9222[/C][C]9.9961[/C][C]3.1617[/C][/ROW]
[ROW][C]53[/C][C]0.0149[/C][C]0.0304[/C][C]0.0261[/C][C]13.8579[/C][C]10.7684[/C][C]3.2815[/C][/ROW]
[ROW][C]54[/C][C]0.0169[/C][C]0.0358[/C][C]0.0277[/C][C]19.3765[/C][C]12.2031[/C][C]3.4933[/C][/ROW]
[ROW][C]55[/C][C]0.0189[/C][C]0.0371[/C][C]0.0291[/C][C]20.7409[/C][C]13.4228[/C][C]3.6637[/C][/ROW]
[ROW][C]56[/C][C]0.0207[/C][C]0.0416[/C][C]0.0306[/C][C]26.0177[/C][C]14.9972[/C][C]3.8726[/C][/ROW]
[ROW][C]57[/C][C]0.0224[/C][C]0.0402[/C][C]0.0317[/C][C]24.2785[/C][C]16.0284[/C][C]4.0036[/C][/ROW]
[ROW][C]58[/C][C]0.024[/C][C]0.0413[/C][C]0.0327[/C][C]25.703[/C][C]16.9959[/C][C]4.1226[/C][/ROW]
[ROW][C]59[/C][C]0.0255[/C][C]0.0395[/C][C]0.0333[/C][C]23.4286[/C][C]17.5807[/C][C]4.1929[/C][/ROW]
[ROW][C]60[/C][C]0.027[/C][C]0.0393[/C][C]0.0338[/C][C]23.1825[/C][C]18.0475[/C][C]4.2482[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115645&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115645&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.00450.015903.745400
500.00730.02120.01866.64625.19582.2794
510.01010.03350.023616.67059.02073.0034
520.01250.02940.02512.92229.99613.1617
530.01490.03040.026113.857910.76843.2815
540.01690.03580.027719.376512.20313.4933
550.01890.03710.029120.740913.42283.6637
560.02070.04160.030626.017714.99723.8726
570.02240.04020.031724.278516.02844.0036
580.0240.04130.032725.70316.99594.1226
590.02550.03950.033323.428617.58074.1929
600.0270.03930.033823.182518.04754.2482



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