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, 19 Dec 2009 11:16:59 -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/19/t1261246648l7gn6cj71oqn42x.htm/, Retrieved Fri, 03 May 2024 23:22:15 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=69731, Retrieved Fri, 03 May 2024 23:22:15 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact121
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [] [2009-12-07 09:54:52] [b98453cac15ba1066b407e146608df68]
- R PD  [ARIMA Forecasting] [Forecasting] [2009-12-17 18:28:53] [1eab65e90adf64584b8e6f0da23ff414]
-   PD      [ARIMA Forecasting] [Forecasting 1A] [2009-12-19 18:16:59] [0f1f1142419956a95ff6f880845f2408] [Current]
Feedback Forum

Post a new message
Dataseries X:
100.5
106.29
101.09
104.53
122.74
109.84
101.99
125.12
103.5
102.8
118.72
119.01
118.61
120.43
111.83
116.79
131.71
120.57
117.83
130.8
107.46
112.09
129.47
119.72
134.81
135.8
129.27
126.94
153.45
121.86
133.47
135.34
117.1
120.65
132.49
137.6
138.69
125.53
133.09
129.08
145.94
129.07
139.69
142.09
137.29
127.03
137.25
156.87
150.89
139.14
158.3
149
158.36
168.06
153.38
173.86
162.47
145.17
168.89
166.64
140.07
128.84
123.41
120.3
129.67
118.1
113.91
131.09
119.15
122.3




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69731&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[58])
46127.03-------
47137.25-------
48156.87-------
49150.89-------
50139.14-------
51158.3-------
52149-------
53158.36-------
54168.06-------
55153.38-------
56173.86-------
57162.47-------
58145.17-------
59168.89164.7523148.1098183.26490.33070.98090.99820.9809
60166.64183.3112164.6983204.02770.05740.91380.99380.9998
61140.07176.1354156.8929197.73815e-040.80550.9890.9975
62128.84164.8679144.449188.17320.00120.98150.98480.9512
63123.41185.1217161.6962211.9408010.9750.9982
64120.3174.9838151.4505202.17400.99990.96950.9842
65129.67186.5312160.1454217.26441e-0410.96380.9958
66118.1196.9833168.2891230.5699010.95430.9988
67113.91180.3093152.9021212.629300.99990.94880.9835
68131.09204.357172.2492242.44981e-0410.94170.9988
69119.15190.6989159.8648227.48011e-040.99930.93370.9924
70122.3170.6261142.161204.79090.00280.99840.92790.9279

