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, 13 Dec 2008 06:41:26 -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/13/t1229175746vgajrxwi58wcput.htm/, Retrieved Sun, 19 May 2024 05:34:38 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=33078, Retrieved Sun, 19 May 2024 05:34:38 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact191
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [Run sequence plot...] [2008-12-02 21:55:47] [ed2ba3b6182103c15c0ab511ae4e6284]
- RMP   [Variance Reduction Matrix] [Variance reductio...] [2008-12-12 09:38:10] [ed2ba3b6182103c15c0ab511ae4e6284]
- RM      [ARIMA Backward Selection] [ARIMA backward se...] [2008-12-13 13:21:17] [ed2ba3b6182103c15c0ab511ae4e6284]
- RM          [ARIMA Forecasting] [ARIMA forecast Ta...] [2008-12-13 13:41:26] [a8228479d4547a92e2d3f176a5299609] [Current]
Feedback Forum

Post a new message
Dataseries X:
44.9
48.1
52.3
48.9
52.6
60.3
50.5
41.6
56
51.4
52.9
54.9
43.9
51
51.9
54.3
50.3
57.2
48.8
41.1
58
63
53.8
54.7
55.5
56.1
69.6
69.4
57.2
68
53.3
47.9
60.8
61.7
57.8
51.4
50.5
48.1
58.7
54
56.1
60.4
51.2
50.7
56.4
53.3
52.6
47.7
49.5
48.5
55.3
49.8
57.4
64.6
53
41.5
55.9
58.4
53.5
50.6
58.5




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time1 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33078&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]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33078&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33078&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'George Udny Yule' @ 72.249.76.132







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[49])
3750.5-------
3848.1-------
3958.7-------
4054-------
4156.1-------
4260.4-------
4351.2-------
4450.7-------
4556.4-------
4653.3-------
4752.6-------
4847.7-------
4949.5-------
5048.545.45434.734456.17360.28880.22970.31430.2297
5155.356.05443.916968.1910.45150.88870.33460.8551
5249.851.35437.948664.75940.41010.2820.34940.6068
5357.453.45438.890268.01770.29770.68860.36090.7027
5464.657.75442.117573.39050.19540.51770.37010.8496
555348.55431.913765.19420.30030.02940.37760.4556
5641.548.05430.467265.64080.23260.29070.3840.436
5755.953.75435.26972.23890.410.90310.38950.674
5858.450.65431.312669.99540.21620.29750.39430.5465
5953.549.95429.792470.11560.36520.20580.39850.5176
6050.645.05424.104466.00360.30190.21470.40220.3387
6158.546.85425.144968.56310.14650.36760.40560.4056

