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 computationTue, 16 Dec 2008 20:13:35 -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/17/t1229483722xu5h5zlg3t89o3x.htm/, Retrieved Sun, 19 May 2024 05:56:50 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=34256, Retrieved Sun, 19 May 2024 05:56:50 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact241
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Backward Selection] [Step 5 Eigen tijd...] [2008-12-10 01:30:15] [2e47c012a41b5d00849693def6142119]
F RMP   [ARIMA Forecasting] [Arima forecasting...] [2008-12-16 23:21:15] [7a4703cb85a198d9845d72899eff0288]
-           [ARIMA Forecasting] [] [2008-12-17 03:13:35] [d41d8cd98f00b204e9800998ecf8427e] [Current]
Feedback Forum

Post a new message
Dataseries X:
1.1372
1.1139
1.1222
1.1692
1.1702
1.2286
1.2613
1.2646
1.2262
1.1985
1.2007
1.2138
1.2266
1.2176
1.2218
1.249
1.2991
1.3408
1.3119
1.3014
1.3201
1.2938
1.2694
1.2165
1.2037
1.2292
1.2256
1.2015
1.1786
1.1856
1.2103
1.1938
1.202
1.2271
1.277
1.265
1.2684
1.2811
1.2727
1.2611
1.2881
1.3213
1.2999
1.3074
1.3242
1.3516
1.3511
1.3419
1.3716
1.3622
1.3896
1.4227
1.4684
1.457
1.4718
1.4748
1.5527
1.575
1.5557
1.5553
1.577




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time10 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 & 10 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34256&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]10 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=34256&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34256&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 time10 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])
371.2684-------
381.2811-------
391.2727-------
401.2611-------
411.2881-------
421.3213-------
431.2999-------
441.3074-------
451.3242-------
461.3516-------
471.3511-------
481.3419-------
491.3716-------
501.36221.41111.36071.46160.02870.937610.9376
511.38961.40371.31921.48810.3720.83210.99880.7717
521.42271.37211.26161.48270.18490.37830.97550.5037
531.46841.3821.24941.51470.10090.27390.91740.5613
541.4571.42311.26961.57660.33260.28150.90320.7446
551.47181.42671.25381.59960.30460.36560.92470.7339
561.47481.41181.22231.60140.25760.26770.85990.6613
571.55271.41111.20731.61490.08670.27010.79830.648
581.5751.4351.21761.65240.10340.14430.77390.7162
591.55571.46751.23631.69870.22740.18110.83820.7919
601.55531.4551.21051.69950.21070.20970.81760.748
611.5771.45291.19651.70920.17120.21670.73280.7328