\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[58]) \tabularnewline
46 & 127.03 & - & - & - & - & - & - & - \tabularnewline
47 & 137.25 & - & - & - & - & - & - & - \tabularnewline
48 & 156.87 & - & - & - & - & - & - & - \tabularnewline
49 & 150.89 & - & - & - & - & - & - & - \tabularnewline
50 & 139.14 & - & - & - & - & - & - & - \tabularnewline
51 & 158.3 & - & - & - & - & - & - & - \tabularnewline
52 & 149 & - & - & - & - & - & - & - \tabularnewline
53 & 158.36 & - & - & - & - & - & - & - \tabularnewline
54 & 168.06 & - & - & - & - & - & - & - \tabularnewline
55 & 153.38 & - & - & - & - & - & - & - \tabularnewline
56 & 173.86 & - & - & - & - & - & - & - \tabularnewline
57 & 162.47 & - & - & - & - & - & - & - \tabularnewline
58 & 145.17 & - & - & - & - & - & - & - \tabularnewline
59 & 168.89 & 164.7523 & 148.1098 & 183.2649 & 0.3307 & 0.9809 & 0.9982 & 0.9809 \tabularnewline
60 & 166.64 & 183.3112 & 164.6983 & 204.0277 & 0.0574 & 0.9138 & 0.9938 & 0.9998 \tabularnewline
61 & 140.07 & 176.1354 & 156.8929 & 197.7381 & 5e-04 & 0.8055 & 0.989 & 0.9975 \tabularnewline
62 & 128.84 & 164.8679 & 144.449 & 188.1732 & 0.0012 & 0.9815 & 0.9848 & 0.9512 \tabularnewline
63 & 123.41 & 185.1217 & 161.6962 & 211.9408 & 0 & 1 & 0.975 & 0.9982 \tabularnewline
64 & 120.3 & 174.9838 & 151.4505 & 202.174 & 0 & 0.9999 & 0.9695 & 0.9842 \tabularnewline
65 & 129.67 & 186.5312 & 160.1454 & 217.2644 & 1e-04 & 1 & 0.9638 & 0.9958 \tabularnewline
66 & 118.1 & 196.9833 & 168.2891 & 230.5699 & 0 & 1 & 0.9543 & 0.9988 \tabularnewline
67 & 113.91 & 180.3093 & 152.9021 & 212.6293 & 0 & 0.9999 & 0.9488 & 0.9835 \tabularnewline
68 & 131.09 & 204.357 & 172.2492 & 242.4498 & 1e-04 & 1 & 0.9417 & 0.9988 \tabularnewline
69 & 119.15 & 190.6989 & 159.8648 & 227.4801 & 1e-04 & 0.9993 & 0.9337 & 0.9924 \tabularnewline
70 & 122.3 & 170.6261 & 142.161 & 204.7909 & 0.0028 & 0.9984 & 0.9279 & 0.9279 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69731&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[58])[/C][/ROW]
[ROW][C]46[/C][C]127.03[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]137.25[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]156.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]150.89[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]139.14[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]158.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]149[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]158.36[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]168.06[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]153.38[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]173.86[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]162.47[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]145.17[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]168.89[/C][C]164.7523[/C][C]148.1098[/C][C]183.2649[/C][C]0.3307[/C][C]0.9809[/C][C]0.9982[/C][C]0.9809[/C][/ROW]
[ROW][C]60[/C][C]166.64[/C][C]183.3112[/C][C]164.6983[/C][C]204.0277[/C][C]0.0574[/C][C]0.9138[/C][C]0.9938[/C][C]0.9998[/C][/ROW]
[ROW][C]61[/C][C]140.07[/C][C]176.1354[/C][C]156.8929[/C][C]197.7381[/C][C]5e-04[/C][C]0.8055[/C][C]0.989[/C][C]0.9975[/C][/ROW]
[ROW][C]62[/C][C]128.84[/C][C]164.8679[/C][C]144.449[/C][C]188.1732[/C][C]0.0012[/C][C]0.9815[/C][C]0.9848[/C][C]0.9512[/C][/ROW]
[ROW][C]63[/C][C]123.41[/C][C]185.1217[/C][C]161.6962[/C][C]211.9408[/C][C]0[/C][C]1[/C][C]0.975[/C][C]0.9982[/C][/ROW]
[ROW][C]64[/C][C]120.3[/C][C]174.9838[/C][C]151.4505[/C][C]202.174[/C][C]0[/C][C]0.9999[/C][C]0.9695[/C][C]0.9842[/C][/ROW]
[ROW][C]65[/C][C]129.67[/C][C]186.5312[/C][C]160.1454[/C][C]217.2644[/C][C]1e-04[/C][C]1[/C][C]0.9638[/C][C]0.9958[/C][/ROW]
[ROW][C]66[/C][C]118.1[/C][C]196.9833[/C][C]168.2891[/C][C]230.5699[/C][C]0[/C][C]1[/C][C]0.9543[/C][C]0.9988[/C][/ROW]
[ROW][C]67[/C][C]113.91[/C][C]180.3093[/C][C]152.9021[/C][C]212.6293[/C][C]0[/C][C]0.9999[/C][C]0.9488[/C][C]0.9835[/C][/ROW]
[ROW][C]68[/C][C]131.09[/C][C]204.357[/C][C]172.2492[/C][C]242.4498[/C][C]1e-04[/C][C]1[/C][C]0.9417[/C][C]0.9988[/C][/ROW]
[ROW][C]69[/C][C]119.15[/C][C]190.6989[/C][C]159.8648[/C][C]227.4801[/C][C]1e-04[/C][C]0.9993[/C][C]0.9337[/C][C]0.9924[/C][/ROW]
[ROW][C]70[/C][C]122.3[/C][C]170.6261[/C][C]142.161[/C][C]204.7909[/C][C]0.0028[/C][C]0.9984[/C][C]0.9279[/C][C]0.9279[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69731&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69731&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[58])
46127.03-------
47137.25-------
48156.87-------
49150.89-------
50139.14-------
51158.3-------
52149-------
53158.36-------
54168.06-------
55153.38-------
56173.86-------
57162.47-------
58145.17-------
59168.89164.7523148.1098183.26490.33070.98090.99820.9809
60166.64183.3112164.6983204.02770.05740.91380.99380.9998
61140.07176.1354156.8929197.73815e-040.80550.9890.9975
62128.84164.8679144.449188.17320.00120.98150.98480.9512
63123.41185.1217161.6962211.9408010.9750.9982
64120.3174.9838151.4505202.17400.99990.96950.9842
65129.67186.5312160.1454217.26441e-0410.96380.9958
66118.1196.9833168.2891230.5699010.95430.9988
67113.91180.3093152.9021212.629300.99990.94880.9835
68131.09204.357172.2492242.44981e-0410.94170.9988
69119.15190.6989159.8648227.48011e-040.99930.93370.9924
70122.3170.6261142.161204.79090.00280.99840.92790.9279







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
590.05730.0251017.120400
600.0577-0.09090.058277.9302147.525312.146
610.0626-0.20480.10691300.7164531.922323.0634
620.0721-0.21850.13481298.0084723.443826.8969
630.0739-0.33340.17453808.33061340.421236.6118
640.0793-0.31250.19752990.32241615.404740.1921
650.0841-0.30480.21293233.19781846.51842.9711
660.087-0.40050.23636222.56762393.524248.9237
670.0915-0.36830.2514408.87312617.451951.161
680.0951-0.35850.26175368.04842892.511553.7821
690.0984-0.37520.2725119.24483094.941855.6322
700.1022-0.28320.2732335.41473031.647955.0604

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
59 & 0.0573 & 0.0251 & 0 & 17.1204 & 0 & 0 \tabularnewline
60 & 0.0577 & -0.0909 & 0.058 & 277.9302 & 147.5253 & 12.146 \tabularnewline
61 & 0.0626 & -0.2048 & 0.1069 & 1300.7164 & 531.9223 & 23.0634 \tabularnewline
62 & 0.0721 & -0.2185 & 0.1348 & 1298.0084 & 723.4438 & 26.8969 \tabularnewline
63 & 0.0739 & -0.3334 & 0.1745 & 3808.3306 & 1340.4212 & 36.6118 \tabularnewline
64 & 0.0793 & -0.3125 & 0.1975 & 2990.3224 & 1615.4047 & 40.1921 \tabularnewline
65 & 0.0841 & -0.3048 & 0.2129 & 3233.1978 & 1846.518 & 42.9711 \tabularnewline
66 & 0.087 & -0.4005 & 0.2363 & 6222.5676 & 2393.5242 & 48.9237 \tabularnewline
67 & 0.0915 & -0.3683 & 0.251 & 4408.8731 & 2617.4519 & 51.161 \tabularnewline
68 & 0.0951 & -0.3585 & 0.2617 & 5368.0484 & 2892.5115 & 53.7821 \tabularnewline
69 & 0.0984 & -0.3752 & 0.272 & 5119.2448 & 3094.9418 & 55.6322 \tabularnewline
70 & 0.1022 & -0.2832 & 0.273 & 2335.4147 & 3031.6479 & 55.0604 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69731&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]59[/C][C]0.0573[/C][C]0.0251[/C][C]0[/C][C]17.1204[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]60[/C][C]0.0577[/C][C]-0.0909[/C][C]0.058[/C][C]277.9302[/C][C]147.5253[/C][C]12.146[/C][/ROW]
[ROW][C]61[/C][C]0.0626[/C][C]-0.2048[/C][C]0.1069[/C][C]1300.7164[/C][C]531.9223[/C][C]23.0634[/C][/ROW]
[ROW][C]62[/C][C]0.0721[/C][C]-0.2185[/C][C]0.1348[/C][C]1298.0084[/C][C]723.4438[/C][C]26.8969[/C][/ROW]
[ROW][C]63[/C][C]0.0739[/C][C]-0.3334[/C][C]0.1745[/C][C]3808.3306[/C][C]1340.4212[/C][C]36.6118[/C][/ROW]
[ROW][C]64[/C][C]0.0793[/C][C]-0.3125[/C][C]0.1975[/C][C]2990.3224[/C][C]1615.4047[/C][C]40.1921[/C][/ROW]
[ROW][C]65[/C][C]0.0841[/C][C]-0.3048[/C][C]0.2129[/C][C]3233.1978[/C][C]1846.518[/C][C]42.9711[/C][/ROW]
[ROW][C]66[/C][C]0.087[/C][C]-0.4005[/C][C]0.2363[/C][C]6222.5676[/C][C]2393.5242[/C][C]48.9237[/C][/ROW]
[ROW][C]67[/C][C]0.0915[/C][C]-0.3683[/C][C]0.251[/C][C]4408.8731[/C][C]2617.4519[/C][C]51.161[/C][/ROW]
[ROW][C]68[/C][C]0.0951[/C][C]-0.3585[/C][C]0.2617[/C][C]5368.0484[/C][C]2892.5115[/C][C]53.7821[/C][/ROW]
[ROW][C]69[/C][C]0.0984[/C][C]-0.3752[/C][C]0.272[/C][C]5119.2448[/C][C]3094.9418[/C][C]55.6322[/C][/ROW]
[ROW][C]70[/C][C]0.1022[/C][C]-0.2832[/C][C]0.273[/C][C]2335.4147[/C][C]3031.6479[/C][C]55.0604[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69731&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69731&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
590.05730.0251017.120400
600.0577-0.09090.058277.9302147.525312.146
610.0626-0.20480.10691300.7164531.922323.0634
620.0721-0.21850.13481298.0084723.443826.8969
630.0739-0.33340.17453808.33061340.421236.6118
640.0793-0.31250.19752990.32241615.404740.1921
650.0841-0.30480.21293233.19781846.51842.9711
660.087-0.40050.23636222.56762393.524248.9237
670.0915-0.36830.2514408.87312617.451951.161
680.0951-0.35850.26175368.04842892.511553.7821
690.0984-0.37520.2725119.24483094.941855.6322
700.1022-0.28320.2732335.41473031.647955.0604



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