Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 18 Dec 2008 02:57:38 -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/18/t1229594307mn45tzswe9ac1zq.htm/, Retrieved Sun, 12 May 2024 02:16:50 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34619, Retrieved Sun, 12 May 2024 02:16:50 +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)
F     [ARIMA Forecasting] [] [2008-12-14 15:36:53] [367e7d6b927a953ac0842a6750211350]
-   P     [ARIMA Forecasting] [Assessment ARIMA ...] [2008-12-18 09:57:38] [d41d8cd98f00b204e9800998ecf8427e] [Current]
-           [ARIMA Forecasting] [arima] [2008-12-22 20:39:03] [a4602103a5e123497aa555277d0e627b]
Feedback Forum

Post a new message
Dataseries X:
45
24
18
20
22
39
55
35
38
47
1
57
50
33
19
2
7
15
56
53
24
48
2
49
46
32
37
10
8
16
55
46
46
45
6
45
52
44
35
15
44
51
58
23
44
43
6
51
53
47
19
18
38
43
23
43
18
43
6
31
49




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 1 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34619&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]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34619&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34619&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 time1 seconds
R Server'George Udny Yule' @ 72.249.76.132







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[49])
3752-------
3844-------
3935-------
4015-------
4144-------
4251-------
4358-------
4423-------
4544-------
4643-------
476-------
4851-------
4953-------
504742.185617.227167.14420.35270.19790.44330.1979
511935.302410.343860.26090.10020.17910.50950.0823
521814.244-10.714539.20260.3840.35440.47630.0012
533838.556913.598463.51550.48260.94680.33450.1284
544345.708120.749670.66670.41580.72750.33890.2834
552357.546432.587982.5050.00330.87330.48580.6395
564326.47751.51951.43610.09720.60760.60760.0186
571844.302419.343869.26090.01940.54070.50950.2473
584343.302418.343868.26090.49050.97650.50950.2232
5966-18.958530.95850.50.00180.51e-04
603150.092825.134375.05140.06690.99970.47160.4097
614952.848827.890377.80740.38120.95690.49530.4953