\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 & 1.2684 & - & - & - & - & - & - & - \tabularnewline
38 & 1.2811 & - & - & - & - & - & - & - \tabularnewline
39 & 1.2727 & - & - & - & - & - & - & - \tabularnewline
40 & 1.2611 & - & - & - & - & - & - & - \tabularnewline
41 & 1.2881 & - & - & - & - & - & - & - \tabularnewline
42 & 1.3213 & - & - & - & - & - & - & - \tabularnewline
43 & 1.2999 & - & - & - & - & - & - & - \tabularnewline
44 & 1.3074 & - & - & - & - & - & - & - \tabularnewline
45 & 1.3242 & - & - & - & - & - & - & - \tabularnewline
46 & 1.3516 & - & - & - & - & - & - & - \tabularnewline
47 & 1.3511 & - & - & - & - & - & - & - \tabularnewline
48 & 1.3419 & - & - & - & - & - & - & - \tabularnewline
49 & 1.3716 & - & - & - & - & - & - & - \tabularnewline
50 & 1.3622 & 1.4111 & 1.3607 & 1.4616 & 0.0287 & 0.9376 & 1 & 0.9376 \tabularnewline
51 & 1.3896 & 1.4037 & 1.3192 & 1.4881 & 0.372 & 0.8321 & 0.9988 & 0.7717 \tabularnewline
52 & 1.4227 & 1.3721 & 1.2616 & 1.4827 & 0.1849 & 0.3783 & 0.9755 & 0.5037 \tabularnewline
53 & 1.4684 & 1.382 & 1.2494 & 1.5147 & 0.1009 & 0.2739 & 0.9174 & 0.5613 \tabularnewline
54 & 1.457 & 1.4231 & 1.2696 & 1.5766 & 0.3326 & 0.2815 & 0.9032 & 0.7446 \tabularnewline
55 & 1.4718 & 1.4267 & 1.2538 & 1.5996 & 0.3046 & 0.3656 & 0.9247 & 0.7339 \tabularnewline
56 & 1.4748 & 1.4118 & 1.2223 & 1.6014 & 0.2576 & 0.2677 & 0.8599 & 0.6613 \tabularnewline
57 & 1.5527 & 1.4111 & 1.2073 & 1.6149 & 0.0867 & 0.2701 & 0.7983 & 0.648 \tabularnewline
58 & 1.575 & 1.435 & 1.2176 & 1.6524 & 0.1034 & 0.1443 & 0.7739 & 0.7162 \tabularnewline
59 & 1.5557 & 1.4675 & 1.2363 & 1.6987 & 0.2274 & 0.1811 & 0.8382 & 0.7919 \tabularnewline
60 & 1.5553 & 1.455 & 1.2105 & 1.6995 & 0.2107 & 0.2097 & 0.8176 & 0.748 \tabularnewline
61 & 1.577 & 1.4529 & 1.1965 & 1.7092 & 0.1712 & 0.2167 & 0.7328 & 0.7328 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34256&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]1.2684[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]1.2811[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]1.2727[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]1.2611[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]1.2881[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]1.3213[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]1.2999[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]1.3074[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]1.3242[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]1.3516[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]1.3511[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]1.3419[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]1.3716[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]1.3622[/C][C]1.4111[/C][C]1.3607[/C][C]1.4616[/C][C]0.0287[/C][C]0.9376[/C][C]1[/C][C]0.9376[/C][/ROW]
[ROW][C]51[/C][C]1.3896[/C][C]1.4037[/C][C]1.3192[/C][C]1.4881[/C][C]0.372[/C][C]0.8321[/C][C]0.9988[/C][C]0.7717[/C][/ROW]
[ROW][C]52[/C][C]1.4227[/C][C]1.3721[/C][C]1.2616[/C][C]1.4827[/C][C]0.1849[/C][C]0.3783[/C][C]0.9755[/C][C]0.5037[/C][/ROW]
[ROW][C]53[/C][C]1.4684[/C][C]1.382[/C][C]1.2494[/C][C]1.5147[/C][C]0.1009[/C][C]0.2739[/C][C]0.9174[/C][C]0.5613[/C][/ROW]
[ROW][C]54[/C][C]1.457[/C][C]1.4231[/C][C]1.2696[/C][C]1.5766[/C][C]0.3326[/C][C]0.2815[/C][C]0.9032[/C][C]0.7446[/C][/ROW]
[ROW][C]55[/C][C]1.4718[/C][C]1.4267[/C][C]1.2538[/C][C]1.5996[/C][C]0.3046[/C][C]0.3656[/C][C]0.9247[/C][C]0.7339[/C][/ROW]
[ROW][C]56[/C][C]1.4748[/C][C]1.4118[/C][C]1.2223[/C][C]1.6014[/C][C]0.2576[/C][C]0.2677[/C][C]0.8599[/C][C]0.6613[/C][/ROW]
[ROW][C]57[/C][C]1.5527[/C][C]1.4111[/C][C]1.2073[/C][C]1.6149[/C][C]0.0867[/C][C]0.2701[/C][C]0.7983[/C][C]0.648[/C][/ROW]
[ROW][C]58[/C][C]1.575[/C][C]1.435[/C][C]1.2176[/C][C]1.6524[/C][C]0.1034[/C][C]0.1443[/C][C]0.7739[/C][C]0.7162[/C][/ROW]
[ROW][C]59[/C][C]1.5557[/C][C]1.4675[/C][C]1.2363[/C][C]1.6987[/C][C]0.2274[/C][C]0.1811[/C][C]0.8382[/C][C]0.7919[/C][/ROW]
[ROW][C]60[/C][C]1.5553[/C][C]1.455[/C][C]1.2105[/C][C]1.6995[/C][C]0.2107[/C][C]0.2097[/C][C]0.8176[/C][C]0.748[/C][/ROW]
[ROW][C]61[/C][C]1.577[/C][C]1.4529[/C][C]1.1965[/C][C]1.7092[/C][C]0.1712[/C][C]0.2167[/C][C]0.7328[/C][C]0.7328[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34256&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34256&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])
371.2684-------
381.2811-------
391.2727-------
401.2611-------
411.2881-------
421.3213-------
431.2999-------
441.3074-------
451.3242-------
461.3516-------
471.3511-------
481.3419-------
491.3716-------
501.36221.41111.36071.46160.02870.937610.9376
511.38961.40371.31921.48810.3720.83210.99880.7717
521.42271.37211.26161.48270.18490.37830.97550.5037
531.46841.3821.24941.51470.10090.27390.91740.5613
541.4571.42311.26961.57660.33260.28150.90320.7446
551.47181.42671.25381.59960.30460.36560.92470.7339
561.47481.41181.22231.60140.25760.26770.85990.6613
571.55271.41111.20731.61490.08670.27010.79830.648
581.5751.4351.21761.65240.10340.14430.77390.7162
591.55571.46751.23631.69870.22740.18110.83820.7919
601.55531.4551.21051.69950.21070.20970.81760.748
611.5771.45291.19651.70920.17120.21670.73280.7328







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.0182-0.03470.00290.00242e-040.0141
510.0307-0.018e-042e-0400.0041
520.04110.03690.00310.00262e-040.0146
530.0490.06250.00520.00756e-040.0249
540.0550.02380.0020.00111e-040.0098
550.06180.03160.00260.0022e-040.013
560.06850.04460.00370.0043e-040.0182
570.07370.10030.00840.02010.00170.0409
580.07730.09760.00810.01960.00160.0404
590.08040.06010.0050.00786e-040.0255
600.08570.0690.00570.01018e-040.029
610.090.08550.00710.01540.00130.0358

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0182 & -0.0347 & 0.0029 & 0.0024 & 2e-04 & 0.0141 \tabularnewline
51 & 0.0307 & -0.01 & 8e-04 & 2e-04 & 0 & 0.0041 \tabularnewline
52 & 0.0411 & 0.0369 & 0.0031 & 0.0026 & 2e-04 & 0.0146 \tabularnewline
53 & 0.049 & 0.0625 & 0.0052 & 0.0075 & 6e-04 & 0.0249 \tabularnewline
54 & 0.055 & 0.0238 & 0.002 & 0.0011 & 1e-04 & 0.0098 \tabularnewline
55 & 0.0618 & 0.0316 & 0.0026 & 0.002 & 2e-04 & 0.013 \tabularnewline
56 & 0.0685 & 0.0446 & 0.0037 & 0.004 & 3e-04 & 0.0182 \tabularnewline
57 & 0.0737 & 0.1003 & 0.0084 & 0.0201 & 0.0017 & 0.0409 \tabularnewline
58 & 0.0773 & 0.0976 & 0.0081 & 0.0196 & 0.0016 & 0.0404 \tabularnewline
59 & 0.0804 & 0.0601 & 0.005 & 0.0078 & 6e-04 & 0.0255 \tabularnewline
60 & 0.0857 & 0.069 & 0.0057 & 0.0101 & 8e-04 & 0.029 \tabularnewline
61 & 0.09 & 0.0855 & 0.0071 & 0.0154 & 0.0013 & 0.0358 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=34256&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.0182[/C][C]-0.0347[/C][C]0.0029[/C][C]0.0024[/C][C]2e-04[/C][C]0.0141[/C][/ROW]
[ROW][C]51[/C][C]0.0307[/C][C]-0.01[/C][C]8e-04[/C][C]2e-04[/C][C]0[/C][C]0.0041[/C][/ROW]
[ROW][C]52[/C][C]0.0411[/C][C]0.0369[/C][C]0.0031[/C][C]0.0026[/C][C]2e-04[/C][C]0.0146[/C][/ROW]
[ROW][C]53[/C][C]0.049[/C][C]0.0625[/C][C]0.0052[/C][C]0.0075[/C][C]6e-04[/C][C]0.0249[/C][/ROW]
[ROW][C]54[/C][C]0.055[/C][C]0.0238[/C][C]0.002[/C][C]0.0011[/C][C]1e-04[/C][C]0.0098[/C][/ROW]
[ROW][C]55[/C][C]0.0618[/C][C]0.0316[/C][C]0.0026[/C][C]0.002[/C][C]2e-04[/C][C]0.013[/C][/ROW]
[ROW][C]56[/C][C]0.0685[/C][C]0.0446[/C][C]0.0037[/C][C]0.004[/C][C]3e-04[/C][C]0.0182[/C][/ROW]
[ROW][C]57[/C][C]0.0737[/C][C]0.1003[/C][C]0.0084[/C][C]0.0201[/C][C]0.0017[/C][C]0.0409[/C][/ROW]
[ROW][C]58[/C][C]0.0773[/C][C]0.0976[/C][C]0.0081[/C][C]0.0196[/C][C]0.0016[/C][C]0.0404[/C][/ROW]
[ROW][C]59[/C][C]0.0804[/C][C]0.0601[/C][C]0.005[/C][C]0.0078[/C][C]6e-04[/C][C]0.0255[/C][/ROW]
[ROW][C]60[/C][C]0.0857[/C][C]0.069[/C][C]0.0057[/C][C]0.0101[/C][C]8e-04[/C][C]0.029[/C][/ROW]
[ROW][C]61[/C][C]0.09[/C][C]0.0855[/C][C]0.0071[/C][C]0.0154[/C][C]0.0013[/C][C]0.0358[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=34256&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=34256&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.0182-0.03470.00290.00242e-040.0141
510.0307-0.018e-042e-0400.0041
520.04110.03690.00310.00262e-040.0146
530.0490.06250.00520.00756e-040.0249
540.0550.02380.0020.00111e-040.0098
550.06180.03160.00260.0022e-040.013
560.06850.04460.00370.0043e-040.0182
570.07370.10030.00840.02010.00170.0409
580.07730.09760.00810.01960.00160.0404
590.08040.06010.0050.00786e-040.0255
600.08570.0690.00570.01018e-040.029
610.090.08550.00710.01540.00130.0358



Parameters (Session):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 2 ; par8 = 2 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 1 ; par3 = 1 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 2 ; par8 = 2 ; par9 = 1 ; par10 = FALSE ; par11 = ; par12 = ; par13 = ; par14 = ; par15 = ; par16 = ; par17 = ; par18 = ; par19 = ; par20 = ;
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')