Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 06 Dec 2007 03:15:31 -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/2007/Dec/06/t11969353740hkbe5cuuph5boi.htm/, Retrieved Fri, 03 May 2024 10:27:47 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2560, Retrieved Fri, 03 May 2024 10:27:47 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsQ1 - vertrouwen
Estimated Impact187
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [estimation of ARM...] [2007-12-06 10:15:31] [ac6f409873aab27747ac7f3d36ded223] [Current]
Feedback Forum

Post a new message
Dataseries X:
96
86
82
92
99
101
102
100
101
100
99
97
97
97
96
92
91
87
82
89
91
90
87
89
95
85
94
94
97
99
97
96
94
100
96
98
98
94
93
94
94
97
98
95
89
89
89
90
86
92
91
95
99
98
95
96
94
98
98
98
98
102
101
92
99
101
99
102
102
101
99
98
98




Summary of compuational 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 compuational 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=2560&T=0

[TABLE]
[ROW][C]Summary of compuational 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=2560&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2560&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 compuational 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[61])
4986-------
5092-------
5191-------
5295-------
5399-------
5498-------
5595-------
5696-------
5794-------
5898-------
5998-------
6098-------
6198-------
6210296.888789.9047103.87280.07570.37760.9150.3776
6310196.119587.5657104.67320.13170.08890.87960.3333
649295.58786.3373104.83660.22360.12570.54950.3046
659995.218385.6278104.80890.21980.74460.21980.2849
6610194.963285.1962104.73020.11290.20890.27110.2711
679994.786584.9243104.64880.20120.10840.48310.2615
6810294.664384.7486104.57990.07350.19570.39590.2548
6910294.579684.6328104.52640.07180.07180.54550.2502
7010194.52184.5554104.48660.10130.07070.24690.2469
719994.480584.5032104.45770.18730.10010.24470.2447
729894.452484.4677104.43710.24310.1860.24310.2431
739894.43384.4434104.42250.2420.2420.2420.242

