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 computationFri, 11 Dec 2009 05:59:37 -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/2009/Dec/11/t12605364252sduxh3z9avoy8i.htm/, Retrieved Mon, 29 Apr 2024 05:36:45 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=66156, Retrieved Mon, 29 Apr 2024 05:36:45 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact148
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Multiple Regression] [Q1 The Seatbeltlaw] [2007-11-14 19:27:43] [8cd6641b921d30ebe00b648d1481bba0]
- RMPD  [Multiple Regression] [Seatbelt] [2009-11-12 13:54:52] [b98453cac15ba1066b407e146608df68]
-   PD    [Multiple Regression] [W7] [2009-11-18 21:32:41] [315ba876df544ad397193b5931d5f354]
- RMPD      [(Partial) Autocorrelation Function] [] [2009-11-27 13:34:22] [5482608004c1d7bbf873930172393a2d]
- RMP           [ARIMA Forecasting] [ARIMA Forecast] [2009-12-11 12:59:37] [efdfe680cd785c4af09f858b30f777ec] [Current]
Feedback Forum

Post a new message
Dataseries X:
6539
6699
6962
6981
7024
6940
6774
6671
6965
6969
6822
6878
6691
6837
7018
7167
7076
7171
7093
6971
7142
7047
6999
6650
6475
6437
6639
6422
6272
6232
6003
5673
6050
5977
5796
5752
5609
5839
6069
6006
5809
5797
5502
5568
5864
5764
5615
5615
5681
5915
6334
6494
6620
6578
6495
6538
6737
6651
6530
6563




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66156&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[48])
365752-------
375609-------
385839-------
396069-------
406006-------
415809-------
425797-------
435502-------
445568-------
455864-------
465764-------
475615-------
485615-------
4956815439.00925205.14825672.87020.02130.07010.07710.0701
5059155590.71495271.3625910.06770.02330.28970.06380.4408
5163345805.835383.5186228.14210.00710.30620.1110.8121
5264945785.0815283.06546287.09660.00280.01610.19420.7467
5366205685.02565106.83836263.2138e-040.00310.33710.5938
5465785676.75625032.20196321.31050.00310.00210.35730.5745
5564955484.37734778.01366190.74090.00250.00120.48050.3585
5665385362.78234599.90896125.65580.00130.00180.2990.2585
5767375647.30714831.43826463.1760.00440.01620.30130.5309
5866515581.92644716.55636447.29650.00770.00440.340.4701
5965305451.25544538.97736363.53360.01020.0050.36250.3625
6065635368.90854412.74666325.07040.00720.00870.3070.307

