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 computationWed, 16 Dec 2009 07:34:56 -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/16/t1260974127bznkr1v2lfa74pe.htm/, Retrieved Tue, 30 Apr 2024 20:45:36 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=68379, Retrieved Tue, 30 Apr 2024 20:45:36 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact119
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [ARIMA forecasting] [2009-12-16 14:34:56] [1c773da0103d9327c2f1f790e2d74438] [Current]
Feedback Forum

Post a new message
Dataseries X:
101.5
99.2
107.8
92.3
99.2
101.6
87
71.4
104.7
115.1
102.5
75.3
96.7
94.6
98.6
99.5
92
93.6
89.3
66.9
108.8
113.2
105.5
77.8
102.1
97
95.5
99.3
86.4
92.4
85.7
61.9
104.9
107.9
95.6
79.8
94.8
93.7
108.1
96.9
88.8
106.7
86.8
69.8
110.9
105.4
99.2
84.4
87.2
91.9
97.9
94.5
85
100.3
78.7
65.8
104.8
96
103.3
82.9
91.4
94.5
109.3
92.1
99.3
109.6
87.5
73.1
110.7
111.6
110.7
84
101.6
102.1
113.9
99
100.4
109.5
93
76.8
105.3




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68379&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'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[69])
57104.8-------
5896-------
59103.3-------
6082.9-------
6191.4-------
6294.5-------
63109.3-------
6492.1-------
6599.3-------
66109.6-------
6787.5-------
6873.1-------
69110.7-------
70111.6106.378397.4364115.32030.12620.17170.98850.1717
71110.7105.6796.7186114.62130.13540.09710.69810.1354
728485.012875.796694.2290.414700.67340
73101.695.078984.754105.40390.10790.98230.75750.0015
74102.196.950386.6249107.27570.16420.18870.67910.0045
75113.9106.914996.3318117.4980.09790.81370.32930.2417
769996.420485.5574107.28330.32088e-040.78220.005
77100.495.047784.1732105.92230.16740.23810.22170.0024
78109.5106.319295.2908117.34750.28590.85360.27990.2181
799386.779475.666397.89250.136300.44940
8076.871.117859.985382.25030.15861e-040.36350
81105.3109.813498.6052121.02170.21510.43840.4384

