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, 13 Dec 2008 08:45:08 -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/Dec/13/t1229183280pskxlzabbw8uxdg.htm/, Retrieved Sun, 19 May 2024 07:10:10 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33159, Retrieved Sun, 19 May 2024 07:10:10 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact181
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [marlies.polfliet_...] [2008-12-13 15:39:27] [fdc296cbeb5d8064cb0dbd634c3fdc55]
-   PD    [ARIMA Forecasting] [marlies.polfliet_...] [2008-12-13 15:45:08] [e221948dd14811c7d88a6530ac2a8702] [Current]
Feedback Forum

Post a new message
Dataseries X:
71.7
77.5
89.8
80.3
78.7
93.8
57.6
60.6
91
85.3
77.4
77.3
68.3
69.9
81.7
75.1
69.9
84
54.3
60
89.9
77
85.3
77.6
69.2
75.5
85.7
72.2
79.9
85.3
52.2
61.2
82.4
85.4
78.2
70.2
70.2
69.3
77.5
66.1
69
79.2
56.2
63.3
77.8
92
78.1
65.1
71.1
70.9
72
81.9
70.6
72.5
65.1
61.1




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

\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 & 1 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33159&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]1 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=33159&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33159&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 time1 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[44])
3261.2-------
3382.4-------
3485.4-------
3578.2-------
3670.2-------
3770.2-------
3869.3-------
3977.5-------
4066.1-------
4169-------
4279.2-------
4356.2-------
4463.3-------
4577.884.818475.362395.46110.098110.6721
469280.307871.033590.79290.01440.68040.17060.9993
4778.177.975268.67188.540.49080.00460.48340.9968
4865.172.504163.584882.67460.07680.14040.67150.9619
4971.166.996858.562676.64560.20230.650.25760.7737
5070.969.613660.617479.94510.40360.3890.52370.8845
517279.438968.915591.56920.11470.91620.6230.9954
5281.969.262159.868980.1290.01130.31070.71580.8589
5370.670.75260.940482.14330.48960.02750.61850.9001
5472.581.075269.590794.4550.10450.93750.60820.9954
5565.152.77145.142761.68830.003400.22550.0103
5661.159.029550.329569.23340.34540.12180.2060.206