\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[49]) \tabularnewline
37 & 52 & - & - & - & - & - & - & - \tabularnewline
38 & 44 & - & - & - & - & - & - & - \tabularnewline
39 & 35 & - & - & - & - & - & - & - \tabularnewline
40 & 15 & - & - & - & - & - & - & - \tabularnewline
41 & 44 & - & - & - & - & - & - & - \tabularnewline
42 & 51 & - & - & - & - & - & - & - \tabularnewline
43 & 58 & - & - & - & - & - & - & - \tabularnewline
44 & 23 & - & - & - & - & - & - & - \tabularnewline
45 & 44 & - & - & - & - & - & - & - \tabularnewline
46 & 43 & - & - & - & - & - & - & - \tabularnewline
47 & 6 & - & - & - & - & - & - & - \tabularnewline
48 & 51 & - & - & - & - & - & - & - \tabularnewline
49 & 53 & - & - & - & - & - & - & - \tabularnewline
50 & 47 & 42.1856 & 17.2271 & 67.1442 & 0.3527 & 0.1979 & 0.4433 & 0.1979 \tabularnewline
51 & 19 & 35.3024 & 10.3438 & 60.2609 & 0.1002 & 0.1791 & 0.5095 & 0.0823 \tabularnewline
52 & 18 & 14.244 & -10.7145 & 39.2026 & 0.384 & 0.3544 & 0.4763 & 0.0012 \tabularnewline
53 & 38 & 38.5569 & 13.5984 & 63.5155 & 0.4826 & 0.9468 & 0.3345 & 0.1284 \tabularnewline
54 & 43 & 45.7081 & 20.7496 & 70.6667 & 0.4158 & 0.7275 & 0.3389 & 0.2834 \tabularnewline
55 & 23 & 57.5464 & 32.5879 & 82.505 & 0.0033 & 0.8733 & 0.4858 & 0.6395 \tabularnewline
56 & 43 & 26.4775 & 1.519 & 51.4361 & 0.0972 & 0.6076 & 0.6076 & 0.0186 \tabularnewline
57 & 18 & 44.3024 & 19.3438 & 69.2609 & 0.0194 & 0.5407 & 0.5095 & 0.2473 \tabularnewline
58 & 43 & 43.3024 & 18.3438 & 68.2609 & 0.4905 & 0.9765 & 0.5095 & 0.2232 \tabularnewline
59 & 6 & 6 & -18.9585 & 30.9585 & 0.5 & 0.0018 & 0.5 & 1e-04 \tabularnewline
60 & 31 & 50.0928 & 25.1343 & 75.0514 & 0.0669 & 0.9997 & 0.4716 & 0.4097 \tabularnewline
61 & 49 & 52.8488 & 27.8903 & 77.8074 & 0.3812 & 0.9569 & 0.4953 & 0.4953 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34619&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[49])[/C][/ROW]
[ROW][C]37[/C][C]52[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]44[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]35[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]15[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]44[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]58[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]23[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]44[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]43[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]53[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]47[/C][C]42.1856[/C][C]17.2271[/C][C]67.1442[/C][C]0.3527[/C][C]0.1979[/C][C]0.4433[/C][C]0.1979[/C][/ROW]
[ROW][C]51[/C][C]19[/C][C]35.3024[/C][C]10.3438[/C][C]60.2609[/C][C]0.1002[/C][C]0.1791[/C][C]0.5095[/C][C]0.0823[/C][/ROW]
[ROW][C]52[/C][C]18[/C][C]14.244[/C][C]-10.7145[/C][C]39.2026[/C][C]0.384[/C][C]0.3544[/C][C]0.4763[/C][C]0.0012[/C][/ROW]
[ROW][C]53[/C][C]38[/C][C]38.5569[/C][C]13.5984[/C][C]63.5155[/C][C]0.4826[/C][C]0.9468[/C][C]0.3345[/C][C]0.1284[/C][/ROW]
[ROW][C]54[/C][C]43[/C][C]45.7081[/C][C]20.7496[/C][C]70.6667[/C][C]0.4158[/C][C]0.7275[/C][C]0.3389[/C][C]0.2834[/C][/ROW]
[ROW][C]55[/C][C]23[/C][C]57.5464[/C][C]32.5879[/C][C]82.505[/C][C]0.0033[/C][C]0.8733[/C][C]0.4858[/C][C]0.6395[/C][/ROW]
[ROW][C]56[/C][C]43[/C][C]26.4775[/C][C]1.519[/C][C]51.4361[/C][C]0.0972[/C][C]0.6076[/C][C]0.6076[/C][C]0.0186[/C][/ROW]
[ROW][C]57[/C][C]18[/C][C]44.3024[/C][C]19.3438[/C][C]69.2609[/C][C]0.0194[/C][C]0.5407[/C][C]0.5095[/C][C]0.2473[/C][/ROW]
[ROW][C]58[/C][C]43[/C][C]43.3024[/C][C]18.3438[/C][C]68.2609[/C][C]0.4905[/C][C]0.9765[/C][C]0.5095[/C][C]0.2232[/C][/ROW]
[ROW][C]59[/C][C]6[/C][C]6[/C][C]-18.9585[/C][C]30.9585[/C][C]0.5[/C][C]0.0018[/C][C]0.5[/C][C]1e-04[/C][/ROW]
[ROW][C]60[/C][C]31[/C][C]50.0928[/C][C]25.1343[/C][C]75.0514[/C][C]0.0669[/C][C]0.9997[/C][C]0.4716[/C][C]0.4097[/C][/ROW]
[ROW][C]61[/C][C]49[/C][C]52.8488[/C][C]27.8903[/C][C]77.8074[/C][C]0.3812[/C][C]0.9569[/C][C]0.4953[/C][C]0.4953[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34619&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34619&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[49])
3752-------
3844-------
3935-------
4015-------
4144-------
4251-------
4358-------
4423-------
4544-------
4643-------
476-------
4851-------
4953-------
504742.185617.227167.14420.35270.19790.44330.1979
511935.302410.343860.26090.10020.17910.50950.0823
521814.244-10.714539.20260.3840.35440.47630.0012
533838.556913.598463.51550.48260.94680.33450.1284
544345.708120.749670.66670.41580.72750.33890.2834
552357.546432.587982.5050.00330.87330.48580.6395
564326.47751.51951.43610.09720.60760.60760.0186
571844.302419.343869.26090.01940.54070.50950.2473
584343.302418.343868.26090.49050.97650.50950.2232
5966-18.958530.95850.50.00180.51e-04
603150.092825.134375.05140.06690.99970.47160.4097
614952.848827.890377.80740.38120.95690.49530.4953







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.30190.11410.009523.1781.93151.3898
510.3607-0.46180.0385265.76822.14734.7061
520.8940.26370.02214.10741.17561.0843
530.3303-0.01440.00120.31020.02580.1608
540.2786-0.05920.00497.33390.61120.7818
550.2213-0.60030.051193.454599.45459.9727
560.48090.6240.052272.992322.74944.7696
570.2874-0.59370.0495691.815957.65137.5928
580.2941-0.0076e-040.09140.00760.0873
592.122300000
600.2542-0.38110.0318364.535830.3785.5116
610.241-0.07280.006114.81331.23441.1111

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.3019 & 0.1141 & 0.0095 & 23.178 & 1.9315 & 1.3898 \tabularnewline
51 & 0.3607 & -0.4618 & 0.0385 & 265.768 & 22.1473 & 4.7061 \tabularnewline
52 & 0.894 & 0.2637 & 0.022 & 14.1074 & 1.1756 & 1.0843 \tabularnewline
53 & 0.3303 & -0.0144 & 0.0012 & 0.3102 & 0.0258 & 0.1608 \tabularnewline
54 & 0.2786 & -0.0592 & 0.0049 & 7.3339 & 0.6112 & 0.7818 \tabularnewline
55 & 0.2213 & -0.6003 & 0.05 & 1193.4545 & 99.4545 & 9.9727 \tabularnewline
56 & 0.4809 & 0.624 & 0.052 & 272.9923 & 22.7494 & 4.7696 \tabularnewline
57 & 0.2874 & -0.5937 & 0.0495 & 691.8159 & 57.6513 & 7.5928 \tabularnewline
58 & 0.2941 & -0.007 & 6e-04 & 0.0914 & 0.0076 & 0.0873 \tabularnewline
59 & 2.1223 & 0 & 0 & 0 & 0 & 0 \tabularnewline
60 & 0.2542 & -0.3811 & 0.0318 & 364.5358 & 30.378 & 5.5116 \tabularnewline
61 & 0.241 & -0.0728 & 0.0061 & 14.8133 & 1.2344 & 1.1111 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34619&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]50[/C][C]0.3019[/C][C]0.1141[/C][C]0.0095[/C][C]23.178[/C][C]1.9315[/C][C]1.3898[/C][/ROW]
[ROW][C]51[/C][C]0.3607[/C][C]-0.4618[/C][C]0.0385[/C][C]265.768[/C][C]22.1473[/C][C]4.7061[/C][/ROW]
[ROW][C]52[/C][C]0.894[/C][C]0.2637[/C][C]0.022[/C][C]14.1074[/C][C]1.1756[/C][C]1.0843[/C][/ROW]
[ROW][C]53[/C][C]0.3303[/C][C]-0.0144[/C][C]0.0012[/C][C]0.3102[/C][C]0.0258[/C][C]0.1608[/C][/ROW]
[ROW][C]54[/C][C]0.2786[/C][C]-0.0592[/C][C]0.0049[/C][C]7.3339[/C][C]0.6112[/C][C]0.7818[/C][/ROW]
[ROW][C]55[/C][C]0.2213[/C][C]-0.6003[/C][C]0.05[/C][C]1193.4545[/C][C]99.4545[/C][C]9.9727[/C][/ROW]
[ROW][C]56[/C][C]0.4809[/C][C]0.624[/C][C]0.052[/C][C]272.9923[/C][C]22.7494[/C][C]4.7696[/C][/ROW]
[ROW][C]57[/C][C]0.2874[/C][C]-0.5937[/C][C]0.0495[/C][C]691.8159[/C][C]57.6513[/C][C]7.5928[/C][/ROW]
[ROW][C]58[/C][C]0.2941[/C][C]-0.007[/C][C]6e-04[/C][C]0.0914[/C][C]0.0076[/C][C]0.0873[/C][/ROW]
[ROW][C]59[/C][C]2.1223[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]60[/C][C]0.2542[/C][C]-0.3811[/C][C]0.0318[/C][C]364.5358[/C][C]30.378[/C][C]5.5116[/C][/ROW]
[ROW][C]61[/C][C]0.241[/C][C]-0.0728[/C][C]0.0061[/C][C]14.8133[/C][C]1.2344[/C][C]1.1111[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34619&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34619&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
500.30190.11410.009523.1781.93151.3898
510.3607-0.46180.0385265.76822.14734.7061
520.8940.26370.02214.10741.17561.0843
530.3303-0.01440.00120.31020.02580.1608
540.2786-0.05920.00497.33390.61120.7818
550.2213-0.60030.051193.454599.45459.9727
560.48090.6240.052272.992322.74944.7696
570.2874-0.59370.0495691.815957.65137.5928
580.2941-0.0076e-040.09140.00760.0873
592.122300000
600.2542-0.38110.0318364.535830.3785.5116
610.241-0.07280.006114.81331.23441.1111



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