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 09:06:22 -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/t11969564647iqgzi37a01f379.htm/, Retrieved Fri, 03 May 2024 08:19:03 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=2673, Retrieved Fri, 03 May 2024 08:19:03 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact189
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2007-12-06 16:06:22] [94abaf6e1c7b1fd4f9d5e2c2d987f350] [Current]
Feedback Forum

Post a new message
Dataseries X:
87
75
74
91
101
103
106
102
105
105
100
95
96
98
99
92
84
81
72
89
96
91
88
90
98
87
100
100
104
107
105
102
98
106
97
101
100
93
94
96
96
98
102
95
85
84
82
87
77
90
90
94
97
96
93
93
93
97
100
95
97
103
102
93
99
100
97
104
102
103
100
90
90




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2673&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])
4977-------
5090-------
5190-------
5294-------
5397-------
5496-------
5593-------
5693-------
5793-------
5897-------
59100-------
6095-------
6197-------
6210396.187984.6528107.72290.12350.44510.85350.4451
6310295.600781.2669109.93450.19080.15580.77810.4241
649395.176379.5122110.84040.39270.19660.55850.4097
659994.869578.5075111.23150.31040.58860.39930.3993
6610094.647777.9002111.39510.26550.30520.43710.3915
679794.487377.5188111.45580.38580.26210.56820.3858
6810494.371477.272111.47080.13490.38160.56250.3816
6910294.287677.1083111.46690.18950.13390.55840.3785
7010394.22776.9975111.45650.15910.18830.37620.3762
7110094.183276.9214111.4450.25450.15840.25450.3745
729094.151576.8683111.43470.31890.25360.46170.3733
739094.128676.8311111.42620.320.680.37250.3725