\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[44]) \tabularnewline
32 & 61.2 & - & - & - & - & - & - & - \tabularnewline
33 & 82.4 & - & - & - & - & - & - & - \tabularnewline
34 & 85.4 & - & - & - & - & - & - & - \tabularnewline
35 & 78.2 & - & - & - & - & - & - & - \tabularnewline
36 & 70.2 & - & - & - & - & - & - & - \tabularnewline
37 & 70.2 & - & - & - & - & - & - & - \tabularnewline
38 & 69.3 & - & - & - & - & - & - & - \tabularnewline
39 & 77.5 & - & - & - & - & - & - & - \tabularnewline
40 & 66.1 & - & - & - & - & - & - & - \tabularnewline
41 & 69 & - & - & - & - & - & - & - \tabularnewline
42 & 79.2 & - & - & - & - & - & - & - \tabularnewline
43 & 56.2 & - & - & - & - & - & - & - \tabularnewline
44 & 63.3 & - & - & - & - & - & - & - \tabularnewline
45 & 77.8 & 84.8184 & 75.3623 & 95.4611 & 0.0981 & 1 & 0.672 & 1 \tabularnewline
46 & 92 & 80.3078 & 71.0335 & 90.7929 & 0.0144 & 0.6804 & 0.1706 & 0.9993 \tabularnewline
47 & 78.1 & 77.9752 & 68.671 & 88.54 & 0.4908 & 0.0046 & 0.4834 & 0.9968 \tabularnewline
48 & 65.1 & 72.5041 & 63.5848 & 82.6746 & 0.0768 & 0.1404 & 0.6715 & 0.9619 \tabularnewline
49 & 71.1 & 66.9968 & 58.5626 & 76.6456 & 0.2023 & 0.65 & 0.2576 & 0.7737 \tabularnewline
50 & 70.9 & 69.6136 & 60.6174 & 79.9451 & 0.4036 & 0.389 & 0.5237 & 0.8845 \tabularnewline
51 & 72 & 79.4389 & 68.9155 & 91.5692 & 0.1147 & 0.9162 & 0.623 & 0.9954 \tabularnewline
52 & 81.9 & 69.2621 & 59.8689 & 80.129 & 0.0113 & 0.3107 & 0.7158 & 0.8589 \tabularnewline
53 & 70.6 & 70.752 & 60.9404 & 82.1433 & 0.4896 & 0.0275 & 0.6185 & 0.9001 \tabularnewline
54 & 72.5 & 81.0752 & 69.5907 & 94.455 & 0.1045 & 0.9375 & 0.6082 & 0.9954 \tabularnewline
55 & 65.1 & 52.771 & 45.1427 & 61.6883 & 0.0034 & 0 & 0.2255 & 0.0103 \tabularnewline
56 & 61.1 & 59.0295 & 50.3295 & 69.2334 & 0.3454 & 0.1218 & 0.206 & 0.206 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33159&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[44])[/C][/ROW]
[ROW][C]32[/C][C]61.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]82.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]85.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]78.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]70.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]70.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]69.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]77.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]66.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]69[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]79.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]56.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]63.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]77.8[/C][C]84.8184[/C][C]75.3623[/C][C]95.4611[/C][C]0.0981[/C][C]1[/C][C]0.672[/C][C]1[/C][/ROW]
[ROW][C]46[/C][C]92[/C][C]80.3078[/C][C]71.0335[/C][C]90.7929[/C][C]0.0144[/C][C]0.6804[/C][C]0.1706[/C][C]0.9993[/C][/ROW]
[ROW][C]47[/C][C]78.1[/C][C]77.9752[/C][C]68.671[/C][C]88.54[/C][C]0.4908[/C][C]0.0046[/C][C]0.4834[/C][C]0.9968[/C][/ROW]
[ROW][C]48[/C][C]65.1[/C][C]72.5041[/C][C]63.5848[/C][C]82.6746[/C][C]0.0768[/C][C]0.1404[/C][C]0.6715[/C][C]0.9619[/C][/ROW]
[ROW][C]49[/C][C]71.1[/C][C]66.9968[/C][C]58.5626[/C][C]76.6456[/C][C]0.2023[/C][C]0.65[/C][C]0.2576[/C][C]0.7737[/C][/ROW]
[ROW][C]50[/C][C]70.9[/C][C]69.6136[/C][C]60.6174[/C][C]79.9451[/C][C]0.4036[/C][C]0.389[/C][C]0.5237[/C][C]0.8845[/C][/ROW]
[ROW][C]51[/C][C]72[/C][C]79.4389[/C][C]68.9155[/C][C]91.5692[/C][C]0.1147[/C][C]0.9162[/C][C]0.623[/C][C]0.9954[/C][/ROW]
[ROW][C]52[/C][C]81.9[/C][C]69.2621[/C][C]59.8689[/C][C]80.129[/C][C]0.0113[/C][C]0.3107[/C][C]0.7158[/C][C]0.8589[/C][/ROW]
[ROW][C]53[/C][C]70.6[/C][C]70.752[/C][C]60.9404[/C][C]82.1433[/C][C]0.4896[/C][C]0.0275[/C][C]0.6185[/C][C]0.9001[/C][/ROW]
[ROW][C]54[/C][C]72.5[/C][C]81.0752[/C][C]69.5907[/C][C]94.455[/C][C]0.1045[/C][C]0.9375[/C][C]0.6082[/C][C]0.9954[/C][/ROW]
[ROW][C]55[/C][C]65.1[/C][C]52.771[/C][C]45.1427[/C][C]61.6883[/C][C]0.0034[/C][C]0[/C][C]0.2255[/C][C]0.0103[/C][/ROW]
[ROW][C]56[/C][C]61.1[/C][C]59.0295[/C][C]50.3295[/C][C]69.2334[/C][C]0.3454[/C][C]0.1218[/C][C]0.206[/C][C]0.206[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33159&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33159&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[44])
3261.2-------
3382.4-------
3485.4-------
3578.2-------
3670.2-------
3770.2-------
3869.3-------
3977.5-------
4066.1-------
4169-------
4279.2-------
4356.2-------
4463.3-------
4577.884.818475.362395.46110.098110.6721
469280.307871.033590.79290.01440.68040.17060.9993
4778.177.975268.67188.540.49080.00460.48340.9968
4865.172.504163.584882.67460.07680.14040.67150.9619
4971.166.996858.562676.64560.20230.650.25760.7737
5070.969.613660.617479.94510.40360.3890.52370.8845
517279.438968.915591.56920.11470.91620.6230.9954
5281.969.262159.868980.1290.01130.31070.71580.8589
5370.670.75260.940482.14330.48960.02750.61850.9001
5472.581.075269.590794.4550.10450.93750.60820.9954
5565.152.77145.142761.68830.003400.22550.0103
5661.159.029550.329569.23340.34540.12180.2060.206







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
450.064-0.08270.006949.25864.10492.0261
460.06660.14560.0121136.707811.39233.3753
470.06910.00161e-040.01560.00130.036
480.0716-0.10210.008554.82134.56842.1374
490.07350.06120.005116.83641.4031.1845
500.07570.01850.00151.65470.13790.3713
510.0779-0.09360.007855.33724.61142.1474
520.080.18250.0152159.716813.30973.6483
530.0821-0.00212e-040.02310.00190.0439
540.0842-0.10580.008873.5346.12782.4754
550.08620.23360.0195152.004512.6673.5591
560.08820.03510.00294.28690.35720.5977

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
45 & 0.064 & -0.0827 & 0.0069 & 49.2586 & 4.1049 & 2.0261 \tabularnewline
46 & 0.0666 & 0.1456 & 0.0121 & 136.7078 & 11.3923 & 3.3753 \tabularnewline
47 & 0.0691 & 0.0016 & 1e-04 & 0.0156 & 0.0013 & 0.036 \tabularnewline
48 & 0.0716 & -0.1021 & 0.0085 & 54.8213 & 4.5684 & 2.1374 \tabularnewline
49 & 0.0735 & 0.0612 & 0.0051 & 16.8364 & 1.403 & 1.1845 \tabularnewline
50 & 0.0757 & 0.0185 & 0.0015 & 1.6547 & 0.1379 & 0.3713 \tabularnewline
51 & 0.0779 & -0.0936 & 0.0078 & 55.3372 & 4.6114 & 2.1474 \tabularnewline
52 & 0.08 & 0.1825 & 0.0152 & 159.7168 & 13.3097 & 3.6483 \tabularnewline
53 & 0.0821 & -0.0021 & 2e-04 & 0.0231 & 0.0019 & 0.0439 \tabularnewline
54 & 0.0842 & -0.1058 & 0.0088 & 73.534 & 6.1278 & 2.4754 \tabularnewline
55 & 0.0862 & 0.2336 & 0.0195 & 152.0045 & 12.667 & 3.5591 \tabularnewline
56 & 0.0882 & 0.0351 & 0.0029 & 4.2869 & 0.3572 & 0.5977 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33159&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]45[/C][C]0.064[/C][C]-0.0827[/C][C]0.0069[/C][C]49.2586[/C][C]4.1049[/C][C]2.0261[/C][/ROW]
[ROW][C]46[/C][C]0.0666[/C][C]0.1456[/C][C]0.0121[/C][C]136.7078[/C][C]11.3923[/C][C]3.3753[/C][/ROW]
[ROW][C]47[/C][C]0.0691[/C][C]0.0016[/C][C]1e-04[/C][C]0.0156[/C][C]0.0013[/C][C]0.036[/C][/ROW]
[ROW][C]48[/C][C]0.0716[/C][C]-0.1021[/C][C]0.0085[/C][C]54.8213[/C][C]4.5684[/C][C]2.1374[/C][/ROW]
[ROW][C]49[/C][C]0.0735[/C][C]0.0612[/C][C]0.0051[/C][C]16.8364[/C][C]1.403[/C][C]1.1845[/C][/ROW]
[ROW][C]50[/C][C]0.0757[/C][C]0.0185[/C][C]0.0015[/C][C]1.6547[/C][C]0.1379[/C][C]0.3713[/C][/ROW]
[ROW][C]51[/C][C]0.0779[/C][C]-0.0936[/C][C]0.0078[/C][C]55.3372[/C][C]4.6114[/C][C]2.1474[/C][/ROW]
[ROW][C]52[/C][C]0.08[/C][C]0.1825[/C][C]0.0152[/C][C]159.7168[/C][C]13.3097[/C][C]3.6483[/C][/ROW]
[ROW][C]53[/C][C]0.0821[/C][C]-0.0021[/C][C]2e-04[/C][C]0.0231[/C][C]0.0019[/C][C]0.0439[/C][/ROW]
[ROW][C]54[/C][C]0.0842[/C][C]-0.1058[/C][C]0.0088[/C][C]73.534[/C][C]6.1278[/C][C]2.4754[/C][/ROW]
[ROW][C]55[/C][C]0.0862[/C][C]0.2336[/C][C]0.0195[/C][C]152.0045[/C][C]12.667[/C][C]3.5591[/C][/ROW]
[ROW][C]56[/C][C]0.0882[/C][C]0.0351[/C][C]0.0029[/C][C]4.2869[/C][C]0.3572[/C][C]0.5977[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33159&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33159&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
450.064-0.08270.006949.25864.10492.0261
460.06660.14560.0121136.707811.39233.3753
470.06910.00161e-040.01560.00130.036
480.0716-0.10210.008554.82134.56842.1374
490.07350.06120.005116.83641.4031.1845
500.07570.01850.00151.65470.13790.3713
510.0779-0.09360.007855.33724.61142.1474
520.080.18250.0152159.716813.30973.6483
530.0821-0.00212e-040.02310.00190.0439
540.0842-0.10580.008873.5346.12782.4754
550.08620.23360.0195152.004512.6673.5591
560.08820.03510.00294.28690.35720.5977



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