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, 12 Dec 2008 04:57:42 -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/12/t12290831241mczdd89ktxj1hs.htm/, Retrieved Fri, 17 May 2024 12:49:00 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=32587, Retrieved Fri, 17 May 2024 12:49:00 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact174
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Variance Reduction Matrix] [VRM - vaste rente...] [2008-12-12 10:51:08] [c5a66f1c8528a963efc2b82a8519f117]
- RM D  [Standard Deviation-Mean Plot] [SDMP inschrijving...] [2008-12-12 11:03:14] [c5a66f1c8528a963efc2b82a8519f117]
- RM      [Variance Reduction Matrix] [VRM - inschrijvin...] [2008-12-12 11:08:27] [c5a66f1c8528a963efc2b82a8519f117]
- RMP       [(Partial) Autocorrelation Function] [ACF - inschrijvin...] [2008-12-12 11:14:36] [c5a66f1c8528a963efc2b82a8519f117]
-   P         [(Partial) Autocorrelation Function] [ACF - inschrijvin...] [2008-12-12 11:32:48] [c5a66f1c8528a963efc2b82a8519f117]
-               [(Partial) Autocorrelation Function] [ACF - inschrijvin...] [2008-12-12 11:37:19] [c5a66f1c8528a963efc2b82a8519f117]
- RM              [ARIMA Backward Selection] [ARIMA backward se...] [2008-12-12 11:51:13] [c5a66f1c8528a963efc2b82a8519f117]
- RM                  [ARIMA Forecasting] [ARIMA forecasting...] [2008-12-12 11:57:42] [b4fc5040f26b33db57f84cfb8d1d2b82] [Current]
F                       [ARIMA Forecasting] [ARIMA forecasting...] [2008-12-12 12:06:55] [c5a66f1c8528a963efc2b82a8519f117]
-  MPD                    [ARIMA Forecasting] [ARIMA forecasting...] [2009-12-16 20:44:06] [37a8d600db9abe09a2528d150ccff095]
-  MPD                    [ARIMA Forecasting] [Arima forecast - ...] [2009-12-16 20:56:07] [37a8d600db9abe09a2528d150ccff095]
Feedback Forum

Post a new message
Dataseries X:
17704
15548
28029
29383
36438
32034
22679
24319
18004
17537
20366
22782
19169
13807
29743
25591
29096
26482
22405
27044
17970
18730
19684
19785
18479
10698
31956
29506
34506
27165
26736
23691
18157
17328
18205
20995
17382
9367
31124
26551
30651
25859
25100
25778
20418
18688
20424
24776
19814
12738
31566
30111
30019
31934
25826
26835
20205
17789
20520
22518
15572




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=32587&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=32587&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32587&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])
3717382-------
389367-------
3931124-------
4026551-------
4130651-------
4225859-------
4325100-------
4425778-------
4520418-------
4618688-------
4720424-------
4824776-------
4919814-------
50127389466.71358650.27510485.2481000.57610
513156631455.320921990.175262758.56110.49720.87940.50830.767
523011126833.640419827.140344506.11620.35810.29980.51250.7819
533001930977.285721778.962960475.39770.47460.5230.50860.7709
543193426134.27419475.025142327.37470.24130.31910.51330.7779
552582625367.194319080.815540068.23310.47560.19060.51420.7705
562683526052.411719433.357742079.99290.46190.5110.51340.7772
572020520635.353516451.241828492.3370.45730.0610.52160.5812
581778918886.937315386.744524995.90050.36230.33620.52540.3831
592052020641.417416454.842328505.07480.48790.76140.52160.5817
602251825039.745218909.937139142.33070.3630.73510.51460.7662
611557220024.923816085.595127232.5420.1130.24890.52290.5229

