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 computationMon, 15 Dec 2008 02:22:59 -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/15/t1229333115pdv2rgdvad494bd.htm/, Retrieved Wed, 15 May 2024 00:15:05 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33623, Retrieved Wed, 15 May 2024 00:15:05 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact213
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
F     [Standard Deviation-Mean Plot] [] [2008-12-07 12:44:29] [a4ee3bef49b119f4bd2e925060c84f5e]
- RMP     [ARIMA Forecasting] [] [2008-12-15 09:22:59] [3762bf489501725951ad2579179cae2a] [Current]
Feedback Forum

Post a new message
Dataseries X:
31514
27071
29462
26105
22397
23843
21705
18089
20764
25316
17704
15548
28029
29383
36438
32034
22679
24319
18004
17537
20366
22782
19169
13807
29743
25591
29096
26482
22405
27044
17970
18730
19684
19785
18479
10698
31956
29506
34506
27165
26736
23691
18157
17328
18205
20995
17382
9367
31124
26551
30651
25859
25100
25778
20418
18688
20424
24776
19814
12738
31566
30111
30019
31934
25826
26835




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33623&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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33623&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33623&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'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[54])
4223691-------
4318157-------
4417328-------
4518205-------
4620995-------
4717382-------
489367-------
4931124-------
5026551-------
5130651-------
5225859-------
5325100-------
5425778-------
55204181815712265.006324048.99370.2260.00560.50.0056
56186881732811436.006323219.99370.32550.1520.50.0025
57204241820512313.006324096.99370.23020.43620.50.0059
58247762099515103.006326886.99370.10420.57530.50.0558
59198141738211490.006323273.99370.20930.0070.50.0026
601273893673475.006315258.99370.13113e-040.50
61315663112425232.006337015.99370.441610.50.9623
62301112655120659.006332442.99370.11820.04760.50.6015
63300193065124759.006336542.99370.41670.57130.50.9475
64319342585919967.006331750.99370.02160.08320.50.5107
65258262510019208.006330991.99370.40460.01150.50.4108
66268352577819886.006331669.99370.36260.49360.50.5

