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 computationThu, 29 Nov 2012 10:59:18 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2012/Nov/29/t1354204773b3o7qes5mj9cqjg.htm/, Retrieved Sat, 27 Apr 2024 19:48:05 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=194738, Retrieved Sat, 27 Apr 2024 19:48:05 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact139
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [web server] [2010-10-19 15:51:23] [b98453cac15ba1066b407e146608df68]
- RMP   [Variance Reduction Matrix] [Pageviews] [2010-11-29 10:12:20] [b98453cac15ba1066b407e146608df68]
- RM      [Standard Deviation-Mean Plot] [Pageviews] [2010-11-29 11:10:57] [b98453cac15ba1066b407e146608df68]
- RMP       [ARIMA Forecasting] [Pageviews] [2010-11-29 21:25:44] [b98453cac15ba1066b407e146608df68]
-   P         [ARIMA Forecasting] [Voorspelling met ...] [2012-11-29 15:52:07] [74be16979710d4c4e7c6647856088456]
-    D            [ARIMA Forecasting] [Voorspelling met ...] [2012-11-29 15:59:18] [d41d8cd98f00b204e9800998ecf8427e] [Current]
-   P               [ARIMA Forecasting] [Voorspelling met ...] [2012-12-16 10:39:55] [74be16979710d4c4e7c6647856088456]
-   PD              [ARIMA Forecasting] [Voorspelling met ...] [2012-12-16 12:02:00] [37f59b7a972c225c3d32d27fed432050]
Feedback Forum

Post a new message
Dataseries X:
46
62
66
59
58
61
41
27
58
70
49
59
44
36
72
45
56
54
53
35
61
52
47
51
52
63
74
45
51
64
36
30
55
64
39
40
63
45
59
55
40
64
27
28
45
57
45
69
60
56
58
50
51
53
37
22
55
70
62
58
39
49
58
47
42
62
39
40
72
70
54
65




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time12 seconds
R Server'Herman Ole Andreas Wold' @ wold.wessa.net

\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 & 12 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ wold.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=194738&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]12 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ wold.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=194738&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=194738&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 time12 seconds
R Server'Herman Ole Andreas Wold' @ wold.wessa.net







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[60])
5351-------
5453-------
5537-------
5622-------
5755-------
5870-------
5962-------
6058-------
613963.156142.718983.59340.01030.68950.8350.6895
624940.81820.313861.32230.21710.5690.64240.0503
635844.892523.643866.14130.11330.35240.98260.1133
644744.527823.476565.5790.4090.10490.16480.1049
654245.975424.574767.3760.35790.46260.01390.1354
666253.072931.275274.87060.21110.84030.21110.3289
673948.07526.275869.87430.20730.10530.18610.1861
684055.615533.522477.70860.0830.92980.92980.4162
697264.873342.765186.98160.26380.98630.92030.7289
707052.46530.351674.57840.06010.04170.31190.3119
715453.295731.386975.20460.47490.06750.71340.3369
726557.627735.718679.53680.25480.62720.9190.4867