\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[48]) \tabularnewline
36 & 5752 & - & - & - & - & - & - & - \tabularnewline
37 & 5609 & - & - & - & - & - & - & - \tabularnewline
38 & 5839 & - & - & - & - & - & - & - \tabularnewline
39 & 6069 & - & - & - & - & - & - & - \tabularnewline
40 & 6006 & - & - & - & - & - & - & - \tabularnewline
41 & 5809 & - & - & - & - & - & - & - \tabularnewline
42 & 5797 & - & - & - & - & - & - & - \tabularnewline
43 & 5502 & - & - & - & - & - & - & - \tabularnewline
44 & 5568 & - & - & - & - & - & - & - \tabularnewline
45 & 5864 & - & - & - & - & - & - & - \tabularnewline
46 & 5764 & - & - & - & - & - & - & - \tabularnewline
47 & 5615 & - & - & - & - & - & - & - \tabularnewline
48 & 5615 & - & - & - & - & - & - & - \tabularnewline
49 & 5681 & 5439.0092 & 5205.1482 & 5672.8702 & 0.0213 & 0.0701 & 0.0771 & 0.0701 \tabularnewline
50 & 5915 & 5590.7149 & 5271.362 & 5910.0677 & 0.0233 & 0.2897 & 0.0638 & 0.4408 \tabularnewline
51 & 6334 & 5805.83 & 5383.518 & 6228.1421 & 0.0071 & 0.3062 & 0.111 & 0.8121 \tabularnewline
52 & 6494 & 5785.081 & 5283.0654 & 6287.0966 & 0.0028 & 0.0161 & 0.1942 & 0.7467 \tabularnewline
53 & 6620 & 5685.0256 & 5106.8383 & 6263.213 & 8e-04 & 0.0031 & 0.3371 & 0.5938 \tabularnewline
54 & 6578 & 5676.7562 & 5032.2019 & 6321.3105 & 0.0031 & 0.0021 & 0.3573 & 0.5745 \tabularnewline
55 & 6495 & 5484.3773 & 4778.0136 & 6190.7409 & 0.0025 & 0.0012 & 0.4805 & 0.3585 \tabularnewline
56 & 6538 & 5362.7823 & 4599.9089 & 6125.6558 & 0.0013 & 0.0018 & 0.299 & 0.2585 \tabularnewline
57 & 6737 & 5647.3071 & 4831.4382 & 6463.176 & 0.0044 & 0.0162 & 0.3013 & 0.5309 \tabularnewline
58 & 6651 & 5581.9264 & 4716.5563 & 6447.2965 & 0.0077 & 0.0044 & 0.34 & 0.4701 \tabularnewline
59 & 6530 & 5451.2554 & 4538.9773 & 6363.5336 & 0.0102 & 0.005 & 0.3625 & 0.3625 \tabularnewline
60 & 6563 & 5368.9085 & 4412.7466 & 6325.0704 & 0.0072 & 0.0087 & 0.307 & 0.307 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=66156&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[48])[/C][/ROW]
[ROW][C]36[/C][C]5752[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]5609[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]5839[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]6069[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]6006[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]5809[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]5797[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]5502[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]5568[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]5864[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]5764[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]5615[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]5615[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]5681[/C][C]5439.0092[/C][C]5205.1482[/C][C]5672.8702[/C][C]0.0213[/C][C]0.0701[/C][C]0.0771[/C][C]0.0701[/C][/ROW]
[ROW][C]50[/C][C]5915[/C][C]5590.7149[/C][C]5271.362[/C][C]5910.0677[/C][C]0.0233[/C][C]0.2897[/C][C]0.0638[/C][C]0.4408[/C][/ROW]
[ROW][C]51[/C][C]6334[/C][C]5805.83[/C][C]5383.518[/C][C]6228.1421[/C][C]0.0071[/C][C]0.3062[/C][C]0.111[/C][C]0.8121[/C][/ROW]
[ROW][C]52[/C][C]6494[/C][C]5785.081[/C][C]5283.0654[/C][C]6287.0966[/C][C]0.0028[/C][C]0.0161[/C][C]0.1942[/C][C]0.7467[/C][/ROW]
[ROW][C]53[/C][C]6620[/C][C]5685.0256[/C][C]5106.8383[/C][C]6263.213[/C][C]8e-04[/C][C]0.0031[/C][C]0.3371[/C][C]0.5938[/C][/ROW]
[ROW][C]54[/C][C]6578[/C][C]5676.7562[/C][C]5032.2019[/C][C]6321.3105[/C][C]0.0031[/C][C]0.0021[/C][C]0.3573[/C][C]0.5745[/C][/ROW]
[ROW][C]55[/C][C]6495[/C][C]5484.3773[/C][C]4778.0136[/C][C]6190.7409[/C][C]0.0025[/C][C]0.0012[/C][C]0.4805[/C][C]0.3585[/C][/ROW]
[ROW][C]56[/C][C]6538[/C][C]5362.7823[/C][C]4599.9089[/C][C]6125.6558[/C][C]0.0013[/C][C]0.0018[/C][C]0.299[/C][C]0.2585[/C][/ROW]
[ROW][C]57[/C][C]6737[/C][C]5647.3071[/C][C]4831.4382[/C][C]6463.176[/C][C]0.0044[/C][C]0.0162[/C][C]0.3013[/C][C]0.5309[/C][/ROW]
[ROW][C]58[/C][C]6651[/C][C]5581.9264[/C][C]4716.5563[/C][C]6447.2965[/C][C]0.0077[/C][C]0.0044[/C][C]0.34[/C][C]0.4701[/C][/ROW]
[ROW][C]59[/C][C]6530[/C][C]5451.2554[/C][C]4538.9773[/C][C]6363.5336[/C][C]0.0102[/C][C]0.005[/C][C]0.3625[/C][C]0.3625[/C][/ROW]
[ROW][C]60[/C][C]6563[/C][C]5368.9085[/C][C]4412.7466[/C][C]6325.0704[/C][C]0.0072[/C][C]0.0087[/C][C]0.307[/C][C]0.307[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=66156&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66156&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[48])
365752-------
375609-------
385839-------
396069-------
406006-------
415809-------
425797-------
435502-------
445568-------
455864-------
465764-------
475615-------
485615-------
4956815439.00925205.14825672.87020.02130.07010.07710.0701
5059155590.71495271.3625910.06770.02330.28970.06380.4408
5163345805.835383.5186228.14210.00710.30620.1110.8121
5264945785.0815283.06546287.09660.00280.01610.19420.7467
5366205685.02565106.83836263.2138e-040.00310.33710.5938
5465785676.75625032.20196321.31050.00310.00210.35730.5745
5564955484.37734778.01366190.74090.00250.00120.48050.3585
5665385362.78234599.90896125.65580.00130.00180.2990.2585
5767375647.30714831.43826463.1760.00440.01620.30130.5309
5866515581.92644716.55636447.29650.00770.00440.340.4701
5965305451.25544538.97736363.53360.01020.0050.36250.3625
6065635368.90854412.74666325.07040.00720.00870.3070.307







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.02190.0445058559.548300
500.02910.0580.0512105160.838181860.1932286.1122
510.03710.0910.0645278963.4995147561.2953384.1371
520.04430.12250.079502566.1318236312.5044486.1198
530.05190.16450.0961874177.0358363885.4107603.2292
540.05790.15880.1065812240.35438611.2339662.2773
550.06570.18430.11761021358.3193521860.8175722.3993
560.07260.21910.13031381136.5439629270.2833793.2656
570.07370.1930.13731187430.5552691288.0913831.4374
580.07910.19150.14271142918.3477736451.117858.1673
590.08540.19790.14771163689.8402775291.0009880.5061
600.09090.22240.1541425854.5136829504.627910.7714

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0219 & 0.0445 & 0 & 58559.5483 & 0 & 0 \tabularnewline
50 & 0.0291 & 0.058 & 0.0512 & 105160.8381 & 81860.1932 & 286.1122 \tabularnewline
51 & 0.0371 & 0.091 & 0.0645 & 278963.4995 & 147561.2953 & 384.1371 \tabularnewline
52 & 0.0443 & 0.1225 & 0.079 & 502566.1318 & 236312.5044 & 486.1198 \tabularnewline
53 & 0.0519 & 0.1645 & 0.0961 & 874177.0358 & 363885.4107 & 603.2292 \tabularnewline
54 & 0.0579 & 0.1588 & 0.1065 & 812240.35 & 438611.2339 & 662.2773 \tabularnewline
55 & 0.0657 & 0.1843 & 0.1176 & 1021358.3193 & 521860.8175 & 722.3993 \tabularnewline
56 & 0.0726 & 0.2191 & 0.1303 & 1381136.5439 & 629270.2833 & 793.2656 \tabularnewline
57 & 0.0737 & 0.193 & 0.1373 & 1187430.5552 & 691288.0913 & 831.4374 \tabularnewline
58 & 0.0791 & 0.1915 & 0.1427 & 1142918.3477 & 736451.117 & 858.1673 \tabularnewline
59 & 0.0854 & 0.1979 & 0.1477 & 1163689.8402 & 775291.0009 & 880.5061 \tabularnewline
60 & 0.0909 & 0.2224 & 0.154 & 1425854.5136 & 829504.627 & 910.7714 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=66156&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]49[/C][C]0.0219[/C][C]0.0445[/C][C]0[/C][C]58559.5483[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.0291[/C][C]0.058[/C][C]0.0512[/C][C]105160.8381[/C][C]81860.1932[/C][C]286.1122[/C][/ROW]
[ROW][C]51[/C][C]0.0371[/C][C]0.091[/C][C]0.0645[/C][C]278963.4995[/C][C]147561.2953[/C][C]384.1371[/C][/ROW]
[ROW][C]52[/C][C]0.0443[/C][C]0.1225[/C][C]0.079[/C][C]502566.1318[/C][C]236312.5044[/C][C]486.1198[/C][/ROW]
[ROW][C]53[/C][C]0.0519[/C][C]0.1645[/C][C]0.0961[/C][C]874177.0358[/C][C]363885.4107[/C][C]603.2292[/C][/ROW]
[ROW][C]54[/C][C]0.0579[/C][C]0.1588[/C][C]0.1065[/C][C]812240.35[/C][C]438611.2339[/C][C]662.2773[/C][/ROW]
[ROW][C]55[/C][C]0.0657[/C][C]0.1843[/C][C]0.1176[/C][C]1021358.3193[/C][C]521860.8175[/C][C]722.3993[/C][/ROW]
[ROW][C]56[/C][C]0.0726[/C][C]0.2191[/C][C]0.1303[/C][C]1381136.5439[/C][C]629270.2833[/C][C]793.2656[/C][/ROW]
[ROW][C]57[/C][C]0.0737[/C][C]0.193[/C][C]0.1373[/C][C]1187430.5552[/C][C]691288.0913[/C][C]831.4374[/C][/ROW]
[ROW][C]58[/C][C]0.0791[/C][C]0.1915[/C][C]0.1427[/C][C]1142918.3477[/C][C]736451.117[/C][C]858.1673[/C][/ROW]
[ROW][C]59[/C][C]0.0854[/C][C]0.1979[/C][C]0.1477[/C][C]1163689.8402[/C][C]775291.0009[/C][C]880.5061[/C][/ROW]
[ROW][C]60[/C][C]0.0909[/C][C]0.2224[/C][C]0.154[/C][C]1425854.5136[/C][C]829504.627[/C][C]910.7714[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=66156&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=66156&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
490.02190.0445058559.548300
500.02910.0580.0512105160.838181860.1932286.1122
510.03710.0910.0645278963.4995147561.2953384.1371
520.04430.12250.079502566.1318236312.5044486.1198
530.05190.16450.0961874177.0358363885.4107603.2292
540.05790.15880.1065812240.35438611.2339662.2773
550.06570.18430.11761021358.3193521860.8175722.3993
560.07260.21910.13031381136.5439629270.2833793.2656
570.07370.1930.13731187430.5552691288.0913831.4374
580.07910.19150.14271142918.3477736451.117858.1673
590.08540.19790.14771163689.8402775291.0009880.5061
600.09090.22240.1541425854.5136829504.627910.7714



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 2 ; par7 = 0 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 2 ; par7 = 0 ; par8 = 0 ; par9 = 1 ; 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,par1))
(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.mape1 <- array(0, dim=fx)
perf.se <- array(0, dim=fx)
perf.mse <- array(0, dim=fx)
perf.mse1 <- 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.se[i] = (x[nx+i] - forecast$pred[i])^2
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[1] = abs(perf.pe[1])
perf.mse[1] = abs(perf.se[1])
for (i in 2:fx) {
perf.mape[i] = perf.mape[i-1] + abs(perf.pe[i])
perf.mape1[i] = perf.mape[i] / i
perf.mse[i] = perf.mse[i-1] + perf.se[i]
perf.mse1[i] = perf.mse[i] / i
}
perf.rmse = sqrt(perf.mse1)
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:par1] <- 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.mape1[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse1[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')