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 computationSun, 20 Dec 2009 12:26:28 -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/20/t1261337380nxn7td9t7y92vqa.htm/, Retrieved Sat, 27 Apr 2024 11:47:28 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=69994, Retrieved Sat, 27 Apr 2024 11:47:28 +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)
-     [(Partial) Autocorrelation Function] [Autocorrelation d...] [2009-12-17 17:58:29] [ca30429b07824e7c5d48293114d35d71]
- RMPD    [ARIMA Forecasting] [arima] [2009-12-20 19:26:28] [94ba0ef70f5b330d175ff4daa1c9cd40] [Current]
Feedback Forum

Post a new message
Dataseries X:
100.00
97.57
93.71
92.70
89.66
89.05
98.99
105.68
101.62
98.38
94.12
93.31
94.73
93.31
90.87
89.86
88.44
87.42
98.17
103.45
104.06
102.03
95.54
95.54
96.55
96.35
95.33
93.51
92.29
92.49
104.87
106.49
106.09
105.27
103.25
103.85
105.27
104.87
103.45
103.25
101.62
102.84
115.42
117.65
117.24
114.60
110.95
112.58
114.00
113.79
112.58
110.34
108.92
110.14
120.49
123.94
124.34
123.94
120.49
120.69
119.88
119.47
118.46
116.23
115.01
115.42
125.96
127.59
127.38
124.14
120.69
121.10
120.28
119.68
117.65
116.43
116.23
116.23
125.76
126.98
125.76
119.27
114.81
112.98
113.79
111.36
107.91
106.69
103.65
101.22
112.58
114.60
109.94
106.90
103.45
104.26
104.87
103.04
100.00
99.39
95.13
96.96
107.10
108.32
105.07
102.64
101.83
104.67




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69994&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[96])
84112.98-------
85113.79-------
86111.36-------
87107.91-------
88106.69-------
89103.65-------
90101.22-------
91112.58-------
92114.6-------
93109.94-------
94106.9-------
95103.45-------
96104.26-------
97104.87105.07101.9549108.18510.44990.694800.6948
98103.04102.6498.2346107.04540.42940.16061e-040.2355
9910099.1993.7945104.58550.38430.0818e-040.0328
10099.3997.9791.7398104.20020.32750.26150.0030.0239
10195.1394.9387.9644101.89560.47760.10470.00710.0043
10296.9692.584.8695100.13050.1260.24970.01250.0013
103107.1103.8695.6182112.10180.22050.94960.01910.4621
104108.32105.8897.0691114.69090.29360.3930.02620.6407
105105.07101.2291.8746110.56540.20970.06820.03370.2619
106102.6498.1888.3291108.03090.18740.08520.04140.1132
107101.8394.7384.3983105.06170.0890.06670.0490.0353
108104.6795.5484.7489106.33110.04860.12660.05660.0566

