Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationWed, 19 Dec 2007 09:57:06 -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/2007/Dec/19/t1198082372n2lhbx7zaqyx6au.htm/, Retrieved Mon, 06 May 2024 13:48:19 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4687, Retrieved Mon, 06 May 2024 13:48:19 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact186
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [] [2007-12-19 16:57:06] [e2f7a6e26aa7cf06a3d27eb5298a4843] [Current]
Feedback Forum

Post a new message
Dataseries X:
25.62
27.5
24.5
25.66
28.31
27.85
24.61
25.68
25.62
20.54
18.8
18.71
19.46
20.12
23.54
25.6
25.39
24.09
25.69
26.56
28.33
27.5
24.23
28.23
31.29
32.72
30.46
24.89
25.68
27.52
28.4
29.71
26.85
29.62
28.69
29.76
31.3
30.86
33.46
33.15
37.99
35.24
38.24
43.16
43.33
49.67
43.17
39.56
44.36
45.22
53.1
52.1
48.52
54.84
57.57
64.14
62.85
58.75
55.33
57.03
63.18
60.19
62.12
70.12
69.75
68.56
73.77
73.23
61.96
57.81
58.76
62.47
53.68
57.56
62.05
67.49
67.21
71.05
76.93
70.76




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\begin{tabular}{lllllllll}
\hline
Summary of compuational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 3 seconds \tabularnewline
R Server & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4687&T=0

[TABLE]
[ROW][C]Summary of compuational 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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4687&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4687&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 compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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[68])
5664.14-------
5762.85-------
5858.75-------
5955.33-------
6057.03-------
6163.18-------
6260.19-------
6362.12-------
6470.12-------
6569.75-------
6668.56-------
6773.77-------
6873.23-------
6961.9672.224163.585781.53090.01530.41610.97580.4161
7057.8171.627559.76984.79590.01990.92490.97240.4057
7158.7671.433557.924986.67480.05160.96010.98080.4086
7262.4771.771856.8888.78680.1420.9330.95530.4333
7353.6872.493956.209391.32330.02510.85160.83390.4695
7457.5672.061354.629792.46360.08180.96130.8730.4553
7562.0572.185153.630594.13780.18280.90420.81560.4628
7667.4973.250353.494196.83950.31610.8240.60260.5007
7767.2173.284952.560798.26720.31680.67530.60920.5017
7871.0573.006451.428599.26390.44190.66740.630.4933
7976.9373.61951.065101.28630.40730.57220.49570.511
8070.7673.453650.1167102.3270.42750.40670.50610.5061

