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 computationTue, 09 Dec 2008 06:43:01 -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/2008/Dec/09/t12288302600qxm6z2iiuunqse.htm/, Retrieved Sun, 19 May 2024 11:14:10 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=31384, Retrieved Sun, 19 May 2024 11:14:10 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact184
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [AEFC PAPER] [2008-12-09 13:43:01] [e11d930c9e2984715c66c796cf63ef19] [Current]
F    D    [ARIMA Forecasting] [AEFC PAPER] [2008-12-09 13:53:06] [547636b63517c1c2916a747d66b36ebf]
F           [ARIMA Forecasting] [Arima forecasting...] [2008-12-12 08:26:54] [077ffec662d24c06be4c491541a44245]
F             [ARIMA Forecasting] [] [2008-12-14 21:26:41] [4c8dfb519edec2da3492d7e6be9a5685]
Feedback Forum

Post a new message




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=31384&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[132])
120337-------
121360-------
122342-------
123406-------
124396-------
125420-------
126472-------
127548-------
128559-------
129463-------
130407-------
131362-------
132405-------
133417420.497396.2054445.51120.3920.887710.8877
134391404.2333375.1383434.41470.19510.203510.4801
135419468.132432.0793505.62920.005110.99940.9995
136461458.8387418.458501.07890.46010.96770.99820.9938
137472480.3479435.8643526.99260.36290.79190.99440.9992
138535536.7239485.7711590.21730.47480.99110.99111
139622613.4526556.0752673.64670.39040.99470.98351
140606625.574564.3226689.98050.27570.54330.97861
141508520.4632462.5905581.74570.34510.00310.9670.9999
142461461.1092404.4612521.46850.49860.06390.96050.9658
143390410.5698355.6181469.46780.24680.04670.9470.5735
144432456.1921396.2843520.31520.22980.97850.94120.9412

