Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 09 Jan 2008 06:52:09 -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/2008/Jan/09/t1199886614vwww5qa731tukm8.htm/, Retrieved Thu, 31 Oct 2024 23:53:41 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=7937, Retrieved Thu, 31 Oct 2024 23:53:41 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact310
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2008-01-09 13:52:09] [ba3202e2798d2e4685d19d988e9c69df] [Current]
Feedback Forum

Post a new message
Dataseries X:
92.81
59.04
72.81
91.81
68.07
49.16
124.61
109.89
110.51
114.77
92.37
103.63
90.43
65.86
83.33
94.49
68.98
55.46
132.89
121.71
127.01
134.04
106.48
117.55
101.61
82.66
89.28
109.24
88.16
59.23
164.21
125.13
152.68
132.96
112.42
136.43
107.32
87.61
97.86
106.60
92.17
65.31
161.49
162.25
175.13
147.28
144.48
122.67
102.27
88.64
89.59
112.20
91.98
57.85
160.49
128.33
140.69
126.61
129.27
124.27
112.90
92.54
85.70
116.72
92.08
58.98
154.50
145.55
146.60
143.51
113.52
104.80




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'George Udny Yule' @ 72.249.76.132

\begin{tabular}{lllllllll}
\hline
Summary of compuational 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 & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=7937&T=0

[TABLE]
[ROW][C]Summary of compuational 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]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=7937&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7937&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'George Udny Yule' @ 72.249.76.132







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[60])
48122.67-------
49102.27-------
5088.64-------
5189.59-------
52112.2-------
5391.98-------
5457.85-------
55160.49-------
56128.33-------
57140.69-------
58126.61-------
59129.27-------
60124.27-------
61112.994.39880.9669112.45080.02236e-040.19646e-04
6292.5484.809173.582399.54650.15191e-040.30520
6385.785.234273.3568101.08640.4770.18320.29510
64116.72106.308488.669131.45420.20850.94590.3230.0808
6592.0887.96474.8447105.89530.32648e-040.33030
6658.9856.177549.953663.95130.239900.33660
67154.5150.7816117.4481206.10830.44760.99940.36540.8262
68145.55122.088198.2246158.88960.10570.04220.36980.4537
69146.6133.6896105.6284178.76570.28730.3030.38040.6589
70143.51121.070996.9923158.55880.12040.0910.38610.4336
71113.52123.792598.577163.58580.30640.16570.39370.4906
72104.8119.401995.4488156.87580.22250.62080.39950.3995

