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 computationMon, 20 Dec 2010 14:18:30 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/20/t12928546163zwh49w8dcehaql.htm/, Retrieved Sat, 04 May 2024 02:09:44 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=112956, Retrieved Sat, 04 May 2024 02:09:44 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact94
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
-   PD        [ARIMA Forecasting] [ARIMA forecast Je...] [2010-12-20 14:18:30] [47bfda5353cd53c1cf7ea7aa9038654a] [Current]
Feedback Forum

Post a new message
Dataseries X:
11,04
11,02
11,03
11,17
11,19
11,15
11,13
11,06
11,01
11,03
10,99
10,94
11,00
11,06
11,06
11,05
11,04
11,15
11,20
11,16
11,30
11,23
11,25
11,25
11,12
11,14
11,17
11,25
11,27
11,34
11,39
11,44
11,46
11,49
11,51
11,48
11,49
11,52
11,56
11,58
11,58
11,58
11,60
11,62
11,62
11,64
11,67
11,66
11,72
11,82
11,90
12,04
12,08
12,15
12,19
12,22
12,23
12,25
12,26
12,27
12,34
12,38
12,42
12,43
12,48
12,50
12,50
12,49
12,46
12,45
12,45
12,38
12,42




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112956&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112956&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112956&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'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[61])
4911.72-------
5011.82-------
5111.9-------
5212.04-------
5312.08-------
5412.15-------
5512.19-------
5612.22-------
5712.23-------
5812.25-------
5912.26-------
6012.27-------
6112.34-------
6212.3812.327912.23512.42080.1360.399410.3994
6312.4212.343712.189712.49770.16570.32210.5187
6412.4312.335912.129412.54240.18590.21240.99750.4845
6512.4812.332212.061812.60270.14210.23930.96620.4776
6612.512.335412.016412.65440.15590.18720.87260.4887
6712.512.32711.955212.69880.18090.18090.76490.4727
6812.4912.329411.911712.74710.22560.21170.69620.4802
6912.4612.328311.866812.78980.2880.24620.66190.4802
7012.4512.326611.823312.82990.31540.30170.61720.4792
7112.4512.32711.785512.86860.32820.32820.59590.4813
7212.3812.324911.746112.90370.4260.3360.57380.4796
7312.4212.315211.701812.92870.36890.4180.46850.4685