\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[54]) \tabularnewline
42 & 23691 & - & - & - & - & - & - & - \tabularnewline
43 & 18157 & - & - & - & - & - & - & - \tabularnewline
44 & 17328 & - & - & - & - & - & - & - \tabularnewline
45 & 18205 & - & - & - & - & - & - & - \tabularnewline
46 & 20995 & - & - & - & - & - & - & - \tabularnewline
47 & 17382 & - & - & - & - & - & - & - \tabularnewline
48 & 9367 & - & - & - & - & - & - & - \tabularnewline
49 & 31124 & - & - & - & - & - & - & - \tabularnewline
50 & 26551 & - & - & - & - & - & - & - \tabularnewline
51 & 30651 & - & - & - & - & - & - & - \tabularnewline
52 & 25859 & - & - & - & - & - & - & - \tabularnewline
53 & 25100 & - & - & - & - & - & - & - \tabularnewline
54 & 25778 & - & - & - & - & - & - & - \tabularnewline
55 & 20418 & 18157 & 12265.0063 & 24048.9937 & 0.226 & 0.0056 & 0.5 & 0.0056 \tabularnewline
56 & 18688 & 17328 & 11436.0063 & 23219.9937 & 0.3255 & 0.152 & 0.5 & 0.0025 \tabularnewline
57 & 20424 & 18205 & 12313.0063 & 24096.9937 & 0.2302 & 0.4362 & 0.5 & 0.0059 \tabularnewline
58 & 24776 & 20995 & 15103.0063 & 26886.9937 & 0.1042 & 0.5753 & 0.5 & 0.0558 \tabularnewline
59 & 19814 & 17382 & 11490.0063 & 23273.9937 & 0.2093 & 0.007 & 0.5 & 0.0026 \tabularnewline
60 & 12738 & 9367 & 3475.0063 & 15258.9937 & 0.1311 & 3e-04 & 0.5 & 0 \tabularnewline
61 & 31566 & 31124 & 25232.0063 & 37015.9937 & 0.4416 & 1 & 0.5 & 0.9623 \tabularnewline
62 & 30111 & 26551 & 20659.0063 & 32442.9937 & 0.1182 & 0.0476 & 0.5 & 0.6015 \tabularnewline
63 & 30019 & 30651 & 24759.0063 & 36542.9937 & 0.4167 & 0.5713 & 0.5 & 0.9475 \tabularnewline
64 & 31934 & 25859 & 19967.0063 & 31750.9937 & 0.0216 & 0.0832 & 0.5 & 0.5107 \tabularnewline
65 & 25826 & 25100 & 19208.0063 & 30991.9937 & 0.4046 & 0.0115 & 0.5 & 0.4108 \tabularnewline
66 & 26835 & 25778 & 19886.0063 & 31669.9937 & 0.3626 & 0.4936 & 0.5 & 0.5 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33623&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[54])[/C][/ROW]
[ROW][C]42[/C][C]23691[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]18157[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]17328[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]18205[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]20995[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]17382[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]9367[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]31124[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]26551[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]30651[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]25859[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]25100[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]25778[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]20418[/C][C]18157[/C][C]12265.0063[/C][C]24048.9937[/C][C]0.226[/C][C]0.0056[/C][C]0.5[/C][C]0.0056[/C][/ROW]
[ROW][C]56[/C][C]18688[/C][C]17328[/C][C]11436.0063[/C][C]23219.9937[/C][C]0.3255[/C][C]0.152[/C][C]0.5[/C][C]0.0025[/C][/ROW]
[ROW][C]57[/C][C]20424[/C][C]18205[/C][C]12313.0063[/C][C]24096.9937[/C][C]0.2302[/C][C]0.4362[/C][C]0.5[/C][C]0.0059[/C][/ROW]
[ROW][C]58[/C][C]24776[/C][C]20995[/C][C]15103.0063[/C][C]26886.9937[/C][C]0.1042[/C][C]0.5753[/C][C]0.5[/C][C]0.0558[/C][/ROW]
[ROW][C]59[/C][C]19814[/C][C]17382[/C][C]11490.0063[/C][C]23273.9937[/C][C]0.2093[/C][C]0.007[/C][C]0.5[/C][C]0.0026[/C][/ROW]
[ROW][C]60[/C][C]12738[/C][C]9367[/C][C]3475.0063[/C][C]15258.9937[/C][C]0.1311[/C][C]3e-04[/C][C]0.5[/C][C]0[/C][/ROW]
[ROW][C]61[/C][C]31566[/C][C]31124[/C][C]25232.0063[/C][C]37015.9937[/C][C]0.4416[/C][C]1[/C][C]0.5[/C][C]0.9623[/C][/ROW]
[ROW][C]62[/C][C]30111[/C][C]26551[/C][C]20659.0063[/C][C]32442.9937[/C][C]0.1182[/C][C]0.0476[/C][C]0.5[/C][C]0.6015[/C][/ROW]
[ROW][C]63[/C][C]30019[/C][C]30651[/C][C]24759.0063[/C][C]36542.9937[/C][C]0.4167[/C][C]0.5713[/C][C]0.5[/C][C]0.9475[/C][/ROW]
[ROW][C]64[/C][C]31934[/C][C]25859[/C][C]19967.0063[/C][C]31750.9937[/C][C]0.0216[/C][C]0.0832[/C][C]0.5[/C][C]0.5107[/C][/ROW]
[ROW][C]65[/C][C]25826[/C][C]25100[/C][C]19208.0063[/C][C]30991.9937[/C][C]0.4046[/C][C]0.0115[/C][C]0.5[/C][C]0.4108[/C][/ROW]
[ROW][C]66[/C][C]26835[/C][C]25778[/C][C]19886.0063[/C][C]31669.9937[/C][C]0.3626[/C][C]0.4936[/C][C]0.5[/C][C]0.5[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33623&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33623&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[54])
4223691-------
4318157-------
4417328-------
4518205-------
4620995-------
4717382-------
489367-------
4931124-------
5026551-------
5130651-------
5225859-------
5325100-------
5425778-------
55204181815712265.006324048.99370.2260.00560.50.0056
56186881732811436.006323219.99370.32550.1520.50.0025
57204241820512313.006324096.99370.23020.43620.50.0059
58247762099515103.006326886.99370.10420.57530.50.0558
59198141738211490.006323273.99370.20930.0070.50.0026
601273893673475.006315258.99370.13113e-040.50
61315663112425232.006337015.99370.441610.50.9623
62301112655120659.006332442.99370.11820.04760.50.6015
63300193065124759.006336542.99370.41670.57130.50.9475
64319342585919967.006331750.99370.02160.08320.50.5107
65258262510019208.006330991.99370.40460.01150.50.4108
66268352577819886.006331669.99370.36260.49360.50.5







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
550.16560.12450.01045112121426010.0833652.6945
560.17350.07850.00651849600154133.3333392.5982
570.16510.12190.01024923961410330.0833640.5701
580.14320.18010.015142959611191330.08331091.4807
590.17290.13990.01175914624492885.3333702.0579
600.32090.35990.0311363641946970.0833973.1239
610.09660.01420.001219536416280.3333127.5944
620.11320.13410.0112126736001056133.33331027.6835
630.0981-0.02060.001739942433285.3333182.4427
640.11630.23490.0196369056253075468.751753.7014
650.11980.02890.002452707643923209.5781
660.11660.0410.0034111724993104.0833305.1296

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
55 & 0.1656 & 0.1245 & 0.0104 & 5112121 & 426010.0833 & 652.6945 \tabularnewline
56 & 0.1735 & 0.0785 & 0.0065 & 1849600 & 154133.3333 & 392.5982 \tabularnewline
57 & 0.1651 & 0.1219 & 0.0102 & 4923961 & 410330.0833 & 640.5701 \tabularnewline
58 & 0.1432 & 0.1801 & 0.015 & 14295961 & 1191330.0833 & 1091.4807 \tabularnewline
59 & 0.1729 & 0.1399 & 0.0117 & 5914624 & 492885.3333 & 702.0579 \tabularnewline
60 & 0.3209 & 0.3599 & 0.03 & 11363641 & 946970.0833 & 973.1239 \tabularnewline
61 & 0.0966 & 0.0142 & 0.0012 & 195364 & 16280.3333 & 127.5944 \tabularnewline
62 & 0.1132 & 0.1341 & 0.0112 & 12673600 & 1056133.3333 & 1027.6835 \tabularnewline
63 & 0.0981 & -0.0206 & 0.0017 & 399424 & 33285.3333 & 182.4427 \tabularnewline
64 & 0.1163 & 0.2349 & 0.0196 & 36905625 & 3075468.75 & 1753.7014 \tabularnewline
65 & 0.1198 & 0.0289 & 0.0024 & 527076 & 43923 & 209.5781 \tabularnewline
66 & 0.1166 & 0.041 & 0.0034 & 1117249 & 93104.0833 & 305.1296 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33623&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]55[/C][C]0.1656[/C][C]0.1245[/C][C]0.0104[/C][C]5112121[/C][C]426010.0833[/C][C]652.6945[/C][/ROW]
[ROW][C]56[/C][C]0.1735[/C][C]0.0785[/C][C]0.0065[/C][C]1849600[/C][C]154133.3333[/C][C]392.5982[/C][/ROW]
[ROW][C]57[/C][C]0.1651[/C][C]0.1219[/C][C]0.0102[/C][C]4923961[/C][C]410330.0833[/C][C]640.5701[/C][/ROW]
[ROW][C]58[/C][C]0.1432[/C][C]0.1801[/C][C]0.015[/C][C]14295961[/C][C]1191330.0833[/C][C]1091.4807[/C][/ROW]
[ROW][C]59[/C][C]0.1729[/C][C]0.1399[/C][C]0.0117[/C][C]5914624[/C][C]492885.3333[/C][C]702.0579[/C][/ROW]
[ROW][C]60[/C][C]0.3209[/C][C]0.3599[/C][C]0.03[/C][C]11363641[/C][C]946970.0833[/C][C]973.1239[/C][/ROW]
[ROW][C]61[/C][C]0.0966[/C][C]0.0142[/C][C]0.0012[/C][C]195364[/C][C]16280.3333[/C][C]127.5944[/C][/ROW]
[ROW][C]62[/C][C]0.1132[/C][C]0.1341[/C][C]0.0112[/C][C]12673600[/C][C]1056133.3333[/C][C]1027.6835[/C][/ROW]
[ROW][C]63[/C][C]0.0981[/C][C]-0.0206[/C][C]0.0017[/C][C]399424[/C][C]33285.3333[/C][C]182.4427[/C][/ROW]
[ROW][C]64[/C][C]0.1163[/C][C]0.2349[/C][C]0.0196[/C][C]36905625[/C][C]3075468.75[/C][C]1753.7014[/C][/ROW]
[ROW][C]65[/C][C]0.1198[/C][C]0.0289[/C][C]0.0024[/C][C]527076[/C][C]43923[/C][C]209.5781[/C][/ROW]
[ROW][C]66[/C][C]0.1166[/C][C]0.041[/C][C]0.0034[/C][C]1117249[/C][C]93104.0833[/C][C]305.1296[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33623&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33623&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
550.16560.12450.01045112121426010.0833652.6945
560.17350.07850.00651849600154133.3333392.5982
570.16510.12190.01024923961410330.0833640.5701
580.14320.18010.015142959611191330.08331091.4807
590.17290.13990.01175914624492885.3333702.0579
600.32090.35990.0311363641946970.0833973.1239
610.09660.01420.001219536416280.3333127.5944
620.11320.13410.0112126736001056133.33331027.6835
630.0981-0.02060.001739942433285.3333182.4427
640.11630.23490.0196369056253075468.751753.7014
650.11980.02890.002452707643923209.5781
660.11660.0410.0034111724993104.0833305.1296



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