\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[132]) \tabularnewline
120 & 337 & - & - & - & - & - & - & - \tabularnewline
121 & 360 & - & - & - & - & - & - & - \tabularnewline
122 & 342 & - & - & - & - & - & - & - \tabularnewline
123 & 406 & - & - & - & - & - & - & - \tabularnewline
124 & 396 & - & - & - & - & - & - & - \tabularnewline
125 & 420 & - & - & - & - & - & - & - \tabularnewline
126 & 472 & - & - & - & - & - & - & - \tabularnewline
127 & 548 & - & - & - & - & - & - & - \tabularnewline
128 & 559 & - & - & - & - & - & - & - \tabularnewline
129 & 463 & - & - & - & - & - & - & - \tabularnewline
130 & 407 & - & - & - & - & - & - & - \tabularnewline
131 & 362 & - & - & - & - & - & - & - \tabularnewline
132 & 405 & - & - & - & - & - & - & - \tabularnewline
133 & 417 & 420.497 & 396.2054 & 445.5112 & 0.392 & 0.8877 & 1 & 0.8877 \tabularnewline
134 & 391 & 404.2333 & 375.1383 & 434.4147 & 0.1951 & 0.2035 & 1 & 0.4801 \tabularnewline
135 & 419 & 468.132 & 432.0793 & 505.6292 & 0.0051 & 1 & 0.9994 & 0.9995 \tabularnewline
136 & 461 & 458.8387 & 418.458 & 501.0789 & 0.4601 & 0.9677 & 0.9982 & 0.9938 \tabularnewline
137 & 472 & 480.3479 & 435.8643 & 526.9926 & 0.3629 & 0.7919 & 0.9944 & 0.9992 \tabularnewline
138 & 535 & 536.7239 & 485.7711 & 590.2173 & 0.4748 & 0.9911 & 0.9911 & 1 \tabularnewline
139 & 622 & 613.4526 & 556.0752 & 673.6467 & 0.3904 & 0.9947 & 0.9835 & 1 \tabularnewline
140 & 606 & 625.574 & 564.3226 & 689.9805 & 0.2757 & 0.5433 & 0.9786 & 1 \tabularnewline
141 & 508 & 520.4632 & 462.5905 & 581.7457 & 0.3451 & 0.0031 & 0.967 & 0.9999 \tabularnewline
142 & 461 & 461.1092 & 404.4612 & 521.4685 & 0.4986 & 0.0639 & 0.9605 & 0.9658 \tabularnewline
143 & 390 & 410.5698 & 355.6181 & 469.4678 & 0.2468 & 0.0467 & 0.947 & 0.5735 \tabularnewline
144 & 432 & 456.1921 & 396.2843 & 520.3152 & 0.2298 & 0.9785 & 0.9412 & 0.9412 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=31384&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[132])[/C][/ROW]
[ROW][C]120[/C][C]337[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]121[/C][C]360[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]122[/C][C]342[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]123[/C][C]406[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]124[/C][C]396[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]125[/C][C]420[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]126[/C][C]472[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]127[/C][C]548[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]128[/C][C]559[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]129[/C][C]463[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]130[/C][C]407[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]131[/C][C]362[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]132[/C][C]405[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]133[/C][C]417[/C][C]420.497[/C][C]396.2054[/C][C]445.5112[/C][C]0.392[/C][C]0.8877[/C][C]1[/C][C]0.8877[/C][/ROW]
[ROW][C]134[/C][C]391[/C][C]404.2333[/C][C]375.1383[/C][C]434.4147[/C][C]0.1951[/C][C]0.2035[/C][C]1[/C][C]0.4801[/C][/ROW]
[ROW][C]135[/C][C]419[/C][C]468.132[/C][C]432.0793[/C][C]505.6292[/C][C]0.0051[/C][C]1[/C][C]0.9994[/C][C]0.9995[/C][/ROW]
[ROW][C]136[/C][C]461[/C][C]458.8387[/C][C]418.458[/C][C]501.0789[/C][C]0.4601[/C][C]0.9677[/C][C]0.9982[/C][C]0.9938[/C][/ROW]
[ROW][C]137[/C][C]472[/C][C]480.3479[/C][C]435.8643[/C][C]526.9926[/C][C]0.3629[/C][C]0.7919[/C][C]0.9944[/C][C]0.9992[/C][/ROW]
[ROW][C]138[/C][C]535[/C][C]536.7239[/C][C]485.7711[/C][C]590.2173[/C][C]0.4748[/C][C]0.9911[/C][C]0.9911[/C][C]1[/C][/ROW]
[ROW][C]139[/C][C]622[/C][C]613.4526[/C][C]556.0752[/C][C]673.6467[/C][C]0.3904[/C][C]0.9947[/C][C]0.9835[/C][C]1[/C][/ROW]
[ROW][C]140[/C][C]606[/C][C]625.574[/C][C]564.3226[/C][C]689.9805[/C][C]0.2757[/C][C]0.5433[/C][C]0.9786[/C][C]1[/C][/ROW]
[ROW][C]141[/C][C]508[/C][C]520.4632[/C][C]462.5905[/C][C]581.7457[/C][C]0.3451[/C][C]0.0031[/C][C]0.967[/C][C]0.9999[/C][/ROW]
[ROW][C]142[/C][C]461[/C][C]461.1092[/C][C]404.4612[/C][C]521.4685[/C][C]0.4986[/C][C]0.0639[/C][C]0.9605[/C][C]0.9658[/C][/ROW]
[ROW][C]143[/C][C]390[/C][C]410.5698[/C][C]355.6181[/C][C]469.4678[/C][C]0.2468[/C][C]0.0467[/C][C]0.947[/C][C]0.5735[/C][/ROW]
[ROW][C]144[/C][C]432[/C][C]456.1921[/C][C]396.2843[/C][C]520.3152[/C][C]0.2298[/C][C]0.9785[/C][C]0.9412[/C][C]0.9412[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=31384&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=31384&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[132])
120337-------
121360-------
122342-------
123406-------
124396-------
125420-------
126472-------
127548-------
128559-------
129463-------
130407-------
131362-------
132405-------
133417420.497396.2054445.51120.3920.887710.8877
134391404.2333375.1383434.41470.19510.203510.4801
135419468.132432.0793505.62920.005110.99940.9995
136461458.8387418.458501.07890.46010.96770.99820.9938
137472480.3479435.8643526.99260.36290.79190.99440.9992
138535536.7239485.7711590.21730.47480.99110.99111
139622613.4526556.0752673.64670.39040.99470.98351
140606625.574564.3226689.98050.27570.54330.97861
141508520.4632462.5905581.74570.34510.00310.9670.9999
142461461.1092404.4612521.46850.49860.06390.96050.9658
143390410.5698355.6181469.46780.24680.04670.9470.5735
144432456.1921396.2843520.31520.22980.97850.94120.9412







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
1330.0304-0.00837e-0412.2291.01911.0095
1340.0381-0.03270.0027175.119314.59333.8201
1350.0409-0.1050.00872413.9537201.162814.1832
1360.0470.00474e-044.67140.38930.6239
1370.0495-0.01740.001469.6885.80732.4098
1380.0509-0.00323e-042.97180.24770.4976
1390.05010.01390.001273.05726.08812.4674
1400.0525-0.03130.0026383.141331.92845.6505
1410.0601-0.02390.002155.330412.94423.5978
1420.0668-2e-0400.01190.0010.0315
1430.0732-0.05010.0042423.117735.25985.938
1440.0717-0.0530.0044585.257348.77146.9837

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
133 & 0.0304 & -0.0083 & 7e-04 & 12.229 & 1.0191 & 1.0095 \tabularnewline
134 & 0.0381 & -0.0327 & 0.0027 & 175.1193 & 14.5933 & 3.8201 \tabularnewline
135 & 0.0409 & -0.105 & 0.0087 & 2413.9537 & 201.1628 & 14.1832 \tabularnewline
136 & 0.047 & 0.0047 & 4e-04 & 4.6714 & 0.3893 & 0.6239 \tabularnewline
137 & 0.0495 & -0.0174 & 0.0014 & 69.688 & 5.8073 & 2.4098 \tabularnewline
138 & 0.0509 & -0.0032 & 3e-04 & 2.9718 & 0.2477 & 0.4976 \tabularnewline
139 & 0.0501 & 0.0139 & 0.0012 & 73.0572 & 6.0881 & 2.4674 \tabularnewline
140 & 0.0525 & -0.0313 & 0.0026 & 383.1413 & 31.9284 & 5.6505 \tabularnewline
141 & 0.0601 & -0.0239 & 0.002 & 155.3304 & 12.9442 & 3.5978 \tabularnewline
142 & 0.0668 & -2e-04 & 0 & 0.0119 & 0.001 & 0.0315 \tabularnewline
143 & 0.0732 & -0.0501 & 0.0042 & 423.1177 & 35.2598 & 5.938 \tabularnewline
144 & 0.0717 & -0.053 & 0.0044 & 585.2573 & 48.7714 & 6.9837 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=31384&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]133[/C][C]0.0304[/C][C]-0.0083[/C][C]7e-04[/C][C]12.229[/C][C]1.0191[/C][C]1.0095[/C][/ROW]
[ROW][C]134[/C][C]0.0381[/C][C]-0.0327[/C][C]0.0027[/C][C]175.1193[/C][C]14.5933[/C][C]3.8201[/C][/ROW]
[ROW][C]135[/C][C]0.0409[/C][C]-0.105[/C][C]0.0087[/C][C]2413.9537[/C][C]201.1628[/C][C]14.1832[/C][/ROW]
[ROW][C]136[/C][C]0.047[/C][C]0.0047[/C][C]4e-04[/C][C]4.6714[/C][C]0.3893[/C][C]0.6239[/C][/ROW]
[ROW][C]137[/C][C]0.0495[/C][C]-0.0174[/C][C]0.0014[/C][C]69.688[/C][C]5.8073[/C][C]2.4098[/C][/ROW]
[ROW][C]138[/C][C]0.0509[/C][C]-0.0032[/C][C]3e-04[/C][C]2.9718[/C][C]0.2477[/C][C]0.4976[/C][/ROW]
[ROW][C]139[/C][C]0.0501[/C][C]0.0139[/C][C]0.0012[/C][C]73.0572[/C][C]6.0881[/C][C]2.4674[/C][/ROW]
[ROW][C]140[/C][C]0.0525[/C][C]-0.0313[/C][C]0.0026[/C][C]383.1413[/C][C]31.9284[/C][C]5.6505[/C][/ROW]
[ROW][C]141[/C][C]0.0601[/C][C]-0.0239[/C][C]0.002[/C][C]155.3304[/C][C]12.9442[/C][C]3.5978[/C][/ROW]
[ROW][C]142[/C][C]0.0668[/C][C]-2e-04[/C][C]0[/C][C]0.0119[/C][C]0.001[/C][C]0.0315[/C][/ROW]
[ROW][C]143[/C][C]0.0732[/C][C]-0.0501[/C][C]0.0042[/C][C]423.1177[/C][C]35.2598[/C][C]5.938[/C][/ROW]
[ROW][C]144[/C][C]0.0717[/C][C]-0.053[/C][C]0.0044[/C][C]585.2573[/C][C]48.7714[/C][C]6.9837[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=31384&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=31384&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
1330.0304-0.00837e-0412.2291.01911.0095
1340.0381-0.03270.0027175.119314.59333.8201
1350.0409-0.1050.00872413.9537201.162814.1832
1360.0470.00474e-044.67140.38930.6239
1370.0495-0.01740.001469.6885.80732.4098
1380.0509-0.00323e-042.97180.24770.4976
1390.05010.01390.001273.05726.08812.4674
1400.0525-0.03130.0026383.141331.92845.6505
1410.0601-0.02390.002155.330412.94423.5978
1420.0668-2e-0400.01190.0010.0315
1430.0732-0.05010.0042423.117735.25985.938
1440.0717-0.0530.0044585.257348.77146.9837



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