\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[61]) \tabularnewline
49 & 11.72 & - & - & - & - & - & - & - \tabularnewline
50 & 11.82 & - & - & - & - & - & - & - \tabularnewline
51 & 11.9 & - & - & - & - & - & - & - \tabularnewline
52 & 12.04 & - & - & - & - & - & - & - \tabularnewline
53 & 12.08 & - & - & - & - & - & - & - \tabularnewline
54 & 12.15 & - & - & - & - & - & - & - \tabularnewline
55 & 12.19 & - & - & - & - & - & - & - \tabularnewline
56 & 12.22 & - & - & - & - & - & - & - \tabularnewline
57 & 12.23 & - & - & - & - & - & - & - \tabularnewline
58 & 12.25 & - & - & - & - & - & - & - \tabularnewline
59 & 12.26 & - & - & - & - & - & - & - \tabularnewline
60 & 12.27 & - & - & - & - & - & - & - \tabularnewline
61 & 12.34 & - & - & - & - & - & - & - \tabularnewline
62 & 12.38 & 12.3279 & 12.235 & 12.4208 & 0.136 & 0.3994 & 1 & 0.3994 \tabularnewline
63 & 12.42 & 12.3437 & 12.1897 & 12.4977 & 0.1657 & 0.322 & 1 & 0.5187 \tabularnewline
64 & 12.43 & 12.3359 & 12.1294 & 12.5424 & 0.1859 & 0.2124 & 0.9975 & 0.4845 \tabularnewline
65 & 12.48 & 12.3322 & 12.0618 & 12.6027 & 0.1421 & 0.2393 & 0.9662 & 0.4776 \tabularnewline
66 & 12.5 & 12.3354 & 12.0164 & 12.6544 & 0.1559 & 0.1872 & 0.8726 & 0.4887 \tabularnewline
67 & 12.5 & 12.327 & 11.9552 & 12.6988 & 0.1809 & 0.1809 & 0.7649 & 0.4727 \tabularnewline
68 & 12.49 & 12.3294 & 11.9117 & 12.7471 & 0.2256 & 0.2117 & 0.6962 & 0.4802 \tabularnewline
69 & 12.46 & 12.3283 & 11.8668 & 12.7898 & 0.288 & 0.2462 & 0.6619 & 0.4802 \tabularnewline
70 & 12.45 & 12.3266 & 11.8233 & 12.8299 & 0.3154 & 0.3017 & 0.6172 & 0.4792 \tabularnewline
71 & 12.45 & 12.327 & 11.7855 & 12.8686 & 0.3282 & 0.3282 & 0.5959 & 0.4813 \tabularnewline
72 & 12.38 & 12.3249 & 11.7461 & 12.9037 & 0.426 & 0.336 & 0.5738 & 0.4796 \tabularnewline
73 & 12.42 & 12.3152 & 11.7018 & 12.9287 & 0.3689 & 0.418 & 0.4685 & 0.4685 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112956&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[61])[/C][/ROW]
[ROW][C]49[/C][C]11.72[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]11.82[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]11.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]12.04[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]12.08[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]12.15[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]12.19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]12.22[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]12.23[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]12.25[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]12.26[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]12.27[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]12.34[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]12.38[/C][C]12.3279[/C][C]12.235[/C][C]12.4208[/C][C]0.136[/C][C]0.3994[/C][C]1[/C][C]0.3994[/C][/ROW]
[ROW][C]63[/C][C]12.42[/C][C]12.3437[/C][C]12.1897[/C][C]12.4977[/C][C]0.1657[/C][C]0.322[/C][C]1[/C][C]0.5187[/C][/ROW]
[ROW][C]64[/C][C]12.43[/C][C]12.3359[/C][C]12.1294[/C][C]12.5424[/C][C]0.1859[/C][C]0.2124[/C][C]0.9975[/C][C]0.4845[/C][/ROW]
[ROW][C]65[/C][C]12.48[/C][C]12.3322[/C][C]12.0618[/C][C]12.6027[/C][C]0.1421[/C][C]0.2393[/C][C]0.9662[/C][C]0.4776[/C][/ROW]
[ROW][C]66[/C][C]12.5[/C][C]12.3354[/C][C]12.0164[/C][C]12.6544[/C][C]0.1559[/C][C]0.1872[/C][C]0.8726[/C][C]0.4887[/C][/ROW]
[ROW][C]67[/C][C]12.5[/C][C]12.327[/C][C]11.9552[/C][C]12.6988[/C][C]0.1809[/C][C]0.1809[/C][C]0.7649[/C][C]0.4727[/C][/ROW]
[ROW][C]68[/C][C]12.49[/C][C]12.3294[/C][C]11.9117[/C][C]12.7471[/C][C]0.2256[/C][C]0.2117[/C][C]0.6962[/C][C]0.4802[/C][/ROW]
[ROW][C]69[/C][C]12.46[/C][C]12.3283[/C][C]11.8668[/C][C]12.7898[/C][C]0.288[/C][C]0.2462[/C][C]0.6619[/C][C]0.4802[/C][/ROW]
[ROW][C]70[/C][C]12.45[/C][C]12.3266[/C][C]11.8233[/C][C]12.8299[/C][C]0.3154[/C][C]0.3017[/C][C]0.6172[/C][C]0.4792[/C][/ROW]
[ROW][C]71[/C][C]12.45[/C][C]12.327[/C][C]11.7855[/C][C]12.8686[/C][C]0.3282[/C][C]0.3282[/C][C]0.5959[/C][C]0.4813[/C][/ROW]
[ROW][C]72[/C][C]12.38[/C][C]12.3249[/C][C]11.7461[/C][C]12.9037[/C][C]0.426[/C][C]0.336[/C][C]0.5738[/C][C]0.4796[/C][/ROW]
[ROW][C]73[/C][C]12.42[/C][C]12.3152[/C][C]11.7018[/C][C]12.9287[/C][C]0.3689[/C][C]0.418[/C][C]0.4685[/C][C]0.4685[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112956&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112956&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[61])
4911.72-------
5011.82-------
5111.9-------
5212.04-------
5312.08-------
5412.15-------
5512.19-------
5612.22-------
5712.23-------
5812.25-------
5912.26-------
6012.27-------
6112.34-------
6212.3812.327912.23512.42080.1360.399410.3994
6312.4212.343712.189712.49770.16570.32210.5187
6412.4312.335912.129412.54240.18590.21240.99750.4845
6512.4812.332212.061812.60270.14210.23930.96620.4776
6612.512.335412.016412.65440.15590.18720.87260.4887
6712.512.32711.955212.69880.18090.18090.76490.4727
6812.4912.329411.911712.74710.22560.21170.69620.4802
6912.4612.328311.866812.78980.2880.24620.66190.4802
7012.4512.326611.823312.82990.31540.30170.61720.4792
7112.4512.32711.785512.86860.32820.32820.59590.4813
7212.3812.324911.746112.90370.4260.3360.57380.4796
7312.4212.315211.701812.92870.36890.4180.46850.4685







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
620.00380.004200.002700
630.00640.00620.00520.00580.00430.0653
640.00850.00760.0060.00890.00580.0761
650.01120.0120.00750.02180.00980.099
660.01320.01330.00870.02710.01330.1152
670.01540.0140.00960.02990.0160.1267
680.01730.0130.01010.02580.01740.132
690.01910.01070.01010.01730.01740.132
700.02080.010.01010.01520.01720.1311
710.02240.010.01010.01510.0170.1303
720.0240.00450.00960.0030.01570.1253
730.02540.00850.00950.0110.01530.1237

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
62 & 0.0038 & 0.0042 & 0 & 0.0027 & 0 & 0 \tabularnewline
63 & 0.0064 & 0.0062 & 0.0052 & 0.0058 & 0.0043 & 0.0653 \tabularnewline
64 & 0.0085 & 0.0076 & 0.006 & 0.0089 & 0.0058 & 0.0761 \tabularnewline
65 & 0.0112 & 0.012 & 0.0075 & 0.0218 & 0.0098 & 0.099 \tabularnewline
66 & 0.0132 & 0.0133 & 0.0087 & 0.0271 & 0.0133 & 0.1152 \tabularnewline
67 & 0.0154 & 0.014 & 0.0096 & 0.0299 & 0.016 & 0.1267 \tabularnewline
68 & 0.0173 & 0.013 & 0.0101 & 0.0258 & 0.0174 & 0.132 \tabularnewline
69 & 0.0191 & 0.0107 & 0.0101 & 0.0173 & 0.0174 & 0.132 \tabularnewline
70 & 0.0208 & 0.01 & 0.0101 & 0.0152 & 0.0172 & 0.1311 \tabularnewline
71 & 0.0224 & 0.01 & 0.0101 & 0.0151 & 0.017 & 0.1303 \tabularnewline
72 & 0.024 & 0.0045 & 0.0096 & 0.003 & 0.0157 & 0.1253 \tabularnewline
73 & 0.0254 & 0.0085 & 0.0095 & 0.011 & 0.0153 & 0.1237 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=112956&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]62[/C][C]0.0038[/C][C]0.0042[/C][C]0[/C][C]0.0027[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]63[/C][C]0.0064[/C][C]0.0062[/C][C]0.0052[/C][C]0.0058[/C][C]0.0043[/C][C]0.0653[/C][/ROW]
[ROW][C]64[/C][C]0.0085[/C][C]0.0076[/C][C]0.006[/C][C]0.0089[/C][C]0.0058[/C][C]0.0761[/C][/ROW]
[ROW][C]65[/C][C]0.0112[/C][C]0.012[/C][C]0.0075[/C][C]0.0218[/C][C]0.0098[/C][C]0.099[/C][/ROW]
[ROW][C]66[/C][C]0.0132[/C][C]0.0133[/C][C]0.0087[/C][C]0.0271[/C][C]0.0133[/C][C]0.1152[/C][/ROW]
[ROW][C]67[/C][C]0.0154[/C][C]0.014[/C][C]0.0096[/C][C]0.0299[/C][C]0.016[/C][C]0.1267[/C][/ROW]
[ROW][C]68[/C][C]0.0173[/C][C]0.013[/C][C]0.0101[/C][C]0.0258[/C][C]0.0174[/C][C]0.132[/C][/ROW]
[ROW][C]69[/C][C]0.0191[/C][C]0.0107[/C][C]0.0101[/C][C]0.0173[/C][C]0.0174[/C][C]0.132[/C][/ROW]
[ROW][C]70[/C][C]0.0208[/C][C]0.01[/C][C]0.0101[/C][C]0.0152[/C][C]0.0172[/C][C]0.1311[/C][/ROW]
[ROW][C]71[/C][C]0.0224[/C][C]0.01[/C][C]0.0101[/C][C]0.0151[/C][C]0.017[/C][C]0.1303[/C][/ROW]
[ROW][C]72[/C][C]0.024[/C][C]0.0045[/C][C]0.0096[/C][C]0.003[/C][C]0.0157[/C][C]0.1253[/C][/ROW]
[ROW][C]73[/C][C]0.0254[/C][C]0.0085[/C][C]0.0095[/C][C]0.011[/C][C]0.0153[/C][C]0.1237[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=112956&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=112956&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
620.00380.004200.002700
630.00640.00620.00520.00580.00430.0653
640.00850.00760.0060.00890.00580.0761
650.01120.0120.00750.02180.00980.099
660.01320.01330.00870.02710.01330.1152
670.01540.0140.00960.02990.0160.1267
680.01730.0130.01010.02580.01740.132
690.01910.01070.01010.01730.01740.132
700.02080.010.01010.01520.01720.1311
710.02240.010.01010.01510.0170.1303
720.0240.00450.00960.0030.01570.1253
730.02540.00850.00950.0110.01530.1237



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