\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[49]) \tabularnewline
37 & 50.5 & - & - & - & - & - & - & - \tabularnewline
38 & 48.1 & - & - & - & - & - & - & - \tabularnewline
39 & 58.7 & - & - & - & - & - & - & - \tabularnewline
40 & 54 & - & - & - & - & - & - & - \tabularnewline
41 & 56.1 & - & - & - & - & - & - & - \tabularnewline
42 & 60.4 & - & - & - & - & - & - & - \tabularnewline
43 & 51.2 & - & - & - & - & - & - & - \tabularnewline
44 & 50.7 & - & - & - & - & - & - & - \tabularnewline
45 & 56.4 & - & - & - & - & - & - & - \tabularnewline
46 & 53.3 & - & - & - & - & - & - & - \tabularnewline
47 & 52.6 & - & - & - & - & - & - & - \tabularnewline
48 & 47.7 & - & - & - & - & - & - & - \tabularnewline
49 & 49.5 & - & - & - & - & - & - & - \tabularnewline
50 & 48.5 & 45.454 & 34.7344 & 56.1736 & 0.2888 & 0.2297 & 0.3143 & 0.2297 \tabularnewline
51 & 55.3 & 56.054 & 43.9169 & 68.191 & 0.4515 & 0.8887 & 0.3346 & 0.8551 \tabularnewline
52 & 49.8 & 51.354 & 37.9486 & 64.7594 & 0.4101 & 0.282 & 0.3494 & 0.6068 \tabularnewline
53 & 57.4 & 53.454 & 38.8902 & 68.0177 & 0.2977 & 0.6886 & 0.3609 & 0.7027 \tabularnewline
54 & 64.6 & 57.754 & 42.1175 & 73.3905 & 0.1954 & 0.5177 & 0.3701 & 0.8496 \tabularnewline
55 & 53 & 48.554 & 31.9137 & 65.1942 & 0.3003 & 0.0294 & 0.3776 & 0.4556 \tabularnewline
56 & 41.5 & 48.054 & 30.4672 & 65.6408 & 0.2326 & 0.2907 & 0.384 & 0.436 \tabularnewline
57 & 55.9 & 53.754 & 35.269 & 72.2389 & 0.41 & 0.9031 & 0.3895 & 0.674 \tabularnewline
58 & 58.4 & 50.654 & 31.3126 & 69.9954 & 0.2162 & 0.2975 & 0.3943 & 0.5465 \tabularnewline
59 & 53.5 & 49.954 & 29.7924 & 70.1156 & 0.3652 & 0.2058 & 0.3985 & 0.5176 \tabularnewline
60 & 50.6 & 45.054 & 24.1044 & 66.0036 & 0.3019 & 0.2147 & 0.4022 & 0.3387 \tabularnewline
61 & 58.5 & 46.854 & 25.1449 & 68.5631 & 0.1465 & 0.3676 & 0.4056 & 0.4056 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33078&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[49])[/C][/ROW]
[ROW][C]37[/C][C]50.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]48.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]58.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]54[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]56.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]60.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]51.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]50.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]56.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]53.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]52.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]47.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]49.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]48.5[/C][C]45.454[/C][C]34.7344[/C][C]56.1736[/C][C]0.2888[/C][C]0.2297[/C][C]0.3143[/C][C]0.2297[/C][/ROW]
[ROW][C]51[/C][C]55.3[/C][C]56.054[/C][C]43.9169[/C][C]68.191[/C][C]0.4515[/C][C]0.8887[/C][C]0.3346[/C][C]0.8551[/C][/ROW]
[ROW][C]52[/C][C]49.8[/C][C]51.354[/C][C]37.9486[/C][C]64.7594[/C][C]0.4101[/C][C]0.282[/C][C]0.3494[/C][C]0.6068[/C][/ROW]
[ROW][C]53[/C][C]57.4[/C][C]53.454[/C][C]38.8902[/C][C]68.0177[/C][C]0.2977[/C][C]0.6886[/C][C]0.3609[/C][C]0.7027[/C][/ROW]
[ROW][C]54[/C][C]64.6[/C][C]57.754[/C][C]42.1175[/C][C]73.3905[/C][C]0.1954[/C][C]0.5177[/C][C]0.3701[/C][C]0.8496[/C][/ROW]
[ROW][C]55[/C][C]53[/C][C]48.554[/C][C]31.9137[/C][C]65.1942[/C][C]0.3003[/C][C]0.0294[/C][C]0.3776[/C][C]0.4556[/C][/ROW]
[ROW][C]56[/C][C]41.5[/C][C]48.054[/C][C]30.4672[/C][C]65.6408[/C][C]0.2326[/C][C]0.2907[/C][C]0.384[/C][C]0.436[/C][/ROW]
[ROW][C]57[/C][C]55.9[/C][C]53.754[/C][C]35.269[/C][C]72.2389[/C][C]0.41[/C][C]0.9031[/C][C]0.3895[/C][C]0.674[/C][/ROW]
[ROW][C]58[/C][C]58.4[/C][C]50.654[/C][C]31.3126[/C][C]69.9954[/C][C]0.2162[/C][C]0.2975[/C][C]0.3943[/C][C]0.5465[/C][/ROW]
[ROW][C]59[/C][C]53.5[/C][C]49.954[/C][C]29.7924[/C][C]70.1156[/C][C]0.3652[/C][C]0.2058[/C][C]0.3985[/C][C]0.5176[/C][/ROW]
[ROW][C]60[/C][C]50.6[/C][C]45.054[/C][C]24.1044[/C][C]66.0036[/C][C]0.3019[/C][C]0.2147[/C][C]0.4022[/C][C]0.3387[/C][/ROW]
[ROW][C]61[/C][C]58.5[/C][C]46.854[/C][C]25.1449[/C][C]68.5631[/C][C]0.1465[/C][C]0.3676[/C][C]0.4056[/C][C]0.4056[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33078&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33078&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[49])
3750.5-------
3848.1-------
3958.7-------
4054-------
4156.1-------
4260.4-------
4351.2-------
4450.7-------
4556.4-------
4653.3-------
4752.6-------
4847.7-------
4949.5-------
5048.545.45434.734456.17360.28880.22970.31430.2297
5155.356.05443.916968.1910.45150.88870.33460.8551
5249.851.35437.948664.75940.41010.2820.34940.6068
5357.453.45438.890268.01770.29770.68860.36090.7027
5464.657.75442.117573.39050.19540.51770.37010.8496
555348.55431.913765.19420.30030.02940.37760.4556
5641.548.05430.467265.64080.23260.29070.3840.436
5755.953.75435.26972.23890.410.90310.38950.674
5858.450.65431.312669.99540.21620.29750.39430.5465
5953.549.95429.792470.11560.36520.20580.39850.5176
6050.645.05424.104466.00360.30190.21470.40220.3387
6158.546.85425.144968.56310.14650.36760.40560.4056







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.12030.0670.00569.27820.77320.8793
510.1105-0.01350.00110.56850.04740.2177
520.1332-0.03030.00252.41490.20120.4486
530.1390.07380.006215.5711.29761.1391
540.13810.11850.009946.86793.90571.9763
550.17490.09160.007619.7671.64731.2835
560.1867-0.13640.011442.95473.57961.892
570.17540.03990.00334.60540.38380.6195
580.19480.15290.012760.00075.00012.2361
590.20590.0710.005912.57421.04791.0236
600.23720.12310.010330.75832.56321.601
610.23640.24860.0207135.629611.30253.3619

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.1203 & 0.067 & 0.0056 & 9.2782 & 0.7732 & 0.8793 \tabularnewline
51 & 0.1105 & -0.0135 & 0.0011 & 0.5685 & 0.0474 & 0.2177 \tabularnewline
52 & 0.1332 & -0.0303 & 0.0025 & 2.4149 & 0.2012 & 0.4486 \tabularnewline
53 & 0.139 & 0.0738 & 0.0062 & 15.571 & 1.2976 & 1.1391 \tabularnewline
54 & 0.1381 & 0.1185 & 0.0099 & 46.8679 & 3.9057 & 1.9763 \tabularnewline
55 & 0.1749 & 0.0916 & 0.0076 & 19.767 & 1.6473 & 1.2835 \tabularnewline
56 & 0.1867 & -0.1364 & 0.0114 & 42.9547 & 3.5796 & 1.892 \tabularnewline
57 & 0.1754 & 0.0399 & 0.0033 & 4.6054 & 0.3838 & 0.6195 \tabularnewline
58 & 0.1948 & 0.1529 & 0.0127 & 60.0007 & 5.0001 & 2.2361 \tabularnewline
59 & 0.2059 & 0.071 & 0.0059 & 12.5742 & 1.0479 & 1.0236 \tabularnewline
60 & 0.2372 & 0.1231 & 0.0103 & 30.7583 & 2.5632 & 1.601 \tabularnewline
61 & 0.2364 & 0.2486 & 0.0207 & 135.6296 & 11.3025 & 3.3619 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=33078&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]50[/C][C]0.1203[/C][C]0.067[/C][C]0.0056[/C][C]9.2782[/C][C]0.7732[/C][C]0.8793[/C][/ROW]
[ROW][C]51[/C][C]0.1105[/C][C]-0.0135[/C][C]0.0011[/C][C]0.5685[/C][C]0.0474[/C][C]0.2177[/C][/ROW]
[ROW][C]52[/C][C]0.1332[/C][C]-0.0303[/C][C]0.0025[/C][C]2.4149[/C][C]0.2012[/C][C]0.4486[/C][/ROW]
[ROW][C]53[/C][C]0.139[/C][C]0.0738[/C][C]0.0062[/C][C]15.571[/C][C]1.2976[/C][C]1.1391[/C][/ROW]
[ROW][C]54[/C][C]0.1381[/C][C]0.1185[/C][C]0.0099[/C][C]46.8679[/C][C]3.9057[/C][C]1.9763[/C][/ROW]
[ROW][C]55[/C][C]0.1749[/C][C]0.0916[/C][C]0.0076[/C][C]19.767[/C][C]1.6473[/C][C]1.2835[/C][/ROW]
[ROW][C]56[/C][C]0.1867[/C][C]-0.1364[/C][C]0.0114[/C][C]42.9547[/C][C]3.5796[/C][C]1.892[/C][/ROW]
[ROW][C]57[/C][C]0.1754[/C][C]0.0399[/C][C]0.0033[/C][C]4.6054[/C][C]0.3838[/C][C]0.6195[/C][/ROW]
[ROW][C]58[/C][C]0.1948[/C][C]0.1529[/C][C]0.0127[/C][C]60.0007[/C][C]5.0001[/C][C]2.2361[/C][/ROW]
[ROW][C]59[/C][C]0.2059[/C][C]0.071[/C][C]0.0059[/C][C]12.5742[/C][C]1.0479[/C][C]1.0236[/C][/ROW]
[ROW][C]60[/C][C]0.2372[/C][C]0.1231[/C][C]0.0103[/C][C]30.7583[/C][C]2.5632[/C][C]1.601[/C][/ROW]
[ROW][C]61[/C][C]0.2364[/C][C]0.2486[/C][C]0.0207[/C][C]135.6296[/C][C]11.3025[/C][C]3.3619[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=33078&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=33078&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
500.12030.0670.00569.27820.77320.8793
510.1105-0.01350.00110.56850.04740.2177
520.1332-0.03030.00252.41490.20120.4486
530.1390.07380.006215.5711.29761.1391
540.13810.11850.009946.86793.90571.9763
550.17490.09160.007619.7671.64731.2835
560.1867-0.13640.011442.95473.57961.892
570.17540.03990.00334.60540.38380.6195
580.19480.15290.012760.00075.00012.2361
590.20590.0710.005912.57421.04791.0236
600.23720.12310.010330.75832.56321.601
610.23640.24860.0207135.629611.30253.3619



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