\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 & 86 & - & - & - & - & - & - & - \tabularnewline
50 & 92 & - & - & - & - & - & - & - \tabularnewline
51 & 91 & - & - & - & - & - & - & - \tabularnewline
52 & 95 & - & - & - & - & - & - & - \tabularnewline
53 & 99 & - & - & - & - & - & - & - \tabularnewline
54 & 98 & - & - & - & - & - & - & - \tabularnewline
55 & 95 & - & - & - & - & - & - & - \tabularnewline
56 & 96 & - & - & - & - & - & - & - \tabularnewline
57 & 94 & - & - & - & - & - & - & - \tabularnewline
58 & 98 & - & - & - & - & - & - & - \tabularnewline
59 & 98 & - & - & - & - & - & - & - \tabularnewline
60 & 98 & - & - & - & - & - & - & - \tabularnewline
61 & 98 & - & - & - & - & - & - & - \tabularnewline
62 & 102 & 96.8887 & 89.9047 & 103.8728 & 0.0757 & 0.3776 & 0.915 & 0.3776 \tabularnewline
63 & 101 & 96.1195 & 87.5657 & 104.6732 & 0.1317 & 0.0889 & 0.8796 & 0.3333 \tabularnewline
64 & 92 & 95.587 & 86.3373 & 104.8366 & 0.2236 & 0.1257 & 0.5495 & 0.3046 \tabularnewline
65 & 99 & 95.2183 & 85.6278 & 104.8089 & 0.2198 & 0.7446 & 0.2198 & 0.2849 \tabularnewline
66 & 101 & 94.9632 & 85.1962 & 104.7302 & 0.1129 & 0.2089 & 0.2711 & 0.2711 \tabularnewline
67 & 99 & 94.7865 & 84.9243 & 104.6488 & 0.2012 & 0.1084 & 0.4831 & 0.2615 \tabularnewline
68 & 102 & 94.6643 & 84.7486 & 104.5799 & 0.0735 & 0.1957 & 0.3959 & 0.2548 \tabularnewline
69 & 102 & 94.5796 & 84.6328 & 104.5264 & 0.0718 & 0.0718 & 0.5455 & 0.2502 \tabularnewline
70 & 101 & 94.521 & 84.5554 & 104.4866 & 0.1013 & 0.0707 & 0.2469 & 0.2469 \tabularnewline
71 & 99 & 94.4805 & 84.5032 & 104.4577 & 0.1873 & 0.1001 & 0.2447 & 0.2447 \tabularnewline
72 & 98 & 94.4524 & 84.4677 & 104.4371 & 0.2431 & 0.186 & 0.2431 & 0.2431 \tabularnewline
73 & 98 & 94.433 & 84.4434 & 104.4225 & 0.242 & 0.242 & 0.242 & 0.242 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2560&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]86[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]92[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]91[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]95[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]99[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]95[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]96[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]94[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]98[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]102[/C][C]96.8887[/C][C]89.9047[/C][C]103.8728[/C][C]0.0757[/C][C]0.3776[/C][C]0.915[/C][C]0.3776[/C][/ROW]
[ROW][C]63[/C][C]101[/C][C]96.1195[/C][C]87.5657[/C][C]104.6732[/C][C]0.1317[/C][C]0.0889[/C][C]0.8796[/C][C]0.3333[/C][/ROW]
[ROW][C]64[/C][C]92[/C][C]95.587[/C][C]86.3373[/C][C]104.8366[/C][C]0.2236[/C][C]0.1257[/C][C]0.5495[/C][C]0.3046[/C][/ROW]
[ROW][C]65[/C][C]99[/C][C]95.2183[/C][C]85.6278[/C][C]104.8089[/C][C]0.2198[/C][C]0.7446[/C][C]0.2198[/C][C]0.2849[/C][/ROW]
[ROW][C]66[/C][C]101[/C][C]94.9632[/C][C]85.1962[/C][C]104.7302[/C][C]0.1129[/C][C]0.2089[/C][C]0.2711[/C][C]0.2711[/C][/ROW]
[ROW][C]67[/C][C]99[/C][C]94.7865[/C][C]84.9243[/C][C]104.6488[/C][C]0.2012[/C][C]0.1084[/C][C]0.4831[/C][C]0.2615[/C][/ROW]
[ROW][C]68[/C][C]102[/C][C]94.6643[/C][C]84.7486[/C][C]104.5799[/C][C]0.0735[/C][C]0.1957[/C][C]0.3959[/C][C]0.2548[/C][/ROW]
[ROW][C]69[/C][C]102[/C][C]94.5796[/C][C]84.6328[/C][C]104.5264[/C][C]0.0718[/C][C]0.0718[/C][C]0.5455[/C][C]0.2502[/C][/ROW]
[ROW][C]70[/C][C]101[/C][C]94.521[/C][C]84.5554[/C][C]104.4866[/C][C]0.1013[/C][C]0.0707[/C][C]0.2469[/C][C]0.2469[/C][/ROW]
[ROW][C]71[/C][C]99[/C][C]94.4805[/C][C]84.5032[/C][C]104.4577[/C][C]0.1873[/C][C]0.1001[/C][C]0.2447[/C][C]0.2447[/C][/ROW]
[ROW][C]72[/C][C]98[/C][C]94.4524[/C][C]84.4677[/C][C]104.4371[/C][C]0.2431[/C][C]0.186[/C][C]0.2431[/C][C]0.2431[/C][/ROW]
[ROW][C]73[/C][C]98[/C][C]94.433[/C][C]84.4434[/C][C]104.4225[/C][C]0.242[/C][C]0.242[/C][C]0.242[/C][C]0.242[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2560&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2560&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])
4986-------
5092-------
5191-------
5295-------
5399-------
5498-------
5595-------
5696-------
5794-------
5898-------
5998-------
6098-------
6198-------
6210296.888789.9047103.87280.07570.37760.9150.3776
6310196.119587.5657104.67320.13170.08890.87960.3333
649295.58786.3373104.83660.22360.12570.54950.3046
659995.218385.6278104.80890.21980.74460.21980.2849
6610194.963285.1962104.73020.11290.20890.27110.2711
679994.786584.9243104.64880.20120.10840.48310.2615
6810294.664384.7486104.57990.07350.19570.39590.2548
6910294.579684.6328104.52640.07180.07180.54550.2502
7010194.52184.5554104.48660.10130.07070.24690.2469
719994.480584.5032104.45770.18730.10010.24470.2447
729894.452484.4677104.43710.24310.1860.24310.2431
739894.43384.4434104.42250.2420.2420.2420.242







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
620.03680.05280.004426.12522.17711.4755
630.04540.05080.004223.81971.9851.4089
640.0494-0.03750.003112.86621.07221.0355
650.05140.03970.003314.3011.19181.0917
660.05250.06360.005336.44343.03691.7427
670.05310.04450.003717.75331.47941.2163
680.05340.07750.006553.81314.48442.1176
690.05370.07850.006555.06214.58852.1421
700.05380.06850.005741.97713.49811.8703
710.05390.04780.00420.42621.70221.3047
720.05390.03760.003112.58551.04881.0241
730.0540.03780.003112.72381.06031.0297

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
62 & 0.0368 & 0.0528 & 0.0044 & 26.1252 & 2.1771 & 1.4755 \tabularnewline
63 & 0.0454 & 0.0508 & 0.0042 & 23.8197 & 1.985 & 1.4089 \tabularnewline
64 & 0.0494 & -0.0375 & 0.0031 & 12.8662 & 1.0722 & 1.0355 \tabularnewline
65 & 0.0514 & 0.0397 & 0.0033 & 14.301 & 1.1918 & 1.0917 \tabularnewline
66 & 0.0525 & 0.0636 & 0.0053 & 36.4434 & 3.0369 & 1.7427 \tabularnewline
67 & 0.0531 & 0.0445 & 0.0037 & 17.7533 & 1.4794 & 1.2163 \tabularnewline
68 & 0.0534 & 0.0775 & 0.0065 & 53.8131 & 4.4844 & 2.1176 \tabularnewline
69 & 0.0537 & 0.0785 & 0.0065 & 55.0621 & 4.5885 & 2.1421 \tabularnewline
70 & 0.0538 & 0.0685 & 0.0057 & 41.9771 & 3.4981 & 1.8703 \tabularnewline
71 & 0.0539 & 0.0478 & 0.004 & 20.4262 & 1.7022 & 1.3047 \tabularnewline
72 & 0.0539 & 0.0376 & 0.0031 & 12.5855 & 1.0488 & 1.0241 \tabularnewline
73 & 0.054 & 0.0378 & 0.0031 & 12.7238 & 1.0603 & 1.0297 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2560&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.0368[/C][C]0.0528[/C][C]0.0044[/C][C]26.1252[/C][C]2.1771[/C][C]1.4755[/C][/ROW]
[ROW][C]63[/C][C]0.0454[/C][C]0.0508[/C][C]0.0042[/C][C]23.8197[/C][C]1.985[/C][C]1.4089[/C][/ROW]
[ROW][C]64[/C][C]0.0494[/C][C]-0.0375[/C][C]0.0031[/C][C]12.8662[/C][C]1.0722[/C][C]1.0355[/C][/ROW]
[ROW][C]65[/C][C]0.0514[/C][C]0.0397[/C][C]0.0033[/C][C]14.301[/C][C]1.1918[/C][C]1.0917[/C][/ROW]
[ROW][C]66[/C][C]0.0525[/C][C]0.0636[/C][C]0.0053[/C][C]36.4434[/C][C]3.0369[/C][C]1.7427[/C][/ROW]
[ROW][C]67[/C][C]0.0531[/C][C]0.0445[/C][C]0.0037[/C][C]17.7533[/C][C]1.4794[/C][C]1.2163[/C][/ROW]
[ROW][C]68[/C][C]0.0534[/C][C]0.0775[/C][C]0.0065[/C][C]53.8131[/C][C]4.4844[/C][C]2.1176[/C][/ROW]
[ROW][C]69[/C][C]0.0537[/C][C]0.0785[/C][C]0.0065[/C][C]55.0621[/C][C]4.5885[/C][C]2.1421[/C][/ROW]
[ROW][C]70[/C][C]0.0538[/C][C]0.0685[/C][C]0.0057[/C][C]41.9771[/C][C]3.4981[/C][C]1.8703[/C][/ROW]
[ROW][C]71[/C][C]0.0539[/C][C]0.0478[/C][C]0.004[/C][C]20.4262[/C][C]1.7022[/C][C]1.3047[/C][/ROW]
[ROW][C]72[/C][C]0.0539[/C][C]0.0376[/C][C]0.0031[/C][C]12.5855[/C][C]1.0488[/C][C]1.0241[/C][/ROW]
[ROW][C]73[/C][C]0.054[/C][C]0.0378[/C][C]0.0031[/C][C]12.7238[/C][C]1.0603[/C][C]1.0297[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2560&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2560&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.03680.05280.004426.12522.17711.4755
630.04540.05080.004223.81971.9851.4089
640.0494-0.03750.003112.86621.07221.0355
650.05140.03970.003314.3011.19181.0917
660.05250.06360.005336.44343.03691.7427
670.05310.04450.003717.75331.47941.2163
680.05340.07750.006553.81314.48442.1176
690.05370.07850.006555.06214.58852.1421
700.05380.06850.005741.97713.49811.8703
710.05390.04780.00420.42621.70221.3047
720.05390.03760.003112.58551.04881.0241
730.0540.03780.003112.72381.06031.0297



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