\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 & 17382 & - & - & - & - & - & - & - \tabularnewline
38 & 9367 & - & - & - & - & - & - & - \tabularnewline
39 & 31124 & - & - & - & - & - & - & - \tabularnewline
40 & 26551 & - & - & - & - & - & - & - \tabularnewline
41 & 30651 & - & - & - & - & - & - & - \tabularnewline
42 & 25859 & - & - & - & - & - & - & - \tabularnewline
43 & 25100 & - & - & - & - & - & - & - \tabularnewline
44 & 25778 & - & - & - & - & - & - & - \tabularnewline
45 & 20418 & - & - & - & - & - & - & - \tabularnewline
46 & 18688 & - & - & - & - & - & - & - \tabularnewline
47 & 20424 & - & - & - & - & - & - & - \tabularnewline
48 & 24776 & - & - & - & - & - & - & - \tabularnewline
49 & 19814 & - & - & - & - & - & - & - \tabularnewline
50 & 12738 & 9466.7135 & 8650.275 & 10485.2481 & 0 & 0 & 0.5761 & 0 \tabularnewline
51 & 31566 & 31455.3209 & 21990.1752 & 62758.5611 & 0.4972 & 0.8794 & 0.5083 & 0.767 \tabularnewline
52 & 30111 & 26833.6404 & 19827.1403 & 44506.1162 & 0.3581 & 0.2998 & 0.5125 & 0.7819 \tabularnewline
53 & 30019 & 30977.2857 & 21778.9629 & 60475.3977 & 0.4746 & 0.523 & 0.5086 & 0.7709 \tabularnewline
54 & 31934 & 26134.274 & 19475.0251 & 42327.3747 & 0.2413 & 0.3191 & 0.5133 & 0.7779 \tabularnewline
55 & 25826 & 25367.1943 & 19080.8155 & 40068.2331 & 0.4756 & 0.1906 & 0.5142 & 0.7705 \tabularnewline
56 & 26835 & 26052.4117 & 19433.3577 & 42079.9929 & 0.4619 & 0.511 & 0.5134 & 0.7772 \tabularnewline
57 & 20205 & 20635.3535 & 16451.2418 & 28492.337 & 0.4573 & 0.061 & 0.5216 & 0.5812 \tabularnewline
58 & 17789 & 18886.9373 & 15386.7445 & 24995.9005 & 0.3623 & 0.3362 & 0.5254 & 0.3831 \tabularnewline
59 & 20520 & 20641.4174 & 16454.8423 & 28505.0748 & 0.4879 & 0.7614 & 0.5216 & 0.5817 \tabularnewline
60 & 22518 & 25039.7452 & 18909.9371 & 39142.3307 & 0.363 & 0.7351 & 0.5146 & 0.7662 \tabularnewline
61 & 15572 & 20024.9238 & 16085.5951 & 27232.542 & 0.113 & 0.2489 & 0.5229 & 0.5229 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32587&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]17382[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]9367[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]31124[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]26551[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]30651[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]25859[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]25100[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]25778[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]20418[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]18688[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]20424[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]24776[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]19814[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]12738[/C][C]9466.7135[/C][C]8650.275[/C][C]10485.2481[/C][C]0[/C][C]0[/C][C]0.5761[/C][C]0[/C][/ROW]
[ROW][C]51[/C][C]31566[/C][C]31455.3209[/C][C]21990.1752[/C][C]62758.5611[/C][C]0.4972[/C][C]0.8794[/C][C]0.5083[/C][C]0.767[/C][/ROW]
[ROW][C]52[/C][C]30111[/C][C]26833.6404[/C][C]19827.1403[/C][C]44506.1162[/C][C]0.3581[/C][C]0.2998[/C][C]0.5125[/C][C]0.7819[/C][/ROW]
[ROW][C]53[/C][C]30019[/C][C]30977.2857[/C][C]21778.9629[/C][C]60475.3977[/C][C]0.4746[/C][C]0.523[/C][C]0.5086[/C][C]0.7709[/C][/ROW]
[ROW][C]54[/C][C]31934[/C][C]26134.274[/C][C]19475.0251[/C][C]42327.3747[/C][C]0.2413[/C][C]0.3191[/C][C]0.5133[/C][C]0.7779[/C][/ROW]
[ROW][C]55[/C][C]25826[/C][C]25367.1943[/C][C]19080.8155[/C][C]40068.2331[/C][C]0.4756[/C][C]0.1906[/C][C]0.5142[/C][C]0.7705[/C][/ROW]
[ROW][C]56[/C][C]26835[/C][C]26052.4117[/C][C]19433.3577[/C][C]42079.9929[/C][C]0.4619[/C][C]0.511[/C][C]0.5134[/C][C]0.7772[/C][/ROW]
[ROW][C]57[/C][C]20205[/C][C]20635.3535[/C][C]16451.2418[/C][C]28492.337[/C][C]0.4573[/C][C]0.061[/C][C]0.5216[/C][C]0.5812[/C][/ROW]
[ROW][C]58[/C][C]17789[/C][C]18886.9373[/C][C]15386.7445[/C][C]24995.9005[/C][C]0.3623[/C][C]0.3362[/C][C]0.5254[/C][C]0.3831[/C][/ROW]
[ROW][C]59[/C][C]20520[/C][C]20641.4174[/C][C]16454.8423[/C][C]28505.0748[/C][C]0.4879[/C][C]0.7614[/C][C]0.5216[/C][C]0.5817[/C][/ROW]
[ROW][C]60[/C][C]22518[/C][C]25039.7452[/C][C]18909.9371[/C][C]39142.3307[/C][C]0.363[/C][C]0.7351[/C][C]0.5146[/C][C]0.7662[/C][/ROW]
[ROW][C]61[/C][C]15572[/C][C]20024.9238[/C][C]16085.5951[/C][C]27232.542[/C][C]0.113[/C][C]0.2489[/C][C]0.5229[/C][C]0.5229[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32587&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32587&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])
3717382-------
389367-------
3931124-------
4026551-------
4130651-------
4225859-------
4325100-------
4425778-------
4520418-------
4618688-------
4720424-------
4824776-------
4919814-------
50127389466.71358650.27510485.2481000.57610
513156631455.320921990.175262758.56110.49720.87940.50830.767
523011126833.640419827.140344506.11620.35810.29980.51250.7819
533001930977.285721778.962960475.39770.47460.5230.50860.7709
543193426134.27419475.025142327.37470.24130.31910.51330.7779
552582625367.194319080.815540068.23310.47560.19060.51420.7705
562683526052.411719433.357742079.99290.46190.5110.51340.7772
572020520635.353516451.241828492.3370.45730.0610.52160.5812
581778918886.937315386.744524995.90050.36230.33620.52540.3831
592052020641.417416454.842328505.07480.48790.76140.52160.5817
602251825039.745218909.937139142.33070.3630.73510.51460.7662
611557220024.923816085.595127232.5420.1130.24890.52290.5229







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.05490.34560.028810701315.4152891776.2846944.3391
510.50770.00353e-0412249.86641020.822231.9503
520.3360.12210.010210741085.7319895090.4777946.0922
530.4858-0.03090.0026918311.503776525.9586276.6333
540.31610.22190.018533636822.12022803068.511674.2367
550.29570.01810.0015210502.704717541.8921132.4458
560.31390.030.0025612444.445351037.0371225.9138
570.1943-0.02090.0017185204.121415433.6768124.2323
580.165-0.05810.00481205466.3278100455.5273316.9472
590.1944-0.00595e-0414742.17421228.514535.0502
600.2874-0.10070.00846359198.9603529933.2467727.9651
610.1836-0.22240.018519828530.27611652377.5231285.4484

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0549 & 0.3456 & 0.0288 & 10701315.4152 & 891776.2846 & 944.3391 \tabularnewline
51 & 0.5077 & 0.0035 & 3e-04 & 12249.8664 & 1020.8222 & 31.9503 \tabularnewline
52 & 0.336 & 0.1221 & 0.0102 & 10741085.7319 & 895090.4777 & 946.0922 \tabularnewline
53 & 0.4858 & -0.0309 & 0.0026 & 918311.5037 & 76525.9586 & 276.6333 \tabularnewline
54 & 0.3161 & 0.2219 & 0.0185 & 33636822.1202 & 2803068.51 & 1674.2367 \tabularnewline
55 & 0.2957 & 0.0181 & 0.0015 & 210502.7047 & 17541.8921 & 132.4458 \tabularnewline
56 & 0.3139 & 0.03 & 0.0025 & 612444.4453 & 51037.0371 & 225.9138 \tabularnewline
57 & 0.1943 & -0.0209 & 0.0017 & 185204.1214 & 15433.6768 & 124.2323 \tabularnewline
58 & 0.165 & -0.0581 & 0.0048 & 1205466.3278 & 100455.5273 & 316.9472 \tabularnewline
59 & 0.1944 & -0.0059 & 5e-04 & 14742.1742 & 1228.5145 & 35.0502 \tabularnewline
60 & 0.2874 & -0.1007 & 0.0084 & 6359198.9603 & 529933.2467 & 727.9651 \tabularnewline
61 & 0.1836 & -0.2224 & 0.0185 & 19828530.2761 & 1652377.523 & 1285.4484 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=32587&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.0549[/C][C]0.3456[/C][C]0.0288[/C][C]10701315.4152[/C][C]891776.2846[/C][C]944.3391[/C][/ROW]
[ROW][C]51[/C][C]0.5077[/C][C]0.0035[/C][C]3e-04[/C][C]12249.8664[/C][C]1020.8222[/C][C]31.9503[/C][/ROW]
[ROW][C]52[/C][C]0.336[/C][C]0.1221[/C][C]0.0102[/C][C]10741085.7319[/C][C]895090.4777[/C][C]946.0922[/C][/ROW]
[ROW][C]53[/C][C]0.4858[/C][C]-0.0309[/C][C]0.0026[/C][C]918311.5037[/C][C]76525.9586[/C][C]276.6333[/C][/ROW]
[ROW][C]54[/C][C]0.3161[/C][C]0.2219[/C][C]0.0185[/C][C]33636822.1202[/C][C]2803068.51[/C][C]1674.2367[/C][/ROW]
[ROW][C]55[/C][C]0.2957[/C][C]0.0181[/C][C]0.0015[/C][C]210502.7047[/C][C]17541.8921[/C][C]132.4458[/C][/ROW]
[ROW][C]56[/C][C]0.3139[/C][C]0.03[/C][C]0.0025[/C][C]612444.4453[/C][C]51037.0371[/C][C]225.9138[/C][/ROW]
[ROW][C]57[/C][C]0.1943[/C][C]-0.0209[/C][C]0.0017[/C][C]185204.1214[/C][C]15433.6768[/C][C]124.2323[/C][/ROW]
[ROW][C]58[/C][C]0.165[/C][C]-0.0581[/C][C]0.0048[/C][C]1205466.3278[/C][C]100455.5273[/C][C]316.9472[/C][/ROW]
[ROW][C]59[/C][C]0.1944[/C][C]-0.0059[/C][C]5e-04[/C][C]14742.1742[/C][C]1228.5145[/C][C]35.0502[/C][/ROW]
[ROW][C]60[/C][C]0.2874[/C][C]-0.1007[/C][C]0.0084[/C][C]6359198.9603[/C][C]529933.2467[/C][C]727.9651[/C][/ROW]
[ROW][C]61[/C][C]0.1836[/C][C]-0.2224[/C][C]0.0185[/C][C]19828530.2761[/C][C]1652377.523[/C][C]1285.4484[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=32587&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=32587&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.05490.34560.028810701315.4152891776.2846944.3391
510.50770.00353e-0412249.86641020.822231.9503
520.3360.12210.010210741085.7319895090.4777946.0922
530.4858-0.03090.0026918311.503776525.9586276.6333
540.31610.22190.018533636822.12022803068.511674.2367
550.29570.01810.0015210502.704717541.8921132.4458
560.31390.030.0025612444.445351037.0371225.9138
570.1943-0.02090.0017185204.121415433.6768124.2323
580.165-0.05810.00481205466.3278100455.5273316.9472
590.1944-0.00595e-0414742.17421228.514535.0502
600.2874-0.10070.00846359198.9603529933.2467727.9651
610.1836-0.22240.018519828530.27611652377.5231285.4484



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