Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 13 Dec 2007 02:07:07 -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/13/t11975359291e1erxm8nqhl3gt.htm/, Retrieved Sun, 05 May 2024 17:14:56 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3322, Retrieved Sun, 05 May 2024 17:14:56 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact226
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [met lambda 0] [2007-12-13 09:07:07] [031886dbad66702fa31ca1c4d15fdd0f] [Current]
Feedback Forum

Post a new message
Dataseries X:
1.1608
1.1208
1.0883
1.0704
1.0628
1.0378
1.0353
1.0604
1.0501
1.0706
1.0338
1.011
1.0137
0.9834
0.9643
0.947
0.906
0.9492
0.9397
0.9041
0.8721
0.8552
0.8564
0.8973
0.9383
0.9217
0.9095
0.892
0.8742
0.8532
0.8607
0.9005
0.9111
0.9059
0.8883
0.8924
0.8833
0.87
0.8758
0.8858
0.917
0.9554
0.9922
0.9778
0.9808
0.9811
1.0014
1.0183
1.0622
1.0773
1.0807
1.0848
1.1582
1.1663
1.1372
1.1139
1.1222
1.1692
1.1702
1.2286




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time14 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 & 14 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=3322&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]14 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=3322&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3322&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 time14 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[48])
360.8924-------
370.8833-------
380.87-------
390.8758-------
400.8858-------
410.917-------
420.9554-------
430.9922-------
440.9778-------
450.9808-------
460.9811-------
471.0014-------
481.0183-------
491.06221.09791.07161.12480.0047111
501.07731.08911.05221.12730.27250.916110.9999
511.08071.10251.04741.16050.2310.802410.9978
521.08481.0991.03321.16890.34580.695610.9881
531.15821.06690.99181.14770.01340.33210.99990.8809
541.16631.10951.0241.20220.11480.15150.99940.9731
551.13721.12521.0311.2280.40960.21670.99440.9792
561.11391.16421.06091.27750.19220.67970.99940.9942
571.12221.17171.06111.29390.21350.82320.99890.9931
581.16921.18471.06591.31670.40910.82320.99870.9933
591.17021.19371.06511.3380.37450.63060.99550.9914
601.22861.27321.12471.44120.30160.88510.99850.9985