\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[60]) \tabularnewline
53 & 51 & - & - & - & - & - & - & - \tabularnewline
54 & 53 & - & - & - & - & - & - & - \tabularnewline
55 & 37 & - & - & - & - & - & - & - \tabularnewline
56 & 22 & - & - & - & - & - & - & - \tabularnewline
57 & 55 & - & - & - & - & - & - & - \tabularnewline
58 & 70 & - & - & - & - & - & - & - \tabularnewline
59 & 62 & - & - & - & - & - & - & - \tabularnewline
60 & 58 & - & - & - & - & - & - & - \tabularnewline
61 & 39 & 63.1561 & 42.7189 & 83.5934 & 0.0103 & 0.6895 & 0.835 & 0.6895 \tabularnewline
62 & 49 & 40.818 & 20.3138 & 61.3223 & 0.2171 & 0.569 & 0.6424 & 0.0503 \tabularnewline
63 & 58 & 44.8925 & 23.6438 & 66.1413 & 0.1133 & 0.3524 & 0.9826 & 0.1133 \tabularnewline
64 & 47 & 44.5278 & 23.4765 & 65.579 & 0.409 & 0.1049 & 0.1648 & 0.1049 \tabularnewline
65 & 42 & 45.9754 & 24.5747 & 67.376 & 0.3579 & 0.4626 & 0.0139 & 0.1354 \tabularnewline
66 & 62 & 53.0729 & 31.2752 & 74.8706 & 0.2111 & 0.8403 & 0.2111 & 0.3289 \tabularnewline
67 & 39 & 48.075 & 26.2758 & 69.8743 & 0.2073 & 0.1053 & 0.1861 & 0.1861 \tabularnewline
68 & 40 & 55.6155 & 33.5224 & 77.7086 & 0.083 & 0.9298 & 0.9298 & 0.4162 \tabularnewline
69 & 72 & 64.8733 & 42.7651 & 86.9816 & 0.2638 & 0.9863 & 0.9203 & 0.7289 \tabularnewline
70 & 70 & 52.465 & 30.3516 & 74.5784 & 0.0601 & 0.0417 & 0.3119 & 0.3119 \tabularnewline
71 & 54 & 53.2957 & 31.3869 & 75.2046 & 0.4749 & 0.0675 & 0.7134 & 0.3369 \tabularnewline
72 & 65 & 57.6277 & 35.7186 & 79.5368 & 0.2548 & 0.6272 & 0.919 & 0.4867 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=194738&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[60])[/C][/ROW]
[ROW][C]53[/C][C]51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]53[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]37[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]22[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]55[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]70[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]62[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]58[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]39[/C][C]63.1561[/C][C]42.7189[/C][C]83.5934[/C][C]0.0103[/C][C]0.6895[/C][C]0.835[/C][C]0.6895[/C][/ROW]
[ROW][C]62[/C][C]49[/C][C]40.818[/C][C]20.3138[/C][C]61.3223[/C][C]0.2171[/C][C]0.569[/C][C]0.6424[/C][C]0.0503[/C][/ROW]
[ROW][C]63[/C][C]58[/C][C]44.8925[/C][C]23.6438[/C][C]66.1413[/C][C]0.1133[/C][C]0.3524[/C][C]0.9826[/C][C]0.1133[/C][/ROW]
[ROW][C]64[/C][C]47[/C][C]44.5278[/C][C]23.4765[/C][C]65.579[/C][C]0.409[/C][C]0.1049[/C][C]0.1648[/C][C]0.1049[/C][/ROW]
[ROW][C]65[/C][C]42[/C][C]45.9754[/C][C]24.5747[/C][C]67.376[/C][C]0.3579[/C][C]0.4626[/C][C]0.0139[/C][C]0.1354[/C][/ROW]
[ROW][C]66[/C][C]62[/C][C]53.0729[/C][C]31.2752[/C][C]74.8706[/C][C]0.2111[/C][C]0.8403[/C][C]0.2111[/C][C]0.3289[/C][/ROW]
[ROW][C]67[/C][C]39[/C][C]48.075[/C][C]26.2758[/C][C]69.8743[/C][C]0.2073[/C][C]0.1053[/C][C]0.1861[/C][C]0.1861[/C][/ROW]
[ROW][C]68[/C][C]40[/C][C]55.6155[/C][C]33.5224[/C][C]77.7086[/C][C]0.083[/C][C]0.9298[/C][C]0.9298[/C][C]0.4162[/C][/ROW]
[ROW][C]69[/C][C]72[/C][C]64.8733[/C][C]42.7651[/C][C]86.9816[/C][C]0.2638[/C][C]0.9863[/C][C]0.9203[/C][C]0.7289[/C][/ROW]
[ROW][C]70[/C][C]70[/C][C]52.465[/C][C]30.3516[/C][C]74.5784[/C][C]0.0601[/C][C]0.0417[/C][C]0.3119[/C][C]0.3119[/C][/ROW]
[ROW][C]71[/C][C]54[/C][C]53.2957[/C][C]31.3869[/C][C]75.2046[/C][C]0.4749[/C][C]0.0675[/C][C]0.7134[/C][C]0.3369[/C][/ROW]
[ROW][C]72[/C][C]65[/C][C]57.6277[/C][C]35.7186[/C][C]79.5368[/C][C]0.2548[/C][C]0.6272[/C][C]0.919[/C][C]0.4867[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=194738&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=194738&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[60])
5351-------
5453-------
5537-------
5622-------
5755-------
5870-------
5962-------
6058-------
613963.156142.718983.59340.01030.68950.8350.6895
624940.81820.313861.32230.21710.5690.64240.0503
635844.892523.643866.14130.11330.35240.98260.1133
644744.527823.476565.5790.4090.10490.16480.1049
654245.975424.574767.3760.35790.46260.01390.1354
666253.072931.275274.87060.21110.84030.21110.3289
673948.07526.275869.87430.20730.10530.18610.1861
684055.615533.522477.70860.0830.92980.92980.4162
697264.873342.765186.98160.26380.98630.92030.7289
707052.46530.351674.57840.06010.04170.31190.3119
715453.295731.386975.20460.47490.06750.71340.3369
726557.627735.718679.53680.25480.62720.9190.4867







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.1651-0.38250583.519300
620.25630.20040.291566.9445325.231918.0342
630.24150.2920.2916171.8062274.0916.5557
640.24120.05550.23266.1118207.095514.3908
650.2375-0.08650.203415.8034168.837112.9937
660.20950.16820.197579.6937153.979812.4089
670.2313-0.18880.196382.3561143.747911.9895
680.2027-0.28080.2068243.8444156.259912.5004
690.17390.10990.196150.7894144.54112.0225
700.2150.33420.2099307.477160.834612.6821
710.20970.01320.1920.496146.258412.0937
720.1940.12790.186754.3512138.599411.7728

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.1651 & -0.3825 & 0 & 583.5193 & 0 & 0 \tabularnewline
62 & 0.2563 & 0.2004 & 0.2915 & 66.9445 & 325.2319 & 18.0342 \tabularnewline
63 & 0.2415 & 0.292 & 0.2916 & 171.8062 & 274.09 & 16.5557 \tabularnewline
64 & 0.2412 & 0.0555 & 0.2326 & 6.1118 & 207.0955 & 14.3908 \tabularnewline
65 & 0.2375 & -0.0865 & 0.2034 & 15.8034 & 168.8371 & 12.9937 \tabularnewline
66 & 0.2095 & 0.1682 & 0.1975 & 79.6937 & 153.9798 & 12.4089 \tabularnewline
67 & 0.2313 & -0.1888 & 0.1963 & 82.3561 & 143.7479 & 11.9895 \tabularnewline
68 & 0.2027 & -0.2808 & 0.2068 & 243.8444 & 156.2599 & 12.5004 \tabularnewline
69 & 0.1739 & 0.1099 & 0.1961 & 50.7894 & 144.541 & 12.0225 \tabularnewline
70 & 0.215 & 0.3342 & 0.2099 & 307.477 & 160.8346 & 12.6821 \tabularnewline
71 & 0.2097 & 0.0132 & 0.192 & 0.496 & 146.2584 & 12.0937 \tabularnewline
72 & 0.194 & 0.1279 & 0.1867 & 54.3512 & 138.5994 & 11.7728 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=194738&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]61[/C][C]0.1651[/C][C]-0.3825[/C][C]0[/C][C]583.5193[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.2563[/C][C]0.2004[/C][C]0.2915[/C][C]66.9445[/C][C]325.2319[/C][C]18.0342[/C][/ROW]
[ROW][C]63[/C][C]0.2415[/C][C]0.292[/C][C]0.2916[/C][C]171.8062[/C][C]274.09[/C][C]16.5557[/C][/ROW]
[ROW][C]64[/C][C]0.2412[/C][C]0.0555[/C][C]0.2326[/C][C]6.1118[/C][C]207.0955[/C][C]14.3908[/C][/ROW]
[ROW][C]65[/C][C]0.2375[/C][C]-0.0865[/C][C]0.2034[/C][C]15.8034[/C][C]168.8371[/C][C]12.9937[/C][/ROW]
[ROW][C]66[/C][C]0.2095[/C][C]0.1682[/C][C]0.1975[/C][C]79.6937[/C][C]153.9798[/C][C]12.4089[/C][/ROW]
[ROW][C]67[/C][C]0.2313[/C][C]-0.1888[/C][C]0.1963[/C][C]82.3561[/C][C]143.7479[/C][C]11.9895[/C][/ROW]
[ROW][C]68[/C][C]0.2027[/C][C]-0.2808[/C][C]0.2068[/C][C]243.8444[/C][C]156.2599[/C][C]12.5004[/C][/ROW]
[ROW][C]69[/C][C]0.1739[/C][C]0.1099[/C][C]0.1961[/C][C]50.7894[/C][C]144.541[/C][C]12.0225[/C][/ROW]
[ROW][C]70[/C][C]0.215[/C][C]0.3342[/C][C]0.2099[/C][C]307.477[/C][C]160.8346[/C][C]12.6821[/C][/ROW]
[ROW][C]71[/C][C]0.2097[/C][C]0.0132[/C][C]0.192[/C][C]0.496[/C][C]146.2584[/C][C]12.0937[/C][/ROW]
[ROW][C]72[/C][C]0.194[/C][C]0.1279[/C][C]0.1867[/C][C]54.3512[/C][C]138.5994[/C][C]11.7728[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=194738&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=194738&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
610.1651-0.38250583.519300
620.25630.20040.291566.9445325.231918.0342
630.24150.2920.2916171.8062274.0916.5557
640.24120.05550.23266.1118207.095514.3908
650.2375-0.08650.203415.8034168.837112.9937
660.20950.16820.197579.6937153.979812.4089
670.2313-0.18880.196382.3561143.747911.9895
680.2027-0.28080.2068243.8444156.259912.5004
690.17390.10990.196150.7894144.54112.0225
700.2150.33420.2099307.477160.834612.6821
710.20970.01320.1920.496146.258412.0937
720.1940.12790.186754.3512138.599411.7728



Parameters (Session):
par1 = 1 ; par2 = 0 ; par3 = 2 ; par4 = 12 ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 1 ; par7 = 1 ; par8 = 1 ; 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 <- 7 #seasonal period
par6 <- 4 #p
par7 <- as.numeric(par7) #q
par8 <- 4 #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')