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 computationThu, 17 Dec 2009 03:05:16 -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/17/t1261044391wkyefgokgh5h0m1.htm/, Retrieved Tue, 30 Apr 2024 04:15:14 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=68687, Retrieved Tue, 30 Apr 2024 04:15:14 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact191
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]
-    D  [ARIMA Forecasting] [WS10 Forecasting] [2009-12-10 22:24:01] [5c968c05ca472afa314d272082b56b09]
F   PD    [ARIMA Forecasting] [Workshop 10] [2009-12-11 20:28:46] [b6394cb5c2dcec6d17418d3cdf42d699]
- R P         [ARIMA Forecasting] [WS 10 Review 1 1] [2009-12-17 10:05:16] [eba9f01697e64705b70041e6f338cb22] [Current]
Feedback Forum

Post a new message
Dataseries X:
15.89
16.93
20.28
22.52
23.51
22.59
23.51
24.76
26.08
25.29
23.38
25.29
28.42
31.85
30.1
25.45
24.95
26.84
27.52
27.94
25.23
26.53
27.21
28.53
30.35
31.21
32.86
33.2
35.73
34.53
36.54
40.1
40.56
46.14
42.85
38.22
40.18
42.19
47.56
47.26
44.03
49.83
53.35
58.9
59.64
56.99
53.2
53.24
57.85
55.69
55.64
62.52
64.4
64.65
67.71
67.21
59.37
53.26
52.42
55.03




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68687&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 time4 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])
3638.22-------
3740.18-------
3842.19-------
3947.56-------
4047.26-------
4144.03-------
4249.83-------
4353.35-------
4458.9000000000001-------
4559.64-------
4656.99-------
4753.2-------
4853.24-------
4957.8557.431651.822663.58130.4470.909210.9092
5055.6957.277248.511867.44310.37980.4560.99820.7818
5155.6456.410945.918369.01420.45230.54460.91570.689
5262.5255.223343.431169.82270.16360.47770.85750.605
5364.458.377244.944375.32130.2430.31590.95150.7238
5464.6561.87146.563681.56720.39110.40060.88460.8048
5567.7161.98945.512283.65250.30240.40490.78280.7857
5667.2160.592143.326783.82020.28830.2740.55680.7325
5759.3759.802241.890584.33410.48620.2770.50520.7
5853.2663.618543.912190.95520.22880.61970.68270.7716
5952.4264.655943.922593.81610.20540.77820.77940.7786
6055.0363.131542.02393.3450.29960.75640.73950.7395