\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[69]) \tabularnewline
57 & 104.8 & - & - & - & - & - & - & - \tabularnewline
58 & 96 & - & - & - & - & - & - & - \tabularnewline
59 & 103.3 & - & - & - & - & - & - & - \tabularnewline
60 & 82.9 & - & - & - & - & - & - & - \tabularnewline
61 & 91.4 & - & - & - & - & - & - & - \tabularnewline
62 & 94.5 & - & - & - & - & - & - & - \tabularnewline
63 & 109.3 & - & - & - & - & - & - & - \tabularnewline
64 & 92.1 & - & - & - & - & - & - & - \tabularnewline
65 & 99.3 & - & - & - & - & - & - & - \tabularnewline
66 & 109.6 & - & - & - & - & - & - & - \tabularnewline
67 & 87.5 & - & - & - & - & - & - & - \tabularnewline
68 & 73.1 & - & - & - & - & - & - & - \tabularnewline
69 & 110.7 & - & - & - & - & - & - & - \tabularnewline
70 & 111.6 & 106.3783 & 97.4364 & 115.3203 & 0.1262 & 0.1717 & 0.9885 & 0.1717 \tabularnewline
71 & 110.7 & 105.67 & 96.7186 & 114.6213 & 0.1354 & 0.0971 & 0.6981 & 0.1354 \tabularnewline
72 & 84 & 85.0128 & 75.7966 & 94.229 & 0.4147 & 0 & 0.6734 & 0 \tabularnewline
73 & 101.6 & 95.0789 & 84.754 & 105.4039 & 0.1079 & 0.9823 & 0.7575 & 0.0015 \tabularnewline
74 & 102.1 & 96.9503 & 86.6249 & 107.2757 & 0.1642 & 0.1887 & 0.6791 & 0.0045 \tabularnewline
75 & 113.9 & 106.9149 & 96.3318 & 117.498 & 0.0979 & 0.8137 & 0.3293 & 0.2417 \tabularnewline
76 & 99 & 96.4204 & 85.5574 & 107.2833 & 0.3208 & 8e-04 & 0.7822 & 0.005 \tabularnewline
77 & 100.4 & 95.0477 & 84.1732 & 105.9223 & 0.1674 & 0.2381 & 0.2217 & 0.0024 \tabularnewline
78 & 109.5 & 106.3192 & 95.2908 & 117.3475 & 0.2859 & 0.8536 & 0.2799 & 0.2181 \tabularnewline
79 & 93 & 86.7794 & 75.6663 & 97.8925 & 0.1363 & 0 & 0.4494 & 0 \tabularnewline
80 & 76.8 & 71.1178 & 59.9853 & 82.2503 & 0.1586 & 1e-04 & 0.3635 & 0 \tabularnewline
81 & 105.3 & 109.8134 & 98.6052 & 121.0217 & 0.215 & 1 & 0.4384 & 0.4384 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68379&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[69])[/C][/ROW]
[ROW][C]57[/C][C]104.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]96[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]103.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]82.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]91.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]94.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]109.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]92.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]99.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]109.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]87.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]73.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]110.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]111.6[/C][C]106.3783[/C][C]97.4364[/C][C]115.3203[/C][C]0.1262[/C][C]0.1717[/C][C]0.9885[/C][C]0.1717[/C][/ROW]
[ROW][C]71[/C][C]110.7[/C][C]105.67[/C][C]96.7186[/C][C]114.6213[/C][C]0.1354[/C][C]0.0971[/C][C]0.6981[/C][C]0.1354[/C][/ROW]
[ROW][C]72[/C][C]84[/C][C]85.0128[/C][C]75.7966[/C][C]94.229[/C][C]0.4147[/C][C]0[/C][C]0.6734[/C][C]0[/C][/ROW]
[ROW][C]73[/C][C]101.6[/C][C]95.0789[/C][C]84.754[/C][C]105.4039[/C][C]0.1079[/C][C]0.9823[/C][C]0.7575[/C][C]0.0015[/C][/ROW]
[ROW][C]74[/C][C]102.1[/C][C]96.9503[/C][C]86.6249[/C][C]107.2757[/C][C]0.1642[/C][C]0.1887[/C][C]0.6791[/C][C]0.0045[/C][/ROW]
[ROW][C]75[/C][C]113.9[/C][C]106.9149[/C][C]96.3318[/C][C]117.498[/C][C]0.0979[/C][C]0.8137[/C][C]0.3293[/C][C]0.2417[/C][/ROW]
[ROW][C]76[/C][C]99[/C][C]96.4204[/C][C]85.5574[/C][C]107.2833[/C][C]0.3208[/C][C]8e-04[/C][C]0.7822[/C][C]0.005[/C][/ROW]
[ROW][C]77[/C][C]100.4[/C][C]95.0477[/C][C]84.1732[/C][C]105.9223[/C][C]0.1674[/C][C]0.2381[/C][C]0.2217[/C][C]0.0024[/C][/ROW]
[ROW][C]78[/C][C]109.5[/C][C]106.3192[/C][C]95.2908[/C][C]117.3475[/C][C]0.2859[/C][C]0.8536[/C][C]0.2799[/C][C]0.2181[/C][/ROW]
[ROW][C]79[/C][C]93[/C][C]86.7794[/C][C]75.6663[/C][C]97.8925[/C][C]0.1363[/C][C]0[/C][C]0.4494[/C][C]0[/C][/ROW]
[ROW][C]80[/C][C]76.8[/C][C]71.1178[/C][C]59.9853[/C][C]82.2503[/C][C]0.1586[/C][C]1e-04[/C][C]0.3635[/C][C]0[/C][/ROW]
[ROW][C]81[/C][C]105.3[/C][C]109.8134[/C][C]98.6052[/C][C]121.0217[/C][C]0.215[/C][C]1[/C][C]0.4384[/C][C]0.4384[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=68379&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68379&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[69])
57104.8-------
5896-------
59103.3-------
6082.9-------
6191.4-------
6294.5-------
63109.3-------
6492.1-------
6599.3-------
66109.6-------
6787.5-------
6873.1-------
69110.7-------
70111.6106.378397.4364115.32030.12620.17170.98850.1717
71110.7105.6796.7186114.62130.13540.09710.69810.1354
728485.012875.796694.2290.414700.67340
73101.695.078984.754105.40390.10790.98230.75750.0015
74102.196.950386.6249107.27570.16420.18870.67910.0045
75113.9106.914996.3318117.4980.09790.81370.32930.2417
769996.420485.5574107.28330.32088e-040.78220.005
77100.495.047784.1732105.92230.16740.23810.22170.0024
78109.5106.319295.2908117.34750.28590.85360.27990.2181
799386.779475.666397.89250.136300.44940
8076.871.117859.985382.25030.15861e-040.36350
81105.3109.813498.6052121.02170.21510.43840.4384







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
700.04290.0491027.265800
710.04320.04760.048325.301326.28365.1267
720.0553-0.01190.03621.025717.86434.2266
730.05540.06860.044342.524324.02934.902
740.05430.05310.046126.519424.52734.9525
750.05050.06530.049348.791428.57135.3452
760.05750.02680.04616.654525.44045.0438
770.05840.05630.047328.646625.84115.0834
780.05290.02990.045410.117624.09414.9086
790.06530.07170.04838.695825.55425.0551
800.07990.07990.050932.287526.16645.1153
810.0521-0.04110.050120.370925.68345.0679

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
70 & 0.0429 & 0.0491 & 0 & 27.2658 & 0 & 0 \tabularnewline
71 & 0.0432 & 0.0476 & 0.0483 & 25.3013 & 26.2836 & 5.1267 \tabularnewline
72 & 0.0553 & -0.0119 & 0.0362 & 1.0257 & 17.8643 & 4.2266 \tabularnewline
73 & 0.0554 & 0.0686 & 0.0443 & 42.5243 & 24.0293 & 4.902 \tabularnewline
74 & 0.0543 & 0.0531 & 0.0461 & 26.5194 & 24.5273 & 4.9525 \tabularnewline
75 & 0.0505 & 0.0653 & 0.0493 & 48.7914 & 28.5713 & 5.3452 \tabularnewline
76 & 0.0575 & 0.0268 & 0.0461 & 6.6545 & 25.4404 & 5.0438 \tabularnewline
77 & 0.0584 & 0.0563 & 0.0473 & 28.6466 & 25.8411 & 5.0834 \tabularnewline
78 & 0.0529 & 0.0299 & 0.0454 & 10.1176 & 24.0941 & 4.9086 \tabularnewline
79 & 0.0653 & 0.0717 & 0.048 & 38.6958 & 25.5542 & 5.0551 \tabularnewline
80 & 0.0799 & 0.0799 & 0.0509 & 32.2875 & 26.1664 & 5.1153 \tabularnewline
81 & 0.0521 & -0.0411 & 0.0501 & 20.3709 & 25.6834 & 5.0679 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=68379&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]70[/C][C]0.0429[/C][C]0.0491[/C][C]0[/C][C]27.2658[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]71[/C][C]0.0432[/C][C]0.0476[/C][C]0.0483[/C][C]25.3013[/C][C]26.2836[/C][C]5.1267[/C][/ROW]
[ROW][C]72[/C][C]0.0553[/C][C]-0.0119[/C][C]0.0362[/C][C]1.0257[/C][C]17.8643[/C][C]4.2266[/C][/ROW]
[ROW][C]73[/C][C]0.0554[/C][C]0.0686[/C][C]0.0443[/C][C]42.5243[/C][C]24.0293[/C][C]4.902[/C][/ROW]
[ROW][C]74[/C][C]0.0543[/C][C]0.0531[/C][C]0.0461[/C][C]26.5194[/C][C]24.5273[/C][C]4.9525[/C][/ROW]
[ROW][C]75[/C][C]0.0505[/C][C]0.0653[/C][C]0.0493[/C][C]48.7914[/C][C]28.5713[/C][C]5.3452[/C][/ROW]
[ROW][C]76[/C][C]0.0575[/C][C]0.0268[/C][C]0.0461[/C][C]6.6545[/C][C]25.4404[/C][C]5.0438[/C][/ROW]
[ROW][C]77[/C][C]0.0584[/C][C]0.0563[/C][C]0.0473[/C][C]28.6466[/C][C]25.8411[/C][C]5.0834[/C][/ROW]
[ROW][C]78[/C][C]0.0529[/C][C]0.0299[/C][C]0.0454[/C][C]10.1176[/C][C]24.0941[/C][C]4.9086[/C][/ROW]
[ROW][C]79[/C][C]0.0653[/C][C]0.0717[/C][C]0.048[/C][C]38.6958[/C][C]25.5542[/C][C]5.0551[/C][/ROW]
[ROW][C]80[/C][C]0.0799[/C][C]0.0799[/C][C]0.0509[/C][C]32.2875[/C][C]26.1664[/C][C]5.1153[/C][/ROW]
[ROW][C]81[/C][C]0.0521[/C][C]-0.0411[/C][C]0.0501[/C][C]20.3709[/C][C]25.6834[/C][C]5.0679[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=68379&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=68379&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
700.04290.0491027.265800
710.04320.04760.048325.301326.28365.1267
720.0553-0.01190.03621.025717.86434.2266
730.05540.06860.044342.524324.02934.902
740.05430.05310.046126.519424.52734.9525
750.05050.06530.049348.791428.57135.3452
760.05750.02680.04616.654525.44045.0438
770.05840.05630.047328.646625.84115.0834
780.05290.02990.045410.117624.09414.9086
790.06530.07170.04838.695825.55425.0551
800.07990.07990.050932.287526.16645.1153
810.0521-0.04110.050120.370925.68345.0679



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