\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 & 77 & - & - & - & - & - & - & - \tabularnewline
50 & 90 & - & - & - & - & - & - & - \tabularnewline
51 & 90 & - & - & - & - & - & - & - \tabularnewline
52 & 94 & - & - & - & - & - & - & - \tabularnewline
53 & 97 & - & - & - & - & - & - & - \tabularnewline
54 & 96 & - & - & - & - & - & - & - \tabularnewline
55 & 93 & - & - & - & - & - & - & - \tabularnewline
56 & 93 & - & - & - & - & - & - & - \tabularnewline
57 & 93 & - & - & - & - & - & - & - \tabularnewline
58 & 97 & - & - & - & - & - & - & - \tabularnewline
59 & 100 & - & - & - & - & - & - & - \tabularnewline
60 & 95 & - & - & - & - & - & - & - \tabularnewline
61 & 97 & - & - & - & - & - & - & - \tabularnewline
62 & 103 & 96.1879 & 84.6528 & 107.7229 & 0.1235 & 0.4451 & 0.8535 & 0.4451 \tabularnewline
63 & 102 & 95.6007 & 81.2669 & 109.9345 & 0.1908 & 0.1558 & 0.7781 & 0.4241 \tabularnewline
64 & 93 & 95.1763 & 79.5122 & 110.8404 & 0.3927 & 0.1966 & 0.5585 & 0.4097 \tabularnewline
65 & 99 & 94.8695 & 78.5075 & 111.2315 & 0.3104 & 0.5886 & 0.3993 & 0.3993 \tabularnewline
66 & 100 & 94.6477 & 77.9002 & 111.3951 & 0.2655 & 0.3052 & 0.4371 & 0.3915 \tabularnewline
67 & 97 & 94.4873 & 77.5188 & 111.4558 & 0.3858 & 0.2621 & 0.5682 & 0.3858 \tabularnewline
68 & 104 & 94.3714 & 77.272 & 111.4708 & 0.1349 & 0.3816 & 0.5625 & 0.3816 \tabularnewline
69 & 102 & 94.2876 & 77.1083 & 111.4669 & 0.1895 & 0.1339 & 0.5584 & 0.3785 \tabularnewline
70 & 103 & 94.227 & 76.9975 & 111.4565 & 0.1591 & 0.1883 & 0.3762 & 0.3762 \tabularnewline
71 & 100 & 94.1832 & 76.9214 & 111.445 & 0.2545 & 0.1584 & 0.2545 & 0.3745 \tabularnewline
72 & 90 & 94.1515 & 76.8683 & 111.4347 & 0.3189 & 0.2536 & 0.4617 & 0.3733 \tabularnewline
73 & 90 & 94.1286 & 76.8311 & 111.4262 & 0.32 & 0.68 & 0.3725 & 0.3725 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2673&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]77[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]90[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]90[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]94[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]97[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]96[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]93[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]93[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]93[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]97[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]100[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]95[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]97[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]103[/C][C]96.1879[/C][C]84.6528[/C][C]107.7229[/C][C]0.1235[/C][C]0.4451[/C][C]0.8535[/C][C]0.4451[/C][/ROW]
[ROW][C]63[/C][C]102[/C][C]95.6007[/C][C]81.2669[/C][C]109.9345[/C][C]0.1908[/C][C]0.1558[/C][C]0.7781[/C][C]0.4241[/C][/ROW]
[ROW][C]64[/C][C]93[/C][C]95.1763[/C][C]79.5122[/C][C]110.8404[/C][C]0.3927[/C][C]0.1966[/C][C]0.5585[/C][C]0.4097[/C][/ROW]
[ROW][C]65[/C][C]99[/C][C]94.8695[/C][C]78.5075[/C][C]111.2315[/C][C]0.3104[/C][C]0.5886[/C][C]0.3993[/C][C]0.3993[/C][/ROW]
[ROW][C]66[/C][C]100[/C][C]94.6477[/C][C]77.9002[/C][C]111.3951[/C][C]0.2655[/C][C]0.3052[/C][C]0.4371[/C][C]0.3915[/C][/ROW]
[ROW][C]67[/C][C]97[/C][C]94.4873[/C][C]77.5188[/C][C]111.4558[/C][C]0.3858[/C][C]0.2621[/C][C]0.5682[/C][C]0.3858[/C][/ROW]
[ROW][C]68[/C][C]104[/C][C]94.3714[/C][C]77.272[/C][C]111.4708[/C][C]0.1349[/C][C]0.3816[/C][C]0.5625[/C][C]0.3816[/C][/ROW]
[ROW][C]69[/C][C]102[/C][C]94.2876[/C][C]77.1083[/C][C]111.4669[/C][C]0.1895[/C][C]0.1339[/C][C]0.5584[/C][C]0.3785[/C][/ROW]
[ROW][C]70[/C][C]103[/C][C]94.227[/C][C]76.9975[/C][C]111.4565[/C][C]0.1591[/C][C]0.1883[/C][C]0.3762[/C][C]0.3762[/C][/ROW]
[ROW][C]71[/C][C]100[/C][C]94.1832[/C][C]76.9214[/C][C]111.445[/C][C]0.2545[/C][C]0.1584[/C][C]0.2545[/C][C]0.3745[/C][/ROW]
[ROW][C]72[/C][C]90[/C][C]94.1515[/C][C]76.8683[/C][C]111.4347[/C][C]0.3189[/C][C]0.2536[/C][C]0.4617[/C][C]0.3733[/C][/ROW]
[ROW][C]73[/C][C]90[/C][C]94.1286[/C][C]76.8311[/C][C]111.4262[/C][C]0.32[/C][C]0.68[/C][C]0.3725[/C][C]0.3725[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2673&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2673&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])
4977-------
5090-------
5190-------
5294-------
5397-------
5496-------
5593-------
5693-------
5793-------
5897-------
59100-------
6095-------
6197-------
6210396.187984.6528107.72290.12350.44510.85350.4451
6310295.600781.2669109.93450.19080.15580.77810.4241
649395.176379.5122110.84040.39270.19660.55850.4097
659994.869578.5075111.23150.31040.58860.39930.3993
6610094.647777.9002111.39510.26550.30520.43710.3915
679794.487377.5188111.45580.38580.26210.56820.3858
6810494.371477.272111.47080.13490.38160.56250.3816
6910294.287677.1083111.46690.18950.13390.55840.3785
7010394.22776.9975111.45650.15910.18830.37620.3762
7110094.183276.9214111.4450.25450.15840.25450.3745
729094.151576.8683111.43470.31890.25360.46170.3733
739094.128676.8311111.42620.320.680.37250.3725







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
620.06120.07080.005946.40533.86711.9665
630.07650.06690.005640.95053.41251.8473
640.084-0.02290.00194.73630.39470.6282
650.0880.04350.003617.06131.42181.1924
660.09030.05660.004728.64762.38731.5451
670.09160.02660.00226.31370.52610.7254
680.09240.1020.008592.71057.72592.7795
690.0930.08180.006859.48164.95682.2264
700.09330.09310.007876.96586.41382.5326
710.09350.06180.005133.83532.81961.6792
720.0937-0.04410.003717.23511.43631.1984
730.0938-0.04390.003717.04561.42051.1918

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
62 & 0.0612 & 0.0708 & 0.0059 & 46.4053 & 3.8671 & 1.9665 \tabularnewline
63 & 0.0765 & 0.0669 & 0.0056 & 40.9505 & 3.4125 & 1.8473 \tabularnewline
64 & 0.084 & -0.0229 & 0.0019 & 4.7363 & 0.3947 & 0.6282 \tabularnewline
65 & 0.088 & 0.0435 & 0.0036 & 17.0613 & 1.4218 & 1.1924 \tabularnewline
66 & 0.0903 & 0.0566 & 0.0047 & 28.6476 & 2.3873 & 1.5451 \tabularnewline
67 & 0.0916 & 0.0266 & 0.0022 & 6.3137 & 0.5261 & 0.7254 \tabularnewline
68 & 0.0924 & 0.102 & 0.0085 & 92.7105 & 7.7259 & 2.7795 \tabularnewline
69 & 0.093 & 0.0818 & 0.0068 & 59.4816 & 4.9568 & 2.2264 \tabularnewline
70 & 0.0933 & 0.0931 & 0.0078 & 76.9658 & 6.4138 & 2.5326 \tabularnewline
71 & 0.0935 & 0.0618 & 0.0051 & 33.8353 & 2.8196 & 1.6792 \tabularnewline
72 & 0.0937 & -0.0441 & 0.0037 & 17.2351 & 1.4363 & 1.1984 \tabularnewline
73 & 0.0938 & -0.0439 & 0.0037 & 17.0456 & 1.4205 & 1.1918 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=2673&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.0612[/C][C]0.0708[/C][C]0.0059[/C][C]46.4053[/C][C]3.8671[/C][C]1.9665[/C][/ROW]
[ROW][C]63[/C][C]0.0765[/C][C]0.0669[/C][C]0.0056[/C][C]40.9505[/C][C]3.4125[/C][C]1.8473[/C][/ROW]
[ROW][C]64[/C][C]0.084[/C][C]-0.0229[/C][C]0.0019[/C][C]4.7363[/C][C]0.3947[/C][C]0.6282[/C][/ROW]
[ROW][C]65[/C][C]0.088[/C][C]0.0435[/C][C]0.0036[/C][C]17.0613[/C][C]1.4218[/C][C]1.1924[/C][/ROW]
[ROW][C]66[/C][C]0.0903[/C][C]0.0566[/C][C]0.0047[/C][C]28.6476[/C][C]2.3873[/C][C]1.5451[/C][/ROW]
[ROW][C]67[/C][C]0.0916[/C][C]0.0266[/C][C]0.0022[/C][C]6.3137[/C][C]0.5261[/C][C]0.7254[/C][/ROW]
[ROW][C]68[/C][C]0.0924[/C][C]0.102[/C][C]0.0085[/C][C]92.7105[/C][C]7.7259[/C][C]2.7795[/C][/ROW]
[ROW][C]69[/C][C]0.093[/C][C]0.0818[/C][C]0.0068[/C][C]59.4816[/C][C]4.9568[/C][C]2.2264[/C][/ROW]
[ROW][C]70[/C][C]0.0933[/C][C]0.0931[/C][C]0.0078[/C][C]76.9658[/C][C]6.4138[/C][C]2.5326[/C][/ROW]
[ROW][C]71[/C][C]0.0935[/C][C]0.0618[/C][C]0.0051[/C][C]33.8353[/C][C]2.8196[/C][C]1.6792[/C][/ROW]
[ROW][C]72[/C][C]0.0937[/C][C]-0.0441[/C][C]0.0037[/C][C]17.2351[/C][C]1.4363[/C][C]1.1984[/C][/ROW]
[ROW][C]73[/C][C]0.0938[/C][C]-0.0439[/C][C]0.0037[/C][C]17.0456[/C][C]1.4205[/C][C]1.1918[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=2673&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=2673&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.06120.07080.005946.40533.86711.9665
630.07650.06690.005640.95053.41251.8473
640.084-0.02290.00194.73630.39470.6282
650.0880.04350.003617.06131.42181.1924
660.09030.05660.004728.64762.38731.5451
670.09160.02660.00226.31370.52610.7254
680.09240.1020.008592.71057.72592.7795
690.0930.08180.006859.48164.95682.2264
700.09330.09310.007876.96586.41382.5326
710.09350.06180.005133.83532.81961.6792
720.0937-0.04410.003717.23511.43631.1984
730.0938-0.04390.003717.04561.42051.1918



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')