\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 & 38.22 & - & - & - & - & - & - & - \tabularnewline
37 & 40.18 & - & - & - & - & - & - & - \tabularnewline
38 & 42.19 & - & - & - & - & - & - & - \tabularnewline
39 & 47.56 & - & - & - & - & - & - & - \tabularnewline
40 & 47.26 & - & - & - & - & - & - & - \tabularnewline
41 & 44.03 & - & - & - & - & - & - & - \tabularnewline
42 & 49.83 & - & - & - & - & - & - & - \tabularnewline
43 & 53.35 & - & - & - & - & - & - & - \tabularnewline
44 & 58.9000000000001 & - & - & - & - & - & - & - \tabularnewline
45 & 59.64 & - & - & - & - & - & - & - \tabularnewline
46 & 56.99 & - & - & - & - & - & - & - \tabularnewline
47 & 53.2 & - & - & - & - & - & - & - \tabularnewline
48 & 53.24 & - & - & - & - & - & - & - \tabularnewline
49 & 57.85 & 57.4316 & 51.8226 & 63.5813 & 0.447 & 0.9092 & 1 & 0.9092 \tabularnewline
50 & 55.69 & 57.2772 & 48.5118 & 67.4431 & 0.3798 & 0.456 & 0.9982 & 0.7818 \tabularnewline
51 & 55.64 & 56.4109 & 45.9183 & 69.0142 & 0.4523 & 0.5446 & 0.9157 & 0.689 \tabularnewline
52 & 62.52 & 55.2233 & 43.4311 & 69.8227 & 0.1636 & 0.4777 & 0.8575 & 0.605 \tabularnewline
53 & 64.4 & 58.3772 & 44.9443 & 75.3213 & 0.243 & 0.3159 & 0.9515 & 0.7238 \tabularnewline
54 & 64.65 & 61.871 & 46.5636 & 81.5672 & 0.3911 & 0.4006 & 0.8846 & 0.8048 \tabularnewline
55 & 67.71 & 61.989 & 45.5122 & 83.6525 & 0.3024 & 0.4049 & 0.7828 & 0.7857 \tabularnewline
56 & 67.21 & 60.5921 & 43.3267 & 83.8202 & 0.2883 & 0.274 & 0.5568 & 0.7325 \tabularnewline
57 & 59.37 & 59.8022 & 41.8905 & 84.3341 & 0.4862 & 0.277 & 0.5052 & 0.7 \tabularnewline
58 & 53.26 & 63.6185 & 43.9121 & 90.9552 & 0.2288 & 0.6197 & 0.6827 & 0.7716 \tabularnewline
59 & 52.42 & 64.6559 & 43.9225 & 93.8161 & 0.2054 & 0.7782 & 0.7794 & 0.7786 \tabularnewline
60 & 55.03 & 63.1315 & 42.023 & 93.345 & 0.2996 & 0.7564 & 0.7395 & 0.7395 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68687&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]38.22[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]40.18[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]42.19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]47.56[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]47.26[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]44.03[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]49.83[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]53.35[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]58.9000000000001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]59.64[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]56.99[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]53.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]53.24[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]57.85[/C][C]57.4316[/C][C]51.8226[/C][C]63.5813[/C][C]0.447[/C][C]0.9092[/C][C]1[/C][C]0.9092[/C][/ROW]
[ROW][C]50[/C][C]55.69[/C][C]57.2772[/C][C]48.5118[/C][C]67.4431[/C][C]0.3798[/C][C]0.456[/C][C]0.9982[/C][C]0.7818[/C][/ROW]
[ROW][C]51[/C][C]55.64[/C][C]56.4109[/C][C]45.9183[/C][C]69.0142[/C][C]0.4523[/C][C]0.5446[/C][C]0.9157[/C][C]0.689[/C][/ROW]
[ROW][C]52[/C][C]62.52[/C][C]55.2233[/C][C]43.4311[/C][C]69.8227[/C][C]0.1636[/C][C]0.4777[/C][C]0.8575[/C][C]0.605[/C][/ROW]
[ROW][C]53[/C][C]64.4[/C][C]58.3772[/C][C]44.9443[/C][C]75.3213[/C][C]0.243[/C][C]0.3159[/C][C]0.9515[/C][C]0.7238[/C][/ROW]
[ROW][C]54[/C][C]64.65[/C][C]61.871[/C][C]46.5636[/C][C]81.5672[/C][C]0.3911[/C][C]0.4006[/C][C]0.8846[/C][C]0.8048[/C][/ROW]
[ROW][C]55[/C][C]67.71[/C][C]61.989[/C][C]45.5122[/C][C]83.6525[/C][C]0.3024[/C][C]0.4049[/C][C]0.7828[/C][C]0.7857[/C][/ROW]
[ROW][C]56[/C][C]67.21[/C][C]60.5921[/C][C]43.3267[/C][C]83.8202[/C][C]0.2883[/C][C]0.274[/C][C]0.5568[/C][C]0.7325[/C][/ROW]
[ROW][C]57[/C][C]59.37[/C][C]59.8022[/C][C]41.8905[/C][C]84.3341[/C][C]0.4862[/C][C]0.277[/C][C]0.5052[/C][C]0.7[/C][/ROW]
[ROW][C]58[/C][C]53.26[/C][C]63.6185[/C][C]43.9121[/C][C]90.9552[/C][C]0.2288[/C][C]0.6197[/C][C]0.6827[/C][C]0.7716[/C][/ROW]
[ROW][C]59[/C][C]52.42[/C][C]64.6559[/C][C]43.9225[/C][C]93.8161[/C][C]0.2054[/C][C]0.7782[/C][C]0.7794[/C][C]0.7786[/C][/ROW]
[ROW][C]60[/C][C]55.03[/C][C]63.1315[/C][C]42.023[/C][C]93.345[/C][C]0.2996[/C][C]0.7564[/C][C]0.7395[/C][C]0.7395[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=68687&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68687&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])
3638.22-------
3740.18-------
3842.19-------
3947.56-------
4047.26-------
4144.03-------
4249.83-------
4353.35-------
4458.9000000000001-------
4559.64-------
4656.99-------
4753.2-------
4853.24-------
4957.8557.431651.822663.58130.4470.909210.9092
5055.6957.277248.511867.44310.37980.4560.99820.7818
5155.6456.410945.918369.01420.45230.54460.91570.689
5262.5255.223343.431169.82270.16360.47770.85750.605
5364.458.377244.944375.32130.2430.31590.95150.7238
5464.6561.87146.563681.56720.39110.40060.88460.8048
5567.7161.98945.512283.65250.30240.40490.78280.7857
5667.2160.592143.326783.82020.28830.2740.55680.7325
5759.3759.802241.890584.33410.48620.2770.50520.7
5853.2663.618543.912190.95520.22880.61970.68270.7716
5952.4264.655943.922593.81610.20540.77820.77940.7786
6055.0363.131542.02393.3450.29960.75640.73950.7395







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.05460.007300.17500
500.0906-0.02770.01752.51931.34721.1607
510.114-0.01370.01620.59431.09621.047
520.13490.13210.045253.241914.13273.7593
530.14810.10320.056836.273918.56094.3082
540.16240.04490.05487.722916.75464.0932
550.17830.09230.060232.729819.03684.3631
560.19560.10920.066343.796822.13184.7044
570.2093-0.00720.05970.186819.69344.4377
580.2192-0.16280.07107.299328.4545.3342
590.2301-0.18920.0809149.716139.47786.2831
600.2442-0.12830.084865.63441.65756.4543

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0546 & 0.0073 & 0 & 0.175 & 0 & 0 \tabularnewline
50 & 0.0906 & -0.0277 & 0.0175 & 2.5193 & 1.3472 & 1.1607 \tabularnewline
51 & 0.114 & -0.0137 & 0.0162 & 0.5943 & 1.0962 & 1.047 \tabularnewline
52 & 0.1349 & 0.1321 & 0.0452 & 53.2419 & 14.1327 & 3.7593 \tabularnewline
53 & 0.1481 & 0.1032 & 0.0568 & 36.2739 & 18.5609 & 4.3082 \tabularnewline
54 & 0.1624 & 0.0449 & 0.0548 & 7.7229 & 16.7546 & 4.0932 \tabularnewline
55 & 0.1783 & 0.0923 & 0.0602 & 32.7298 & 19.0368 & 4.3631 \tabularnewline
56 & 0.1956 & 0.1092 & 0.0663 & 43.7968 & 22.1318 & 4.7044 \tabularnewline
57 & 0.2093 & -0.0072 & 0.0597 & 0.1868 & 19.6934 & 4.4377 \tabularnewline
58 & 0.2192 & -0.1628 & 0.07 & 107.2993 & 28.454 & 5.3342 \tabularnewline
59 & 0.2301 & -0.1892 & 0.0809 & 149.7161 & 39.4778 & 6.2831 \tabularnewline
60 & 0.2442 & -0.1283 & 0.0848 & 65.634 & 41.6575 & 6.4543 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68687&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.0546[/C][C]0.0073[/C][C]0[/C][C]0.175[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.0906[/C][C]-0.0277[/C][C]0.0175[/C][C]2.5193[/C][C]1.3472[/C][C]1.1607[/C][/ROW]
[ROW][C]51[/C][C]0.114[/C][C]-0.0137[/C][C]0.0162[/C][C]0.5943[/C][C]1.0962[/C][C]1.047[/C][/ROW]
[ROW][C]52[/C][C]0.1349[/C][C]0.1321[/C][C]0.0452[/C][C]53.2419[/C][C]14.1327[/C][C]3.7593[/C][/ROW]
[ROW][C]53[/C][C]0.1481[/C][C]0.1032[/C][C]0.0568[/C][C]36.2739[/C][C]18.5609[/C][C]4.3082[/C][/ROW]
[ROW][C]54[/C][C]0.1624[/C][C]0.0449[/C][C]0.0548[/C][C]7.7229[/C][C]16.7546[/C][C]4.0932[/C][/ROW]
[ROW][C]55[/C][C]0.1783[/C][C]0.0923[/C][C]0.0602[/C][C]32.7298[/C][C]19.0368[/C][C]4.3631[/C][/ROW]
[ROW][C]56[/C][C]0.1956[/C][C]0.1092[/C][C]0.0663[/C][C]43.7968[/C][C]22.1318[/C][C]4.7044[/C][/ROW]
[ROW][C]57[/C][C]0.2093[/C][C]-0.0072[/C][C]0.0597[/C][C]0.1868[/C][C]19.6934[/C][C]4.4377[/C][/ROW]
[ROW][C]58[/C][C]0.2192[/C][C]-0.1628[/C][C]0.07[/C][C]107.2993[/C][C]28.454[/C][C]5.3342[/C][/ROW]
[ROW][C]59[/C][C]0.2301[/C][C]-0.1892[/C][C]0.0809[/C][C]149.7161[/C][C]39.4778[/C][C]6.2831[/C][/ROW]
[ROW][C]60[/C][C]0.2442[/C][C]-0.1283[/C][C]0.0848[/C][C]65.634[/C][C]41.6575[/C][C]6.4543[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=68687&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68687&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.05460.007300.17500
500.0906-0.02770.01752.51931.34721.1607
510.114-0.01370.01620.59431.09621.047
520.13490.13210.045253.241914.13273.7593
530.14810.10320.056836.273918.56094.3082
540.16240.04490.05487.722916.75464.0932
550.17830.09230.060232.729819.03684.3631
560.19560.10920.066343.796822.13184.7044
570.2093-0.00720.05970.186819.69344.4377
580.2192-0.16280.07107.299328.4545.3342
590.2301-0.18920.0809149.716139.47786.2831
600.2442-0.12830.084865.63441.65756.4543



Parameters (Session):
par1 = 12 ; par2 = 0.1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 2 ; par7 = 0 ; par8 = 1 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 0.1 ; par3 = 1 ; par4 = 0 ; par5 = 12 ; par6 = 2 ; par7 = 0 ; par8 = 1 ; par9 = 1 ; par10 = FALSE ;
R code (references can be found in the software module):
par1 <- as.numeric(par1) #cut off periods
par1 <- 12
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
par6 <- 3
par7 <- as.numeric(par7) #q
par7 <- 3
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')