\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 & 0.8924 & - & - & - & - & - & - & - \tabularnewline
37 & 0.8833 & - & - & - & - & - & - & - \tabularnewline
38 & 0.87 & - & - & - & - & - & - & - \tabularnewline
39 & 0.8758 & - & - & - & - & - & - & - \tabularnewline
40 & 0.8858 & - & - & - & - & - & - & - \tabularnewline
41 & 0.917 & - & - & - & - & - & - & - \tabularnewline
42 & 0.9554 & - & - & - & - & - & - & - \tabularnewline
43 & 0.9922 & - & - & - & - & - & - & - \tabularnewline
44 & 0.9778 & - & - & - & - & - & - & - \tabularnewline
45 & 0.9808 & - & - & - & - & - & - & - \tabularnewline
46 & 0.9811 & - & - & - & - & - & - & - \tabularnewline
47 & 1.0014 & - & - & - & - & - & - & - \tabularnewline
48 & 1.0183 & - & - & - & - & - & - & - \tabularnewline
49 & 1.0622 & 1.0979 & 1.0716 & 1.1248 & 0.0047 & 1 & 1 & 1 \tabularnewline
50 & 1.0773 & 1.0891 & 1.0522 & 1.1273 & 0.2725 & 0.9161 & 1 & 0.9999 \tabularnewline
51 & 1.0807 & 1.1025 & 1.0474 & 1.1605 & 0.231 & 0.8024 & 1 & 0.9978 \tabularnewline
52 & 1.0848 & 1.099 & 1.0332 & 1.1689 & 0.3458 & 0.6956 & 1 & 0.9881 \tabularnewline
53 & 1.1582 & 1.0669 & 0.9918 & 1.1477 & 0.0134 & 0.3321 & 0.9999 & 0.8809 \tabularnewline
54 & 1.1663 & 1.1095 & 1.024 & 1.2022 & 0.1148 & 0.1515 & 0.9994 & 0.9731 \tabularnewline
55 & 1.1372 & 1.1252 & 1.031 & 1.228 & 0.4096 & 0.2167 & 0.9944 & 0.9792 \tabularnewline
56 & 1.1139 & 1.1642 & 1.0609 & 1.2775 & 0.1922 & 0.6797 & 0.9994 & 0.9942 \tabularnewline
57 & 1.1222 & 1.1717 & 1.0611 & 1.2939 & 0.2135 & 0.8232 & 0.9989 & 0.9931 \tabularnewline
58 & 1.1692 & 1.1847 & 1.0659 & 1.3167 & 0.4091 & 0.8232 & 0.9987 & 0.9933 \tabularnewline
59 & 1.1702 & 1.1937 & 1.0651 & 1.338 & 0.3745 & 0.6306 & 0.9955 & 0.9914 \tabularnewline
60 & 1.2286 & 1.2732 & 1.1247 & 1.4412 & 0.3016 & 0.8851 & 0.9985 & 0.9985 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3322&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]0.8924[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]0.8833[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]0.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]0.8758[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]0.8858[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]0.917[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]0.9554[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]0.9922[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]0.9778[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]0.9808[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]0.9811[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]1.0014[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]1.0183[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]1.0622[/C][C]1.0979[/C][C]1.0716[/C][C]1.1248[/C][C]0.0047[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]50[/C][C]1.0773[/C][C]1.0891[/C][C]1.0522[/C][C]1.1273[/C][C]0.2725[/C][C]0.9161[/C][C]1[/C][C]0.9999[/C][/ROW]
[ROW][C]51[/C][C]1.0807[/C][C]1.1025[/C][C]1.0474[/C][C]1.1605[/C][C]0.231[/C][C]0.8024[/C][C]1[/C][C]0.9978[/C][/ROW]
[ROW][C]52[/C][C]1.0848[/C][C]1.099[/C][C]1.0332[/C][C]1.1689[/C][C]0.3458[/C][C]0.6956[/C][C]1[/C][C]0.9881[/C][/ROW]
[ROW][C]53[/C][C]1.1582[/C][C]1.0669[/C][C]0.9918[/C][C]1.1477[/C][C]0.0134[/C][C]0.3321[/C][C]0.9999[/C][C]0.8809[/C][/ROW]
[ROW][C]54[/C][C]1.1663[/C][C]1.1095[/C][C]1.024[/C][C]1.2022[/C][C]0.1148[/C][C]0.1515[/C][C]0.9994[/C][C]0.9731[/C][/ROW]
[ROW][C]55[/C][C]1.1372[/C][C]1.1252[/C][C]1.031[/C][C]1.228[/C][C]0.4096[/C][C]0.2167[/C][C]0.9944[/C][C]0.9792[/C][/ROW]
[ROW][C]56[/C][C]1.1139[/C][C]1.1642[/C][C]1.0609[/C][C]1.2775[/C][C]0.1922[/C][C]0.6797[/C][C]0.9994[/C][C]0.9942[/C][/ROW]
[ROW][C]57[/C][C]1.1222[/C][C]1.1717[/C][C]1.0611[/C][C]1.2939[/C][C]0.2135[/C][C]0.8232[/C][C]0.9989[/C][C]0.9931[/C][/ROW]
[ROW][C]58[/C][C]1.1692[/C][C]1.1847[/C][C]1.0659[/C][C]1.3167[/C][C]0.4091[/C][C]0.8232[/C][C]0.9987[/C][C]0.9933[/C][/ROW]
[ROW][C]59[/C][C]1.1702[/C][C]1.1937[/C][C]1.0651[/C][C]1.338[/C][C]0.3745[/C][C]0.6306[/C][C]0.9955[/C][C]0.9914[/C][/ROW]
[ROW][C]60[/C][C]1.2286[/C][C]1.2732[/C][C]1.1247[/C][C]1.4412[/C][C]0.3016[/C][C]0.8851[/C][C]0.9985[/C][C]0.9985[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3322&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3322&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])
360.8924-------
370.8833-------
380.87-------
390.8758-------
400.8858-------
410.917-------
420.9554-------
430.9922-------
440.9778-------
450.9808-------
460.9811-------
471.0014-------
481.0183-------
491.06221.09791.07161.12480.0047111
501.07731.08911.05221.12730.27250.916110.9999
511.08071.10251.04741.16050.2310.802410.9978
521.08481.0991.03321.16890.34580.695610.9881
531.15821.06690.99181.14770.01340.33210.99990.8809
541.16631.10951.0241.20220.11480.15150.99940.9731
551.13721.12521.0311.2280.40960.21670.99440.9792
561.11391.16421.06091.27750.19220.67970.99940.9942
571.12221.17171.06111.29390.21350.82320.99890.9931
581.16921.18471.06591.31670.40910.82320.99870.9933
591.17021.19371.06511.3380.37450.63060.99550.9914
601.22861.27321.12471.44120.30160.88510.99850.9985







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0125-0.03250.00270.00131e-040.0103
500.0179-0.01089e-041e-0400.0034
510.0268-0.01970.00165e-0400.0063
520.0325-0.01290.00112e-0400.0041
530.03860.08560.00710.00837e-040.0264
540.04260.05120.00430.00323e-040.0164
550.04660.01079e-041e-0400.0035
560.0497-0.04320.00360.00252e-040.0145
570.0532-0.04230.00350.00252e-040.0143
580.0568-0.01310.00112e-0400.0045
590.0616-0.01970.00166e-0400.0068
600.0674-0.0350.00290.0022e-040.0129

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0125 & -0.0325 & 0.0027 & 0.0013 & 1e-04 & 0.0103 \tabularnewline
50 & 0.0179 & -0.0108 & 9e-04 & 1e-04 & 0 & 0.0034 \tabularnewline
51 & 0.0268 & -0.0197 & 0.0016 & 5e-04 & 0 & 0.0063 \tabularnewline
52 & 0.0325 & -0.0129 & 0.0011 & 2e-04 & 0 & 0.0041 \tabularnewline
53 & 0.0386 & 0.0856 & 0.0071 & 0.0083 & 7e-04 & 0.0264 \tabularnewline
54 & 0.0426 & 0.0512 & 0.0043 & 0.0032 & 3e-04 & 0.0164 \tabularnewline
55 & 0.0466 & 0.0107 & 9e-04 & 1e-04 & 0 & 0.0035 \tabularnewline
56 & 0.0497 & -0.0432 & 0.0036 & 0.0025 & 2e-04 & 0.0145 \tabularnewline
57 & 0.0532 & -0.0423 & 0.0035 & 0.0025 & 2e-04 & 0.0143 \tabularnewline
58 & 0.0568 & -0.0131 & 0.0011 & 2e-04 & 0 & 0.0045 \tabularnewline
59 & 0.0616 & -0.0197 & 0.0016 & 6e-04 & 0 & 0.0068 \tabularnewline
60 & 0.0674 & -0.035 & 0.0029 & 0.002 & 2e-04 & 0.0129 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3322&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.0125[/C][C]-0.0325[/C][C]0.0027[/C][C]0.0013[/C][C]1e-04[/C][C]0.0103[/C][/ROW]
[ROW][C]50[/C][C]0.0179[/C][C]-0.0108[/C][C]9e-04[/C][C]1e-04[/C][C]0[/C][C]0.0034[/C][/ROW]
[ROW][C]51[/C][C]0.0268[/C][C]-0.0197[/C][C]0.0016[/C][C]5e-04[/C][C]0[/C][C]0.0063[/C][/ROW]
[ROW][C]52[/C][C]0.0325[/C][C]-0.0129[/C][C]0.0011[/C][C]2e-04[/C][C]0[/C][C]0.0041[/C][/ROW]
[ROW][C]53[/C][C]0.0386[/C][C]0.0856[/C][C]0.0071[/C][C]0.0083[/C][C]7e-04[/C][C]0.0264[/C][/ROW]
[ROW][C]54[/C][C]0.0426[/C][C]0.0512[/C][C]0.0043[/C][C]0.0032[/C][C]3e-04[/C][C]0.0164[/C][/ROW]
[ROW][C]55[/C][C]0.0466[/C][C]0.0107[/C][C]9e-04[/C][C]1e-04[/C][C]0[/C][C]0.0035[/C][/ROW]
[ROW][C]56[/C][C]0.0497[/C][C]-0.0432[/C][C]0.0036[/C][C]0.0025[/C][C]2e-04[/C][C]0.0145[/C][/ROW]
[ROW][C]57[/C][C]0.0532[/C][C]-0.0423[/C][C]0.0035[/C][C]0.0025[/C][C]2e-04[/C][C]0.0143[/C][/ROW]
[ROW][C]58[/C][C]0.0568[/C][C]-0.0131[/C][C]0.0011[/C][C]2e-04[/C][C]0[/C][C]0.0045[/C][/ROW]
[ROW][C]59[/C][C]0.0616[/C][C]-0.0197[/C][C]0.0016[/C][C]6e-04[/C][C]0[/C][C]0.0068[/C][/ROW]
[ROW][C]60[/C][C]0.0674[/C][C]-0.035[/C][C]0.0029[/C][C]0.002[/C][C]2e-04[/C][C]0.0129[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3322&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3322&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.0125-0.03250.00270.00131e-040.0103
500.0179-0.01089e-041e-0400.0034
510.0268-0.01970.00165e-0400.0063
520.0325-0.01290.00112e-0400.0041
530.03860.08560.00710.00837e-040.0264
540.04260.05120.00430.00323e-040.0164
550.04660.01079e-041e-0400.0035
560.0497-0.04320.00360.00252e-040.0145
570.0532-0.04230.00350.00252e-040.0143
580.0568-0.01310.00112e-0400.0045
590.0616-0.01970.00166e-0400.0068
600.0674-0.0350.00290.0022e-040.0129



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