\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[96]) \tabularnewline
84 & 112.98 & - & - & - & - & - & - & - \tabularnewline
85 & 113.79 & - & - & - & - & - & - & - \tabularnewline
86 & 111.36 & - & - & - & - & - & - & - \tabularnewline
87 & 107.91 & - & - & - & - & - & - & - \tabularnewline
88 & 106.69 & - & - & - & - & - & - & - \tabularnewline
89 & 103.65 & - & - & - & - & - & - & - \tabularnewline
90 & 101.22 & - & - & - & - & - & - & - \tabularnewline
91 & 112.58 & - & - & - & - & - & - & - \tabularnewline
92 & 114.6 & - & - & - & - & - & - & - \tabularnewline
93 & 109.94 & - & - & - & - & - & - & - \tabularnewline
94 & 106.9 & - & - & - & - & - & - & - \tabularnewline
95 & 103.45 & - & - & - & - & - & - & - \tabularnewline
96 & 104.26 & - & - & - & - & - & - & - \tabularnewline
97 & 104.87 & 105.07 & 101.9549 & 108.1851 & 0.4499 & 0.6948 & 0 & 0.6948 \tabularnewline
98 & 103.04 & 102.64 & 98.2346 & 107.0454 & 0.4294 & 0.1606 & 1e-04 & 0.2355 \tabularnewline
99 & 100 & 99.19 & 93.7945 & 104.5855 & 0.3843 & 0.081 & 8e-04 & 0.0328 \tabularnewline
100 & 99.39 & 97.97 & 91.7398 & 104.2002 & 0.3275 & 0.2615 & 0.003 & 0.0239 \tabularnewline
101 & 95.13 & 94.93 & 87.9644 & 101.8956 & 0.4776 & 0.1047 & 0.0071 & 0.0043 \tabularnewline
102 & 96.96 & 92.5 & 84.8695 & 100.1305 & 0.126 & 0.2497 & 0.0125 & 0.0013 \tabularnewline
103 & 107.1 & 103.86 & 95.6182 & 112.1018 & 0.2205 & 0.9496 & 0.0191 & 0.4621 \tabularnewline
104 & 108.32 & 105.88 & 97.0691 & 114.6909 & 0.2936 & 0.393 & 0.0262 & 0.6407 \tabularnewline
105 & 105.07 & 101.22 & 91.8746 & 110.5654 & 0.2097 & 0.0682 & 0.0337 & 0.2619 \tabularnewline
106 & 102.64 & 98.18 & 88.3291 & 108.0309 & 0.1874 & 0.0852 & 0.0414 & 0.1132 \tabularnewline
107 & 101.83 & 94.73 & 84.3983 & 105.0617 & 0.089 & 0.0667 & 0.049 & 0.0353 \tabularnewline
108 & 104.67 & 95.54 & 84.7489 & 106.3311 & 0.0486 & 0.1266 & 0.0566 & 0.0566 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69994&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[96])[/C][/ROW]
[ROW][C]84[/C][C]112.98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]113.79[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]111.36[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]107.91[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]106.69[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]89[/C][C]103.65[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]90[/C][C]101.22[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]91[/C][C]112.58[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]92[/C][C]114.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]93[/C][C]109.94[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]106.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]103.45[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]104.26[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]104.87[/C][C]105.07[/C][C]101.9549[/C][C]108.1851[/C][C]0.4499[/C][C]0.6948[/C][C]0[/C][C]0.6948[/C][/ROW]
[ROW][C]98[/C][C]103.04[/C][C]102.64[/C][C]98.2346[/C][C]107.0454[/C][C]0.4294[/C][C]0.1606[/C][C]1e-04[/C][C]0.2355[/C][/ROW]
[ROW][C]99[/C][C]100[/C][C]99.19[/C][C]93.7945[/C][C]104.5855[/C][C]0.3843[/C][C]0.081[/C][C]8e-04[/C][C]0.0328[/C][/ROW]
[ROW][C]100[/C][C]99.39[/C][C]97.97[/C][C]91.7398[/C][C]104.2002[/C][C]0.3275[/C][C]0.2615[/C][C]0.003[/C][C]0.0239[/C][/ROW]
[ROW][C]101[/C][C]95.13[/C][C]94.93[/C][C]87.9644[/C][C]101.8956[/C][C]0.4776[/C][C]0.1047[/C][C]0.0071[/C][C]0.0043[/C][/ROW]
[ROW][C]102[/C][C]96.96[/C][C]92.5[/C][C]84.8695[/C][C]100.1305[/C][C]0.126[/C][C]0.2497[/C][C]0.0125[/C][C]0.0013[/C][/ROW]
[ROW][C]103[/C][C]107.1[/C][C]103.86[/C][C]95.6182[/C][C]112.1018[/C][C]0.2205[/C][C]0.9496[/C][C]0.0191[/C][C]0.4621[/C][/ROW]
[ROW][C]104[/C][C]108.32[/C][C]105.88[/C][C]97.0691[/C][C]114.6909[/C][C]0.2936[/C][C]0.393[/C][C]0.0262[/C][C]0.6407[/C][/ROW]
[ROW][C]105[/C][C]105.07[/C][C]101.22[/C][C]91.8746[/C][C]110.5654[/C][C]0.2097[/C][C]0.0682[/C][C]0.0337[/C][C]0.2619[/C][/ROW]
[ROW][C]106[/C][C]102.64[/C][C]98.18[/C][C]88.3291[/C][C]108.0309[/C][C]0.1874[/C][C]0.0852[/C][C]0.0414[/C][C]0.1132[/C][/ROW]
[ROW][C]107[/C][C]101.83[/C][C]94.73[/C][C]84.3983[/C][C]105.0617[/C][C]0.089[/C][C]0.0667[/C][C]0.049[/C][C]0.0353[/C][/ROW]
[ROW][C]108[/C][C]104.67[/C][C]95.54[/C][C]84.7489[/C][C]106.3311[/C][C]0.0486[/C][C]0.1266[/C][C]0.0566[/C][C]0.0566[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69994&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69994&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[96])
84112.98-------
85113.79-------
86111.36-------
87107.91-------
88106.69-------
89103.65-------
90101.22-------
91112.58-------
92114.6-------
93109.94-------
94106.9-------
95103.45-------
96104.26-------
97104.87105.07101.9549108.18510.44990.694800.6948
98103.04102.6498.2346107.04540.42940.16061e-040.2355
9910099.1993.7945104.58550.38430.0818e-040.0328
10099.3997.9791.7398104.20020.32750.26150.0030.0239
10195.1394.9387.9644101.89560.47760.10470.00710.0043
10296.9692.584.8695100.13050.1260.24970.01250.0013
103107.1103.8695.6182112.10180.22050.94960.01910.4621
104108.32105.8897.0691114.69090.29360.3930.02620.6407
105105.07101.2291.8746110.56540.20970.06820.03370.2619
106102.6498.1888.3291108.03090.18740.08520.04140.1132
107101.8394.7384.3983105.06170.0890.06670.0490.0353
108104.6795.5484.7489106.33110.04860.12660.05660.0566







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
970.0151-0.001900.0400
980.02190.00390.00290.160.10.3162
990.02780.00820.00470.65610.28540.5342
1000.03240.01450.00712.01640.71810.8474
1010.03740.00210.00610.040.58250.7632
1020.04210.04820.013119.89163.80071.9495
1030.04050.03120.015710.49764.75742.1811
1040.04250.0230.01665.95364.90692.2152
1050.04710.0380.01914.82256.00862.4513
1060.05120.04540.021619.89167.39692.7197
1070.05560.07490.026550.4111.30723.3626
1080.05760.09560.032283.356917.31144.1607

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
97 & 0.0151 & -0.0019 & 0 & 0.04 & 0 & 0 \tabularnewline
98 & 0.0219 & 0.0039 & 0.0029 & 0.16 & 0.1 & 0.3162 \tabularnewline
99 & 0.0278 & 0.0082 & 0.0047 & 0.6561 & 0.2854 & 0.5342 \tabularnewline
100 & 0.0324 & 0.0145 & 0.0071 & 2.0164 & 0.7181 & 0.8474 \tabularnewline
101 & 0.0374 & 0.0021 & 0.0061 & 0.04 & 0.5825 & 0.7632 \tabularnewline
102 & 0.0421 & 0.0482 & 0.0131 & 19.8916 & 3.8007 & 1.9495 \tabularnewline
103 & 0.0405 & 0.0312 & 0.0157 & 10.4976 & 4.7574 & 2.1811 \tabularnewline
104 & 0.0425 & 0.023 & 0.0166 & 5.9536 & 4.9069 & 2.2152 \tabularnewline
105 & 0.0471 & 0.038 & 0.019 & 14.8225 & 6.0086 & 2.4513 \tabularnewline
106 & 0.0512 & 0.0454 & 0.0216 & 19.8916 & 7.3969 & 2.7197 \tabularnewline
107 & 0.0556 & 0.0749 & 0.0265 & 50.41 & 11.3072 & 3.3626 \tabularnewline
108 & 0.0576 & 0.0956 & 0.0322 & 83.3569 & 17.3114 & 4.1607 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=69994&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]97[/C][C]0.0151[/C][C]-0.0019[/C][C]0[/C][C]0.04[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]98[/C][C]0.0219[/C][C]0.0039[/C][C]0.0029[/C][C]0.16[/C][C]0.1[/C][C]0.3162[/C][/ROW]
[ROW][C]99[/C][C]0.0278[/C][C]0.0082[/C][C]0.0047[/C][C]0.6561[/C][C]0.2854[/C][C]0.5342[/C][/ROW]
[ROW][C]100[/C][C]0.0324[/C][C]0.0145[/C][C]0.0071[/C][C]2.0164[/C][C]0.7181[/C][C]0.8474[/C][/ROW]
[ROW][C]101[/C][C]0.0374[/C][C]0.0021[/C][C]0.0061[/C][C]0.04[/C][C]0.5825[/C][C]0.7632[/C][/ROW]
[ROW][C]102[/C][C]0.0421[/C][C]0.0482[/C][C]0.0131[/C][C]19.8916[/C][C]3.8007[/C][C]1.9495[/C][/ROW]
[ROW][C]103[/C][C]0.0405[/C][C]0.0312[/C][C]0.0157[/C][C]10.4976[/C][C]4.7574[/C][C]2.1811[/C][/ROW]
[ROW][C]104[/C][C]0.0425[/C][C]0.023[/C][C]0.0166[/C][C]5.9536[/C][C]4.9069[/C][C]2.2152[/C][/ROW]
[ROW][C]105[/C][C]0.0471[/C][C]0.038[/C][C]0.019[/C][C]14.8225[/C][C]6.0086[/C][C]2.4513[/C][/ROW]
[ROW][C]106[/C][C]0.0512[/C][C]0.0454[/C][C]0.0216[/C][C]19.8916[/C][C]7.3969[/C][C]2.7197[/C][/ROW]
[ROW][C]107[/C][C]0.0556[/C][C]0.0749[/C][C]0.0265[/C][C]50.41[/C][C]11.3072[/C][C]3.3626[/C][/ROW]
[ROW][C]108[/C][C]0.0576[/C][C]0.0956[/C][C]0.0322[/C][C]83.3569[/C][C]17.3114[/C][C]4.1607[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=69994&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=69994&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
970.0151-0.001900.0400
980.02190.00390.00290.160.10.3162
990.02780.00820.00470.65610.28540.5342
1000.03240.01450.00712.01640.71810.8474
1010.03740.00210.00610.040.58250.7632
1020.04210.04820.013119.89163.80071.9495
1030.04050.03120.015710.49764.75742.1811
1040.04250.0230.01665.95364.90692.2152
1050.04710.0380.01914.82256.00862.4513
1060.05120.04540.021619.89167.39692.7197
1070.05560.07490.026550.4111.30723.3626
1080.05760.09560.032283.356917.31144.1607



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