\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[60]) \tabularnewline
48 & 122.67 & - & - & - & - & - & - & - \tabularnewline
49 & 102.27 & - & - & - & - & - & - & - \tabularnewline
50 & 88.64 & - & - & - & - & - & - & - \tabularnewline
51 & 89.59 & - & - & - & - & - & - & - \tabularnewline
52 & 112.2 & - & - & - & - & - & - & - \tabularnewline
53 & 91.98 & - & - & - & - & - & - & - \tabularnewline
54 & 57.85 & - & - & - & - & - & - & - \tabularnewline
55 & 160.49 & - & - & - & - & - & - & - \tabularnewline
56 & 128.33 & - & - & - & - & - & - & - \tabularnewline
57 & 140.69 & - & - & - & - & - & - & - \tabularnewline
58 & 126.61 & - & - & - & - & - & - & - \tabularnewline
59 & 129.27 & - & - & - & - & - & - & - \tabularnewline
60 & 124.27 & - & - & - & - & - & - & - \tabularnewline
61 & 112.9 & 94.398 & 80.9669 & 112.4508 & 0.0223 & 6e-04 & 0.1964 & 6e-04 \tabularnewline
62 & 92.54 & 84.8091 & 73.5823 & 99.5465 & 0.1519 & 1e-04 & 0.3052 & 0 \tabularnewline
63 & 85.7 & 85.2342 & 73.3568 & 101.0864 & 0.477 & 0.1832 & 0.2951 & 0 \tabularnewline
64 & 116.72 & 106.3084 & 88.669 & 131.4542 & 0.2085 & 0.9459 & 0.323 & 0.0808 \tabularnewline
65 & 92.08 & 87.964 & 74.8447 & 105.8953 & 0.3264 & 8e-04 & 0.3303 & 0 \tabularnewline
66 & 58.98 & 56.1775 & 49.9536 & 63.9513 & 0.2399 & 0 & 0.3366 & 0 \tabularnewline
67 & 154.5 & 150.7816 & 117.4481 & 206.1083 & 0.4476 & 0.9994 & 0.3654 & 0.8262 \tabularnewline
68 & 145.55 & 122.0881 & 98.2246 & 158.8896 & 0.1057 & 0.0422 & 0.3698 & 0.4537 \tabularnewline
69 & 146.6 & 133.6896 & 105.6284 & 178.7657 & 0.2873 & 0.303 & 0.3804 & 0.6589 \tabularnewline
70 & 143.51 & 121.0709 & 96.9923 & 158.5588 & 0.1204 & 0.091 & 0.3861 & 0.4336 \tabularnewline
71 & 113.52 & 123.7925 & 98.577 & 163.5858 & 0.3064 & 0.1657 & 0.3937 & 0.4906 \tabularnewline
72 & 104.8 & 119.4019 & 95.4488 & 156.8758 & 0.2225 & 0.6208 & 0.3995 & 0.3995 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=7937&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[60])[/C][/ROW]
[ROW][C]48[/C][C]122.67[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]102.27[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]88.64[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]89.59[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]112.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]91.98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]57.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]160.49[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]128.33[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]140.69[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]126.61[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]129.27[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]124.27[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]112.9[/C][C]94.398[/C][C]80.9669[/C][C]112.4508[/C][C]0.0223[/C][C]6e-04[/C][C]0.1964[/C][C]6e-04[/C][/ROW]
[ROW][C]62[/C][C]92.54[/C][C]84.8091[/C][C]73.5823[/C][C]99.5465[/C][C]0.1519[/C][C]1e-04[/C][C]0.3052[/C][C]0[/C][/ROW]
[ROW][C]63[/C][C]85.7[/C][C]85.2342[/C][C]73.3568[/C][C]101.0864[/C][C]0.477[/C][C]0.1832[/C][C]0.2951[/C][C]0[/C][/ROW]
[ROW][C]64[/C][C]116.72[/C][C]106.3084[/C][C]88.669[/C][C]131.4542[/C][C]0.2085[/C][C]0.9459[/C][C]0.323[/C][C]0.0808[/C][/ROW]
[ROW][C]65[/C][C]92.08[/C][C]87.964[/C][C]74.8447[/C][C]105.8953[/C][C]0.3264[/C][C]8e-04[/C][C]0.3303[/C][C]0[/C][/ROW]
[ROW][C]66[/C][C]58.98[/C][C]56.1775[/C][C]49.9536[/C][C]63.9513[/C][C]0.2399[/C][C]0[/C][C]0.3366[/C][C]0[/C][/ROW]
[ROW][C]67[/C][C]154.5[/C][C]150.7816[/C][C]117.4481[/C][C]206.1083[/C][C]0.4476[/C][C]0.9994[/C][C]0.3654[/C][C]0.8262[/C][/ROW]
[ROW][C]68[/C][C]145.55[/C][C]122.0881[/C][C]98.2246[/C][C]158.8896[/C][C]0.1057[/C][C]0.0422[/C][C]0.3698[/C][C]0.4537[/C][/ROW]
[ROW][C]69[/C][C]146.6[/C][C]133.6896[/C][C]105.6284[/C][C]178.7657[/C][C]0.2873[/C][C]0.303[/C][C]0.3804[/C][C]0.6589[/C][/ROW]
[ROW][C]70[/C][C]143.51[/C][C]121.0709[/C][C]96.9923[/C][C]158.5588[/C][C]0.1204[/C][C]0.091[/C][C]0.3861[/C][C]0.4336[/C][/ROW]
[ROW][C]71[/C][C]113.52[/C][C]123.7925[/C][C]98.577[/C][C]163.5858[/C][C]0.3064[/C][C]0.1657[/C][C]0.3937[/C][C]0.4906[/C][/ROW]
[ROW][C]72[/C][C]104.8[/C][C]119.4019[/C][C]95.4488[/C][C]156.8758[/C][C]0.2225[/C][C]0.6208[/C][C]0.3995[/C][C]0.3995[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=7937&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7937&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[60])
48122.67-------
49102.27-------
5088.64-------
5189.59-------
52112.2-------
5391.98-------
5457.85-------
55160.49-------
56128.33-------
57140.69-------
58126.61-------
59129.27-------
60124.27-------
61112.994.39880.9669112.45080.02236e-040.19646e-04
6292.5484.809173.582399.54650.15191e-040.30520
6385.785.234273.3568101.08640.4770.18320.29510
64116.72106.308488.669131.45420.20850.94590.3230.0808
6592.0887.96474.8447105.89530.32648e-040.33030
6658.9856.177549.953663.95130.239900.33660
67154.5150.7816117.4481206.10830.44760.99940.36540.8262
68145.55122.088198.2246158.88960.10570.04220.36980.4537
69146.6133.6896105.6284178.76570.28730.3030.38040.6589
70143.51121.070996.9923158.55880.12040.0910.38610.4336
71113.52123.792598.577163.58580.30640.16570.39370.4906
72104.8119.401995.4488156.87580.22250.62080.39950.3995







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.09760.1960.0163342.325628.52715.3411
620.08870.09120.007659.76614.98052.2317
630.09490.00555e-040.2170.01810.1345
640.12070.09790.0082108.4029.03353.0056
650.1040.04680.003916.94121.41181.1882
660.07060.04990.00427.85420.65450.809
670.18720.02470.002113.82661.15221.0734
680.15380.19220.016550.459145.87166.7729
690.1720.09660.008166.678713.88993.7269
700.1580.18530.0154503.515341.95966.4776
710.164-0.0830.0069105.52518.79382.9654
720.1601-0.12230.0102213.216717.76814.2152

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.0976 & 0.196 & 0.0163 & 342.3256 & 28.5271 & 5.3411 \tabularnewline
62 & 0.0887 & 0.0912 & 0.0076 & 59.7661 & 4.9805 & 2.2317 \tabularnewline
63 & 0.0949 & 0.0055 & 5e-04 & 0.217 & 0.0181 & 0.1345 \tabularnewline
64 & 0.1207 & 0.0979 & 0.0082 & 108.402 & 9.0335 & 3.0056 \tabularnewline
65 & 0.104 & 0.0468 & 0.0039 & 16.9412 & 1.4118 & 1.1882 \tabularnewline
66 & 0.0706 & 0.0499 & 0.0042 & 7.8542 & 0.6545 & 0.809 \tabularnewline
67 & 0.1872 & 0.0247 & 0.0021 & 13.8266 & 1.1522 & 1.0734 \tabularnewline
68 & 0.1538 & 0.1922 & 0.016 & 550.4591 & 45.8716 & 6.7729 \tabularnewline
69 & 0.172 & 0.0966 & 0.008 & 166.6787 & 13.8899 & 3.7269 \tabularnewline
70 & 0.158 & 0.1853 & 0.0154 & 503.5153 & 41.9596 & 6.4776 \tabularnewline
71 & 0.164 & -0.083 & 0.0069 & 105.5251 & 8.7938 & 2.9654 \tabularnewline
72 & 0.1601 & -0.1223 & 0.0102 & 213.2167 & 17.7681 & 4.2152 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=7937&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]61[/C][C]0.0976[/C][C]0.196[/C][C]0.0163[/C][C]342.3256[/C][C]28.5271[/C][C]5.3411[/C][/ROW]
[ROW][C]62[/C][C]0.0887[/C][C]0.0912[/C][C]0.0076[/C][C]59.7661[/C][C]4.9805[/C][C]2.2317[/C][/ROW]
[ROW][C]63[/C][C]0.0949[/C][C]0.0055[/C][C]5e-04[/C][C]0.217[/C][C]0.0181[/C][C]0.1345[/C][/ROW]
[ROW][C]64[/C][C]0.1207[/C][C]0.0979[/C][C]0.0082[/C][C]108.402[/C][C]9.0335[/C][C]3.0056[/C][/ROW]
[ROW][C]65[/C][C]0.104[/C][C]0.0468[/C][C]0.0039[/C][C]16.9412[/C][C]1.4118[/C][C]1.1882[/C][/ROW]
[ROW][C]66[/C][C]0.0706[/C][C]0.0499[/C][C]0.0042[/C][C]7.8542[/C][C]0.6545[/C][C]0.809[/C][/ROW]
[ROW][C]67[/C][C]0.1872[/C][C]0.0247[/C][C]0.0021[/C][C]13.8266[/C][C]1.1522[/C][C]1.0734[/C][/ROW]
[ROW][C]68[/C][C]0.1538[/C][C]0.1922[/C][C]0.016[/C][C]550.4591[/C][C]45.8716[/C][C]6.7729[/C][/ROW]
[ROW][C]69[/C][C]0.172[/C][C]0.0966[/C][C]0.008[/C][C]166.6787[/C][C]13.8899[/C][C]3.7269[/C][/ROW]
[ROW][C]70[/C][C]0.158[/C][C]0.1853[/C][C]0.0154[/C][C]503.5153[/C][C]41.9596[/C][C]6.4776[/C][/ROW]
[ROW][C]71[/C][C]0.164[/C][C]-0.083[/C][C]0.0069[/C][C]105.5251[/C][C]8.7938[/C][C]2.9654[/C][/ROW]
[ROW][C]72[/C][C]0.1601[/C][C]-0.1223[/C][C]0.0102[/C][C]213.2167[/C][C]17.7681[/C][C]4.2152[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=7937&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7937&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
610.09760.1960.0163342.325628.52715.3411
620.08870.09120.007659.76614.98052.2317
630.09490.00555e-040.2170.01810.1345
640.12070.09790.0082108.4029.03353.0056
650.1040.04680.003916.94121.41181.1882
660.07060.04990.00427.85420.65450.809
670.18720.02470.002113.82661.15221.0734
680.15380.19220.016550.459145.87166.7729
690.1720.09660.008166.678713.88993.7269
700.1580.18530.0154503.515341.95966.4776
710.164-0.0830.0069105.52518.79382.9654
720.1601-0.12230.0102213.216717.76814.2152



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