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, 21 Dec 2012 12:27:35 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2012/Dec/21/t1356110864eamvpe4v39yrbnl.htm/, Retrieved Fri, 26 Apr 2024 08:20:01 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=204001, Retrieved Fri, 26 Apr 2024 08:20:01 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact98
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [(Partial) Autocorrelation Function] [Workshop 9 (1)] [2012-11-29 12:44:13] [318be0e97d03618d227a3f8f0242bca0]
- RMP   [ARIMA Backward Selection] [Workshop 9 (6)] [2012-11-29 13:36:39] [318be0e97d03618d227a3f8f0242bca0]
- RMP     [ARIMA Forecasting] [Workshop 9 (8)] [2012-11-29 13:53:11] [318be0e97d03618d227a3f8f0242bca0]
- R  D      [ARIMA Forecasting] [Paper: ARIMA fore...] [2012-12-19 20:40:48] [318be0e97d03618d227a3f8f0242bca0]
- R PD          [ARIMA Forecasting] [] [2012-12-21 17:27:35] [b650a28572edc4a1d205c228043a3295] [Current]
- R               [ARIMA Forecasting] [] [2012-12-22 02:54:10] [0604709baf8ca89a71bc0fcadc3cdffd]
Feedback Forum

Post a new message
Dataseries X:
1.4761
1.4721
1.487
1.5167
1.5812
1.554
1.5508
1.5764
1.5611
1.4735
1.4303
1.2757
1.2727
1.3917
1.2816
1.2644
1.3308
1.3275
1.4098
1.4134
1.4138
1.4272
1.4643
1.48
1.5023
1.4406
1.3966
1.357
1.3479
1.3315
1.2307
1.2271
1.3028
1.268
1.3648
1.3857
1.2998
1.3362
1.3692
1.3834
1.4207
1.486
1.4385
1.4453
1.426
1.445
1.3503
1.4001
1.3418
1.2939
1.3176
1.3443
1.3356
1.3214
1.2403
1.259
1.2284
1.2611
1.293
1.2993
1.2986




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'George Udny Yule' @ yule.wessa.net

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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=204001&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 time3 seconds
R Server'George Udny Yule' @ yule.wessa.net







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.2998-------
381.3362-------
391.3692-------
401.3834-------
411.4207-------
421.486-------
431.4385-------
441.4453-------
451.426-------
461.445-------
471.3503-------
481.4001-------
491.3418-------
501.29391.33391.23781.43920.22810.44160.4830.4416
511.31761.35191.22481.49520.31930.78640.40660.5551
521.34431.35671.20661.52970.44430.6710.3810.5669
531.33561.33111.16591.52520.48210.44720.18290.4572
541.32141.32231.14231.53740.49680.45170.06780.4294
551.24031.34341.14541.5840.20040.57120.21930.5053
561.2591.33951.12881.59930.27170.7730.21240.4932
571.22841.32821.10741.6040.2390.68870.24360.4616
581.26111.33831.10411.63470.30480.76630.24030.4908
591.2931.33991.09471.65410.38490.68850.47410.4953
601.29931.33861.08351.66910.4080.60650.35760.4923
611.29861.371.0981.72690.34760.6510.56150.5615

