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 computationSat, 20 Dec 2008 14:53:44 -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/20/t1229810051hzzn74c423e061h.htm/, Retrieved Sun, 19 May 2024 10:49:03 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=35454, Retrieved Sun, 19 May 2024 10:49:03 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact175
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [voorspelling] [2008-12-20 21:53:44] [d76b387543b13b5e3afd8ff9e5fdc89f] [Current]
Feedback Forum

Post a new message
Dataseries X:
60804
57907
54355
52536
49081
48877
64599
75314
71209
65210
59829
57656
57428
55315
52790
51050
48519
48354
65333
73990
72755
67424
59214
57427
56681
55437
53600
51641
49478
50124
71313
76208
74387
69520
64735
63413
62553
60109
57764
55667
53103
55301
76795
80928
79213
72759
67802
66940
66396
64846
61343
58537
55785
57905
77981
82155
80710
73839
68212
65444
63181
61198
59010
56388
53723
55340
75352
79817
78289
71892
66448
64167
61250
59580
56417
54662
53349
55385
73546




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35454&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35454&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35454&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'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[67])
5577981-------
5682155-------
5780710-------
5873839-------
5968212-------
6065444-------
6163181-------
6261198-------
6359010-------
6456388-------
6553723-------
6655340-------
6775352-------
68798177952676940.837282111.16280.41270.99920.02310.9992
69782897808174425.027781736.97230.45560.1760.07940.9283
70718927121066732.366675687.63340.38260.0010.12490.0349
71664486558360412.674470753.32560.37150.00840.15951e-04
72641676281557034.400268595.59980.32330.1090.18640
73612506055254219.670266884.32980.41450.13160.20790
74595805856951729.302165408.69790.3860.22120.22560
75564175638149069.055363692.94470.49620.19560.24050
76546625375946003.511561514.48850.40970.25090.25320
77533495109442918.997459269.00260.29440.19620.26420
78553855271144136.984961285.01510.27050.4420.27390
79735467272363767.733381678.26670.42850.99990.28250.2825