\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[68]) \tabularnewline
56 & 64.14 & - & - & - & - & - & - & - \tabularnewline
57 & 62.85 & - & - & - & - & - & - & - \tabularnewline
58 & 58.75 & - & - & - & - & - & - & - \tabularnewline
59 & 55.33 & - & - & - & - & - & - & - \tabularnewline
60 & 57.03 & - & - & - & - & - & - & - \tabularnewline
61 & 63.18 & - & - & - & - & - & - & - \tabularnewline
62 & 60.19 & - & - & - & - & - & - & - \tabularnewline
63 & 62.12 & - & - & - & - & - & - & - \tabularnewline
64 & 70.12 & - & - & - & - & - & - & - \tabularnewline
65 & 69.75 & - & - & - & - & - & - & - \tabularnewline
66 & 68.56 & - & - & - & - & - & - & - \tabularnewline
67 & 73.77 & - & - & - & - & - & - & - \tabularnewline
68 & 73.23 & - & - & - & - & - & - & - \tabularnewline
69 & 61.96 & 72.2241 & 63.5857 & 81.5309 & 0.0153 & 0.4161 & 0.9758 & 0.4161 \tabularnewline
70 & 57.81 & 71.6275 & 59.769 & 84.7959 & 0.0199 & 0.9249 & 0.9724 & 0.4057 \tabularnewline
71 & 58.76 & 71.4335 & 57.9249 & 86.6748 & 0.0516 & 0.9601 & 0.9808 & 0.4086 \tabularnewline
72 & 62.47 & 71.7718 & 56.88 & 88.7868 & 0.142 & 0.933 & 0.9553 & 0.4333 \tabularnewline
73 & 53.68 & 72.4939 & 56.2093 & 91.3233 & 0.0251 & 0.8516 & 0.8339 & 0.4695 \tabularnewline
74 & 57.56 & 72.0613 & 54.6297 & 92.4636 & 0.0818 & 0.9613 & 0.873 & 0.4553 \tabularnewline
75 & 62.05 & 72.1851 & 53.6305 & 94.1378 & 0.1828 & 0.9042 & 0.8156 & 0.4628 \tabularnewline
76 & 67.49 & 73.2503 & 53.4941 & 96.8395 & 0.3161 & 0.824 & 0.6026 & 0.5007 \tabularnewline
77 & 67.21 & 73.2849 & 52.5607 & 98.2672 & 0.3168 & 0.6753 & 0.6092 & 0.5017 \tabularnewline
78 & 71.05 & 73.0064 & 51.4285 & 99.2639 & 0.4419 & 0.6674 & 0.63 & 0.4933 \tabularnewline
79 & 76.93 & 73.619 & 51.065 & 101.2863 & 0.4073 & 0.5722 & 0.4957 & 0.511 \tabularnewline
80 & 70.76 & 73.4536 & 50.1167 & 102.327 & 0.4275 & 0.4067 & 0.5061 & 0.5061 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4687&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[68])[/C][/ROW]
[ROW][C]56[/C][C]64.14[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]62.85[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]58.75[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]55.33[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]57.03[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]63.18[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]60.19[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]62.12[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]70.12[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]69.75[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]68.56[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]73.77[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]73.23[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]61.96[/C][C]72.2241[/C][C]63.5857[/C][C]81.5309[/C][C]0.0153[/C][C]0.4161[/C][C]0.9758[/C][C]0.4161[/C][/ROW]
[ROW][C]70[/C][C]57.81[/C][C]71.6275[/C][C]59.769[/C][C]84.7959[/C][C]0.0199[/C][C]0.9249[/C][C]0.9724[/C][C]0.4057[/C][/ROW]
[ROW][C]71[/C][C]58.76[/C][C]71.4335[/C][C]57.9249[/C][C]86.6748[/C][C]0.0516[/C][C]0.9601[/C][C]0.9808[/C][C]0.4086[/C][/ROW]
[ROW][C]72[/C][C]62.47[/C][C]71.7718[/C][C]56.88[/C][C]88.7868[/C][C]0.142[/C][C]0.933[/C][C]0.9553[/C][C]0.4333[/C][/ROW]
[ROW][C]73[/C][C]53.68[/C][C]72.4939[/C][C]56.2093[/C][C]91.3233[/C][C]0.0251[/C][C]0.8516[/C][C]0.8339[/C][C]0.4695[/C][/ROW]
[ROW][C]74[/C][C]57.56[/C][C]72.0613[/C][C]54.6297[/C][C]92.4636[/C][C]0.0818[/C][C]0.9613[/C][C]0.873[/C][C]0.4553[/C][/ROW]
[ROW][C]75[/C][C]62.05[/C][C]72.1851[/C][C]53.6305[/C][C]94.1378[/C][C]0.1828[/C][C]0.9042[/C][C]0.8156[/C][C]0.4628[/C][/ROW]
[ROW][C]76[/C][C]67.49[/C][C]73.2503[/C][C]53.4941[/C][C]96.8395[/C][C]0.3161[/C][C]0.824[/C][C]0.6026[/C][C]0.5007[/C][/ROW]
[ROW][C]77[/C][C]67.21[/C][C]73.2849[/C][C]52.5607[/C][C]98.2672[/C][C]0.3168[/C][C]0.6753[/C][C]0.6092[/C][C]0.5017[/C][/ROW]
[ROW][C]78[/C][C]71.05[/C][C]73.0064[/C][C]51.4285[/C][C]99.2639[/C][C]0.4419[/C][C]0.6674[/C][C]0.63[/C][C]0.4933[/C][/ROW]
[ROW][C]79[/C][C]76.93[/C][C]73.619[/C][C]51.065[/C][C]101.2863[/C][C]0.4073[/C][C]0.5722[/C][C]0.4957[/C][C]0.511[/C][/ROW]
[ROW][C]80[/C][C]70.76[/C][C]73.4536[/C][C]50.1167[/C][C]102.327[/C][C]0.4275[/C][C]0.4067[/C][C]0.5061[/C][C]0.5061[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4687&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4687&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[68])
5664.14-------
5762.85-------
5858.75-------
5955.33-------
6057.03-------
6163.18-------
6260.19-------
6362.12-------
6470.12-------
6569.75-------
6668.56-------
6773.77-------
6873.23-------
6961.9672.224163.585781.53090.01530.41610.97580.4161
7057.8171.627559.76984.79590.01990.92490.97240.4057
7158.7671.433557.924986.67480.05160.96010.98080.4086
7262.4771.771856.8888.78680.1420.9330.95530.4333
7353.6872.493956.209391.32330.02510.85160.83390.4695
7457.5672.061354.629792.46360.08180.96130.8730.4553
7562.0572.185153.630594.13780.18280.90420.81560.4628
7667.4973.250353.494196.83950.31610.8240.60260.5007
7767.2173.284952.560798.26720.31680.67530.60920.5017
7871.0573.006451.428599.26390.44190.66740.630.4933
7976.9373.61951.065101.28630.40730.57220.49570.511
8070.7673.453650.1167102.3270.42750.40670.50610.5061







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
690.0657-0.14210.0118105.35278.77942.963
700.0938-0.19290.0161190.922615.91023.9888
710.1089-0.17740.0148160.618113.38483.6585
720.121-0.12960.010886.52337.21032.6852
730.1325-0.25950.0216353.961929.49685.4311
740.1445-0.20120.0168210.288217.5244.1862
750.1552-0.14040.0117102.72048.562.9258
760.1643-0.07860.006633.18152.76511.6629
770.1739-0.08290.006936.90493.07541.7537
780.1835-0.02680.00223.82740.3190.5648
790.19170.0450.003710.96250.91350.9558
800.2006-0.03670.00317.25570.60460.7776

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
69 & 0.0657 & -0.1421 & 0.0118 & 105.3527 & 8.7794 & 2.963 \tabularnewline
70 & 0.0938 & -0.1929 & 0.0161 & 190.9226 & 15.9102 & 3.9888 \tabularnewline
71 & 0.1089 & -0.1774 & 0.0148 & 160.6181 & 13.3848 & 3.6585 \tabularnewline
72 & 0.121 & -0.1296 & 0.0108 & 86.5233 & 7.2103 & 2.6852 \tabularnewline
73 & 0.1325 & -0.2595 & 0.0216 & 353.9619 & 29.4968 & 5.4311 \tabularnewline
74 & 0.1445 & -0.2012 & 0.0168 & 210.2882 & 17.524 & 4.1862 \tabularnewline
75 & 0.1552 & -0.1404 & 0.0117 & 102.7204 & 8.56 & 2.9258 \tabularnewline
76 & 0.1643 & -0.0786 & 0.0066 & 33.1815 & 2.7651 & 1.6629 \tabularnewline
77 & 0.1739 & -0.0829 & 0.0069 & 36.9049 & 3.0754 & 1.7537 \tabularnewline
78 & 0.1835 & -0.0268 & 0.0022 & 3.8274 & 0.319 & 0.5648 \tabularnewline
79 & 0.1917 & 0.045 & 0.0037 & 10.9625 & 0.9135 & 0.9558 \tabularnewline
80 & 0.2006 & -0.0367 & 0.0031 & 7.2557 & 0.6046 & 0.7776 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4687&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]69[/C][C]0.0657[/C][C]-0.1421[/C][C]0.0118[/C][C]105.3527[/C][C]8.7794[/C][C]2.963[/C][/ROW]
[ROW][C]70[/C][C]0.0938[/C][C]-0.1929[/C][C]0.0161[/C][C]190.9226[/C][C]15.9102[/C][C]3.9888[/C][/ROW]
[ROW][C]71[/C][C]0.1089[/C][C]-0.1774[/C][C]0.0148[/C][C]160.6181[/C][C]13.3848[/C][C]3.6585[/C][/ROW]
[ROW][C]72[/C][C]0.121[/C][C]-0.1296[/C][C]0.0108[/C][C]86.5233[/C][C]7.2103[/C][C]2.6852[/C][/ROW]
[ROW][C]73[/C][C]0.1325[/C][C]-0.2595[/C][C]0.0216[/C][C]353.9619[/C][C]29.4968[/C][C]5.4311[/C][/ROW]
[ROW][C]74[/C][C]0.1445[/C][C]-0.2012[/C][C]0.0168[/C][C]210.2882[/C][C]17.524[/C][C]4.1862[/C][/ROW]
[ROW][C]75[/C][C]0.1552[/C][C]-0.1404[/C][C]0.0117[/C][C]102.7204[/C][C]8.56[/C][C]2.9258[/C][/ROW]
[ROW][C]76[/C][C]0.1643[/C][C]-0.0786[/C][C]0.0066[/C][C]33.1815[/C][C]2.7651[/C][C]1.6629[/C][/ROW]
[ROW][C]77[/C][C]0.1739[/C][C]-0.0829[/C][C]0.0069[/C][C]36.9049[/C][C]3.0754[/C][C]1.7537[/C][/ROW]
[ROW][C]78[/C][C]0.1835[/C][C]-0.0268[/C][C]0.0022[/C][C]3.8274[/C][C]0.319[/C][C]0.5648[/C][/ROW]
[ROW][C]79[/C][C]0.1917[/C][C]0.045[/C][C]0.0037[/C][C]10.9625[/C][C]0.9135[/C][C]0.9558[/C][/ROW]
[ROW][C]80[/C][C]0.2006[/C][C]-0.0367[/C][C]0.0031[/C][C]7.2557[/C][C]0.6046[/C][C]0.7776[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4687&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4687&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
690.0657-0.14210.0118105.35278.77942.963
700.0938-0.19290.0161190.922615.91023.9888
710.1089-0.17740.0148160.618113.38483.6585
720.121-0.12960.010886.52337.21032.6852
730.1325-0.25950.0216353.961929.49685.4311
740.1445-0.20120.0168210.288217.5244.1862
750.1552-0.14040.0117102.72048.562.9258
760.1643-0.07860.006633.18152.76511.6629
770.1739-0.08290.006936.90493.07541.7537
780.1835-0.02680.00223.82740.3190.5648
790.19170.0450.003710.96250.91350.9558
800.2006-0.03670.00317.25570.60460.7776



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