\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.2998 & - & - & - & - & - & - & - \tabularnewline
38 & 1.3362 & - & - & - & - & - & - & - \tabularnewline
39 & 1.3692 & - & - & - & - & - & - & - \tabularnewline
40 & 1.3834 & - & - & - & - & - & - & - \tabularnewline
41 & 1.4207 & - & - & - & - & - & - & - \tabularnewline
42 & 1.486 & - & - & - & - & - & - & - \tabularnewline
43 & 1.4385 & - & - & - & - & - & - & - \tabularnewline
44 & 1.4453 & - & - & - & - & - & - & - \tabularnewline
45 & 1.426 & - & - & - & - & - & - & - \tabularnewline
46 & 1.445 & - & - & - & - & - & - & - \tabularnewline
47 & 1.3503 & - & - & - & - & - & - & - \tabularnewline
48 & 1.4001 & - & - & - & - & - & - & - \tabularnewline
49 & 1.3418 & - & - & - & - & - & - & - \tabularnewline
50 & 1.2939 & 1.3339 & 1.2378 & 1.4392 & 0.2281 & 0.4416 & 0.483 & 0.4416 \tabularnewline
51 & 1.3176 & 1.3519 & 1.2248 & 1.4952 & 0.3193 & 0.7864 & 0.4066 & 0.5551 \tabularnewline
52 & 1.3443 & 1.3567 & 1.2066 & 1.5297 & 0.4443 & 0.671 & 0.381 & 0.5669 \tabularnewline
53 & 1.3356 & 1.3311 & 1.1659 & 1.5252 & 0.4821 & 0.4472 & 0.1829 & 0.4572 \tabularnewline
54 & 1.3214 & 1.3223 & 1.1423 & 1.5374 & 0.4968 & 0.4517 & 0.0678 & 0.4294 \tabularnewline
55 & 1.2403 & 1.3434 & 1.1454 & 1.584 & 0.2004 & 0.5712 & 0.2193 & 0.5053 \tabularnewline
56 & 1.259 & 1.3395 & 1.1288 & 1.5993 & 0.2717 & 0.773 & 0.2124 & 0.4932 \tabularnewline
57 & 1.2284 & 1.3282 & 1.1074 & 1.604 & 0.239 & 0.6887 & 0.2436 & 0.4616 \tabularnewline
58 & 1.2611 & 1.3383 & 1.1041 & 1.6347 & 0.3048 & 0.7663 & 0.2403 & 0.4908 \tabularnewline
59 & 1.293 & 1.3399 & 1.0947 & 1.6541 & 0.3849 & 0.6885 & 0.4741 & 0.4953 \tabularnewline
60 & 1.2993 & 1.3386 & 1.0835 & 1.6691 & 0.408 & 0.6065 & 0.3576 & 0.4923 \tabularnewline
61 & 1.2986 & 1.37 & 1.098 & 1.7269 & 0.3476 & 0.651 & 0.5615 & 0.5615 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=204001&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.2998[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]1.3362[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]1.3692[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]1.3834[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]1.4207[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]1.486[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]1.4385[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]1.4453[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]1.426[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]1.445[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]1.3503[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]1.4001[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]1.3418[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]1.2939[/C][C]1.3339[/C][C]1.2378[/C][C]1.4392[/C][C]0.2281[/C][C]0.4416[/C][C]0.483[/C][C]0.4416[/C][/ROW]
[ROW][C]51[/C][C]1.3176[/C][C]1.3519[/C][C]1.2248[/C][C]1.4952[/C][C]0.3193[/C][C]0.7864[/C][C]0.4066[/C][C]0.5551[/C][/ROW]
[ROW][C]52[/C][C]1.3443[/C][C]1.3567[/C][C]1.2066[/C][C]1.5297[/C][C]0.4443[/C][C]0.671[/C][C]0.381[/C][C]0.5669[/C][/ROW]
[ROW][C]53[/C][C]1.3356[/C][C]1.3311[/C][C]1.1659[/C][C]1.5252[/C][C]0.4821[/C][C]0.4472[/C][C]0.1829[/C][C]0.4572[/C][/ROW]
[ROW][C]54[/C][C]1.3214[/C][C]1.3223[/C][C]1.1423[/C][C]1.5374[/C][C]0.4968[/C][C]0.4517[/C][C]0.0678[/C][C]0.4294[/C][/ROW]
[ROW][C]55[/C][C]1.2403[/C][C]1.3434[/C][C]1.1454[/C][C]1.584[/C][C]0.2004[/C][C]0.5712[/C][C]0.2193[/C][C]0.5053[/C][/ROW]
[ROW][C]56[/C][C]1.259[/C][C]1.3395[/C][C]1.1288[/C][C]1.5993[/C][C]0.2717[/C][C]0.773[/C][C]0.2124[/C][C]0.4932[/C][/ROW]
[ROW][C]57[/C][C]1.2284[/C][C]1.3282[/C][C]1.1074[/C][C]1.604[/C][C]0.239[/C][C]0.6887[/C][C]0.2436[/C][C]0.4616[/C][/ROW]
[ROW][C]58[/C][C]1.2611[/C][C]1.3383[/C][C]1.1041[/C][C]1.6347[/C][C]0.3048[/C][C]0.7663[/C][C]0.2403[/C][C]0.4908[/C][/ROW]
[ROW][C]59[/C][C]1.293[/C][C]1.3399[/C][C]1.0947[/C][C]1.6541[/C][C]0.3849[/C][C]0.6885[/C][C]0.4741[/C][C]0.4953[/C][/ROW]
[ROW][C]60[/C][C]1.2993[/C][C]1.3386[/C][C]1.0835[/C][C]1.6691[/C][C]0.408[/C][C]0.6065[/C][C]0.3576[/C][C]0.4923[/C][/ROW]
[ROW][C]61[/C][C]1.2986[/C][C]1.37[/C][C]1.098[/C][C]1.7269[/C][C]0.3476[/C][C]0.651[/C][C]0.5615[/C][C]0.5615[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=204001&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=204001&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.2998-------
381.3362-------
391.3692-------
401.3834-------
411.4207-------
421.486-------
431.4385-------
441.4453-------
451.426-------
461.445-------
471.3503-------
481.4001-------
491.3418-------
501.29391.33391.23781.43920.22810.44160.4830.4416
511.31761.35191.22481.49520.31930.78640.40660.5551
521.34431.35671.20661.52970.44430.6710.3810.5669
531.33561.33111.16591.52520.48210.44720.18290.4572
541.32141.32231.14231.53740.49680.45170.06780.4294
551.24031.34341.14541.5840.20040.57120.21930.5053
561.2591.33951.12881.59930.27170.7730.21240.4932
571.22841.32821.10741.6040.2390.68870.24360.4616
581.26111.33831.10411.63470.30480.76630.24030.4908
591.2931.33991.09471.65410.38490.68850.47410.4953
601.29931.33861.08351.66910.4080.60650.35760.4923
611.29861.371.0981.72690.34760.6510.56150.5615







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.0403-0.0300.001600
510.0541-0.02540.02770.00120.00140.0373
520.0651-0.00910.02152e-040.0010.0313
530.07440.00330.01707e-040.0272
540.083-7e-040.013706e-040.0243
550.0914-0.07680.02420.01060.00230.0476
560.0989-0.06010.02930.00650.00290.0536
570.1059-0.07520.03510.010.00380.0613
580.113-0.05770.03760.0060.0040.0632
590.1196-0.0350.03730.00220.00380.0618
600.126-0.02930.03660.00150.00360.0601
610.1329-0.05210.03790.00510.00370.0611

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0403 & -0.03 & 0 & 0.0016 & 0 & 0 \tabularnewline
51 & 0.0541 & -0.0254 & 0.0277 & 0.0012 & 0.0014 & 0.0373 \tabularnewline
52 & 0.0651 & -0.0091 & 0.0215 & 2e-04 & 0.001 & 0.0313 \tabularnewline
53 & 0.0744 & 0.0033 & 0.017 & 0 & 7e-04 & 0.0272 \tabularnewline
54 & 0.083 & -7e-04 & 0.0137 & 0 & 6e-04 & 0.0243 \tabularnewline
55 & 0.0914 & -0.0768 & 0.0242 & 0.0106 & 0.0023 & 0.0476 \tabularnewline
56 & 0.0989 & -0.0601 & 0.0293 & 0.0065 & 0.0029 & 0.0536 \tabularnewline
57 & 0.1059 & -0.0752 & 0.0351 & 0.01 & 0.0038 & 0.0613 \tabularnewline
58 & 0.113 & -0.0577 & 0.0376 & 0.006 & 0.004 & 0.0632 \tabularnewline
59 & 0.1196 & -0.035 & 0.0373 & 0.0022 & 0.0038 & 0.0618 \tabularnewline
60 & 0.126 & -0.0293 & 0.0366 & 0.0015 & 0.0036 & 0.0601 \tabularnewline
61 & 0.1329 & -0.0521 & 0.0379 & 0.0051 & 0.0037 & 0.0611 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=204001&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.0403[/C][C]-0.03[/C][C]0[/C][C]0.0016[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]51[/C][C]0.0541[/C][C]-0.0254[/C][C]0.0277[/C][C]0.0012[/C][C]0.0014[/C][C]0.0373[/C][/ROW]
[ROW][C]52[/C][C]0.0651[/C][C]-0.0091[/C][C]0.0215[/C][C]2e-04[/C][C]0.001[/C][C]0.0313[/C][/ROW]
[ROW][C]53[/C][C]0.0744[/C][C]0.0033[/C][C]0.017[/C][C]0[/C][C]7e-04[/C][C]0.0272[/C][/ROW]
[ROW][C]54[/C][C]0.083[/C][C]-7e-04[/C][C]0.0137[/C][C]0[/C][C]6e-04[/C][C]0.0243[/C][/ROW]
[ROW][C]55[/C][C]0.0914[/C][C]-0.0768[/C][C]0.0242[/C][C]0.0106[/C][C]0.0023[/C][C]0.0476[/C][/ROW]
[ROW][C]56[/C][C]0.0989[/C][C]-0.0601[/C][C]0.0293[/C][C]0.0065[/C][C]0.0029[/C][C]0.0536[/C][/ROW]
[ROW][C]57[/C][C]0.1059[/C][C]-0.0752[/C][C]0.0351[/C][C]0.01[/C][C]0.0038[/C][C]0.0613[/C][/ROW]
[ROW][C]58[/C][C]0.113[/C][C]-0.0577[/C][C]0.0376[/C][C]0.006[/C][C]0.004[/C][C]0.0632[/C][/ROW]
[ROW][C]59[/C][C]0.1196[/C][C]-0.035[/C][C]0.0373[/C][C]0.0022[/C][C]0.0038[/C][C]0.0618[/C][/ROW]
[ROW][C]60[/C][C]0.126[/C][C]-0.0293[/C][C]0.0366[/C][C]0.0015[/C][C]0.0036[/C][C]0.0601[/C][/ROW]
[ROW][C]61[/C][C]0.1329[/C][C]-0.0521[/C][C]0.0379[/C][C]0.0051[/C][C]0.0037[/C][C]0.0611[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=204001&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=204001&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.0403-0.0300.001600
510.0541-0.02540.02770.00120.00140.0373
520.0651-0.00910.02152e-040.0010.0313
530.07440.00330.01707e-040.0272
540.083-7e-040.013706e-040.0243
550.0914-0.07680.02420.01060.00230.0476
560.0989-0.06010.02930.00650.00290.0536
570.1059-0.07520.03510.010.00380.0613
580.113-0.05770.03760.0060.0040.0632
590.1196-0.0350.03730.00220.00380.0618
600.126-0.02930.03660.00150.00360.0601
610.1329-0.05210.03790.00510.00370.0611



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