\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[67]) \tabularnewline
55 & 77981 & - & - & - & - & - & - & - \tabularnewline
56 & 82155 & - & - & - & - & - & - & - \tabularnewline
57 & 80710 & - & - & - & - & - & - & - \tabularnewline
58 & 73839 & - & - & - & - & - & - & - \tabularnewline
59 & 68212 & - & - & - & - & - & - & - \tabularnewline
60 & 65444 & - & - & - & - & - & - & - \tabularnewline
61 & 63181 & - & - & - & - & - & - & - \tabularnewline
62 & 61198 & - & - & - & - & - & - & - \tabularnewline
63 & 59010 & - & - & - & - & - & - & - \tabularnewline
64 & 56388 & - & - & - & - & - & - & - \tabularnewline
65 & 53723 & - & - & - & - & - & - & - \tabularnewline
66 & 55340 & - & - & - & - & - & - & - \tabularnewline
67 & 75352 & - & - & - & - & - & - & - \tabularnewline
68 & 79817 & 79526 & 76940.8372 & 82111.1628 & 0.4127 & 0.9992 & 0.0231 & 0.9992 \tabularnewline
69 & 78289 & 78081 & 74425.0277 & 81736.9723 & 0.4556 & 0.176 & 0.0794 & 0.9283 \tabularnewline
70 & 71892 & 71210 & 66732.3666 & 75687.6334 & 0.3826 & 0.001 & 0.1249 & 0.0349 \tabularnewline
71 & 66448 & 65583 & 60412.6744 & 70753.3256 & 0.3715 & 0.0084 & 0.1595 & 1e-04 \tabularnewline
72 & 64167 & 62815 & 57034.4002 & 68595.5998 & 0.3233 & 0.109 & 0.1864 & 0 \tabularnewline
73 & 61250 & 60552 & 54219.6702 & 66884.3298 & 0.4145 & 0.1316 & 0.2079 & 0 \tabularnewline
74 & 59580 & 58569 & 51729.3021 & 65408.6979 & 0.386 & 0.2212 & 0.2256 & 0 \tabularnewline
75 & 56417 & 56381 & 49069.0553 & 63692.9447 & 0.4962 & 0.1956 & 0.2405 & 0 \tabularnewline
76 & 54662 & 53759 & 46003.5115 & 61514.4885 & 0.4097 & 0.2509 & 0.2532 & 0 \tabularnewline
77 & 53349 & 51094 & 42918.9974 & 59269.0026 & 0.2944 & 0.1962 & 0.2642 & 0 \tabularnewline
78 & 55385 & 52711 & 44136.9849 & 61285.0151 & 0.2705 & 0.442 & 0.2739 & 0 \tabularnewline
79 & 73546 & 72723 & 63767.7333 & 81678.2667 & 0.4285 & 0.9999 & 0.2825 & 0.2825 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35454&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[67])[/C][/ROW]
[ROW][C]55[/C][C]77981[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]82155[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]80710[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]73839[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]68212[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]65444[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]63181[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]61198[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]59010[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]56388[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]53723[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]55340[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]75352[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]79817[/C][C]79526[/C][C]76940.8372[/C][C]82111.1628[/C][C]0.4127[/C][C]0.9992[/C][C]0.0231[/C][C]0.9992[/C][/ROW]
[ROW][C]69[/C][C]78289[/C][C]78081[/C][C]74425.0277[/C][C]81736.9723[/C][C]0.4556[/C][C]0.176[/C][C]0.0794[/C][C]0.9283[/C][/ROW]
[ROW][C]70[/C][C]71892[/C][C]71210[/C][C]66732.3666[/C][C]75687.6334[/C][C]0.3826[/C][C]0.001[/C][C]0.1249[/C][C]0.0349[/C][/ROW]
[ROW][C]71[/C][C]66448[/C][C]65583[/C][C]60412.6744[/C][C]70753.3256[/C][C]0.3715[/C][C]0.0084[/C][C]0.1595[/C][C]1e-04[/C][/ROW]
[ROW][C]72[/C][C]64167[/C][C]62815[/C][C]57034.4002[/C][C]68595.5998[/C][C]0.3233[/C][C]0.109[/C][C]0.1864[/C][C]0[/C][/ROW]
[ROW][C]73[/C][C]61250[/C][C]60552[/C][C]54219.6702[/C][C]66884.3298[/C][C]0.4145[/C][C]0.1316[/C][C]0.2079[/C][C]0[/C][/ROW]
[ROW][C]74[/C][C]59580[/C][C]58569[/C][C]51729.3021[/C][C]65408.6979[/C][C]0.386[/C][C]0.2212[/C][C]0.2256[/C][C]0[/C][/ROW]
[ROW][C]75[/C][C]56417[/C][C]56381[/C][C]49069.0553[/C][C]63692.9447[/C][C]0.4962[/C][C]0.1956[/C][C]0.2405[/C][C]0[/C][/ROW]
[ROW][C]76[/C][C]54662[/C][C]53759[/C][C]46003.5115[/C][C]61514.4885[/C][C]0.4097[/C][C]0.2509[/C][C]0.2532[/C][C]0[/C][/ROW]
[ROW][C]77[/C][C]53349[/C][C]51094[/C][C]42918.9974[/C][C]59269.0026[/C][C]0.2944[/C][C]0.1962[/C][C]0.2642[/C][C]0[/C][/ROW]
[ROW][C]78[/C][C]55385[/C][C]52711[/C][C]44136.9849[/C][C]61285.0151[/C][C]0.2705[/C][C]0.442[/C][C]0.2739[/C][C]0[/C][/ROW]
[ROW][C]79[/C][C]73546[/C][C]72723[/C][C]63767.7333[/C][C]81678.2667[/C][C]0.4285[/C][C]0.9999[/C][C]0.2825[/C][C]0.2825[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35454&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35454&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[67])
5577981-------
5682155-------
5780710-------
5873839-------
5968212-------
6065444-------
6163181-------
6261198-------
6359010-------
6456388-------
6553723-------
6655340-------
6775352-------
68798177952676940.837282111.16280.41270.99920.02310.9992
69782897808174425.027781736.97230.45560.1760.07940.9283
70718927121066732.366675687.63340.38260.0010.12490.0349
71664486558360412.674470753.32560.37150.00840.15951e-04
72641676281557034.400268595.59980.32330.1090.18640
73612506055254219.670266884.32980.41450.13160.20790
74595805856951729.302165408.69790.3860.22120.22560
75564175638149069.055363692.94470.49620.19560.24050
76546625375946003.511561514.48850.40970.25090.25320
77533495109442918.997459269.00260.29440.19620.26420
78553855271144136.984961285.01510.27050.4420.27390
79735467272363767.733381678.26670.42850.99990.28250.2825







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
680.01660.00373e-04846817056.7584.0045
690.02390.00272e-04432643605.333360.0444
700.03210.00968e-0446512438760.3333196.8764
710.04020.01320.001174822562352.0833249.704
720.0470.02150.00181827904152325.3333390.2888
730.05340.01150.00148720440600.3333201.4952
740.05960.01730.0014102212185176.75291.8506
750.06626e-041e-04129610810.3923
760.07360.01680.001481540967950.75260.6736
770.08160.04410.00375085025423752.0833650.9624
780.0830.05070.00427150276595856.3333771.9173
790.06280.01139e-0467732956444.0833237.5796

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
68 & 0.0166 & 0.0037 & 3e-04 & 84681 & 7056.75 & 84.0045 \tabularnewline
69 & 0.0239 & 0.0027 & 2e-04 & 43264 & 3605.3333 & 60.0444 \tabularnewline
70 & 0.0321 & 0.0096 & 8e-04 & 465124 & 38760.3333 & 196.8764 \tabularnewline
71 & 0.0402 & 0.0132 & 0.0011 & 748225 & 62352.0833 & 249.704 \tabularnewline
72 & 0.047 & 0.0215 & 0.0018 & 1827904 & 152325.3333 & 390.2888 \tabularnewline
73 & 0.0534 & 0.0115 & 0.001 & 487204 & 40600.3333 & 201.4952 \tabularnewline
74 & 0.0596 & 0.0173 & 0.0014 & 1022121 & 85176.75 & 291.8506 \tabularnewline
75 & 0.0662 & 6e-04 & 1e-04 & 1296 & 108 & 10.3923 \tabularnewline
76 & 0.0736 & 0.0168 & 0.0014 & 815409 & 67950.75 & 260.6736 \tabularnewline
77 & 0.0816 & 0.0441 & 0.0037 & 5085025 & 423752.0833 & 650.9624 \tabularnewline
78 & 0.083 & 0.0507 & 0.0042 & 7150276 & 595856.3333 & 771.9173 \tabularnewline
79 & 0.0628 & 0.0113 & 9e-04 & 677329 & 56444.0833 & 237.5796 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=35454&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]68[/C][C]0.0166[/C][C]0.0037[/C][C]3e-04[/C][C]84681[/C][C]7056.75[/C][C]84.0045[/C][/ROW]
[ROW][C]69[/C][C]0.0239[/C][C]0.0027[/C][C]2e-04[/C][C]43264[/C][C]3605.3333[/C][C]60.0444[/C][/ROW]
[ROW][C]70[/C][C]0.0321[/C][C]0.0096[/C][C]8e-04[/C][C]465124[/C][C]38760.3333[/C][C]196.8764[/C][/ROW]
[ROW][C]71[/C][C]0.0402[/C][C]0.0132[/C][C]0.0011[/C][C]748225[/C][C]62352.0833[/C][C]249.704[/C][/ROW]
[ROW][C]72[/C][C]0.047[/C][C]0.0215[/C][C]0.0018[/C][C]1827904[/C][C]152325.3333[/C][C]390.2888[/C][/ROW]
[ROW][C]73[/C][C]0.0534[/C][C]0.0115[/C][C]0.001[/C][C]487204[/C][C]40600.3333[/C][C]201.4952[/C][/ROW]
[ROW][C]74[/C][C]0.0596[/C][C]0.0173[/C][C]0.0014[/C][C]1022121[/C][C]85176.75[/C][C]291.8506[/C][/ROW]
[ROW][C]75[/C][C]0.0662[/C][C]6e-04[/C][C]1e-04[/C][C]1296[/C][C]108[/C][C]10.3923[/C][/ROW]
[ROW][C]76[/C][C]0.0736[/C][C]0.0168[/C][C]0.0014[/C][C]815409[/C][C]67950.75[/C][C]260.6736[/C][/ROW]
[ROW][C]77[/C][C]0.0816[/C][C]0.0441[/C][C]0.0037[/C][C]5085025[/C][C]423752.0833[/C][C]650.9624[/C][/ROW]
[ROW][C]78[/C][C]0.083[/C][C]0.0507[/C][C]0.0042[/C][C]7150276[/C][C]595856.3333[/C][C]771.9173[/C][/ROW]
[ROW][C]79[/C][C]0.0628[/C][C]0.0113[/C][C]9e-04[/C][C]677329[/C][C]56444.0833[/C][C]237.5796[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=35454&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=35454&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
680.01660.00373e-04846817056.7584.0045
690.02390.00272e-04432643605.333360.0444
700.03210.00968e-0446512438760.3333196.8764
710.04020.01320.001174822562352.0833249.704
720.0470.02150.00181827904152325.3333390.2888
730.05340.01150.00148720440600.3333201.4952
740.05960.01730.0014102212185176.75291.8506
750.06626e-041e-04129610810.3923
760.07360.01680.001481540967950.75260.6736
770.08160.04410.00375085025423752.0833650.9624
780.0830.05070.00427150276595856.3333771.9173
790.06280.01139e-0467732956444.0833237.5796



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