Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 31 Dec 2009 04:41:51 -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/2009/Dec/31/t1262259784hitmkakrhw4ie7z.htm/, Retrieved Thu, 02 May 2024 05:23:13 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=71451, Retrieved Thu, 02 May 2024 05:23:13 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact141
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Data Series] [data set] [2008-12-01 19:54:57] [b98453cac15ba1066b407e146608df68]
- RMP   [ARIMA Backward Selection] [] [2009-11-27 14:53:14] [b98453cac15ba1066b407e146608df68]
-   PD    [ARIMA Backward Selection] [Workshop 9 - Arim...] [2009-12-03 16:04:59] [1646a2766cb8c4a6f9d3b2fffef409b3]
- RMPD        [ARIMA Forecasting] [Paper ARIMA forec...] [2009-12-31 11:41:51] [3ebad5d90a5c8606f133189c73066208] [Current]
Feedback Forum

Post a new message
Dataseries X:
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
1,4975
1,4369
1,3322
1,2732
1,3449
1,3239
1,2785
1,305
1,319
1,365
1,4016
1,4088
1,4268
1,4562
1,4816
1,4914




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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 & 2 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=71451&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]2 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=71451&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=71451&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 time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135







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.4684-------
381.457-------
391.4718-------
401.4748-------
411.5527-------
421.575-------
431.5557-------
441.5553-------
451.577-------
461.4975-------
471.4369-------
481.3322-------
491.2732-------
501.34491.24971.1891.31050.00110.224500.2245
511.32391.24041.13591.34480.05850.024900.269
521.27851.23671.09581.37760.28030.11255e-040.3056
531.3051.23521.06331.4070.21290.31071e-040.3323
541.3191.23461.03581.43340.20260.24384e-040.3517
551.3651.23441.01161.45710.12520.22820.00230.3663
561.40161.23430.98981.47880.08990.14730.0050.3775
571.40881.23420.96981.49870.09790.10740.00550.3864
581.42681.23420.95121.51730.09120.11340.03420.3936
591.45621.23420.93371.53470.07380.10450.09310.3996
601.48161.23420.91721.55120.06310.08490.27230.4048
611.49141.23420.90151.56690.06490.07250.40920.4092

\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.4684 & - & - & - & - & - & - & - \tabularnewline
38 & 1.457 & - & - & - & - & - & - & - \tabularnewline
39 & 1.4718 & - & - & - & - & - & - & - \tabularnewline
40 & 1.4748 & - & - & - & - & - & - & - \tabularnewline
41 & 1.5527 & - & - & - & - & - & - & - \tabularnewline
42 & 1.575 & - & - & - & - & - & - & - \tabularnewline
43 & 1.5557 & - & - & - & - & - & - & - \tabularnewline
44 & 1.5553 & - & - & - & - & - & - & - \tabularnewline
45 & 1.577 & - & - & - & - & - & - & - \tabularnewline
46 & 1.4975 & - & - & - & - & - & - & - \tabularnewline
47 & 1.4369 & - & - & - & - & - & - & - \tabularnewline
48 & 1.3322 & - & - & - & - & - & - & - \tabularnewline
49 & 1.2732 & - & - & - & - & - & - & - \tabularnewline
50 & 1.3449 & 1.2497 & 1.189 & 1.3105 & 0.0011 & 0.2245 & 0 & 0.2245 \tabularnewline
51 & 1.3239 & 1.2404 & 1.1359 & 1.3448 & 0.0585 & 0.0249 & 0 & 0.269 \tabularnewline
52 & 1.2785 & 1.2367 & 1.0958 & 1.3776 & 0.2803 & 0.1125 & 5e-04 & 0.3056 \tabularnewline
53 & 1.305 & 1.2352 & 1.0633 & 1.407 & 0.2129 & 0.3107 & 1e-04 & 0.3323 \tabularnewline
54 & 1.319 & 1.2346 & 1.0358 & 1.4334 & 0.2026 & 0.2438 & 4e-04 & 0.3517 \tabularnewline
55 & 1.365 & 1.2344 & 1.0116 & 1.4571 & 0.1252 & 0.2282 & 0.0023 & 0.3663 \tabularnewline
56 & 1.4016 & 1.2343 & 0.9898 & 1.4788 & 0.0899 & 0.1473 & 0.005 & 0.3775 \tabularnewline
57 & 1.4088 & 1.2342 & 0.9698 & 1.4987 & 0.0979 & 0.1074 & 0.0055 & 0.3864 \tabularnewline
58 & 1.4268 & 1.2342 & 0.9512 & 1.5173 & 0.0912 & 0.1134 & 0.0342 & 0.3936 \tabularnewline
59 & 1.4562 & 1.2342 & 0.9337 & 1.5347 & 0.0738 & 0.1045 & 0.0931 & 0.3996 \tabularnewline
60 & 1.4816 & 1.2342 & 0.9172 & 1.5512 & 0.0631 & 0.0849 & 0.2723 & 0.4048 \tabularnewline
61 & 1.4914 & 1.2342 & 0.9015 & 1.5669 & 0.0649 & 0.0725 & 0.4092 & 0.4092 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=71451&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.4684[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]1.457[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]1.4718[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]1.4748[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]1.5527[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]1.575[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]1.5557[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]1.5553[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]1.577[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]1.4975[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]1.4369[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]1.3322[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]1.2732[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]1.3449[/C][C]1.2497[/C][C]1.189[/C][C]1.3105[/C][C]0.0011[/C][C]0.2245[/C][C]0[/C][C]0.2245[/C][/ROW]
[ROW][C]51[/C][C]1.3239[/C][C]1.2404[/C][C]1.1359[/C][C]1.3448[/C][C]0.0585[/C][C]0.0249[/C][C]0[/C][C]0.269[/C][/ROW]
[ROW][C]52[/C][C]1.2785[/C][C]1.2367[/C][C]1.0958[/C][C]1.3776[/C][C]0.2803[/C][C]0.1125[/C][C]5e-04[/C][C]0.3056[/C][/ROW]
[ROW][C]53[/C][C]1.305[/C][C]1.2352[/C][C]1.0633[/C][C]1.407[/C][C]0.2129[/C][C]0.3107[/C][C]1e-04[/C][C]0.3323[/C][/ROW]
[ROW][C]54[/C][C]1.319[/C][C]1.2346[/C][C]1.0358[/C][C]1.4334[/C][C]0.2026[/C][C]0.2438[/C][C]4e-04[/C][C]0.3517[/C][/ROW]
[ROW][C]55[/C][C]1.365[/C][C]1.2344[/C][C]1.0116[/C][C]1.4571[/C][C]0.1252[/C][C]0.2282[/C][C]0.0023[/C][C]0.3663[/C][/ROW]
[ROW][C]56[/C][C]1.4016[/C][C]1.2343[/C][C]0.9898[/C][C]1.4788[/C][C]0.0899[/C][C]0.1473[/C][C]0.005[/C][C]0.3775[/C][/ROW]
[ROW][C]57[/C][C]1.4088[/C][C]1.2342[/C][C]0.9698[/C][C]1.4987[/C][C]0.0979[/C][C]0.1074[/C][C]0.0055[/C][C]0.3864[/C][/ROW]
[ROW][C]58[/C][C]1.4268[/C][C]1.2342[/C][C]0.9512[/C][C]1.5173[/C][C]0.0912[/C][C]0.1134[/C][C]0.0342[/C][C]0.3936[/C][/ROW]
[ROW][C]59[/C][C]1.4562[/C][C]1.2342[/C][C]0.9337[/C][C]1.5347[/C][C]0.0738[/C][C]0.1045[/C][C]0.0931[/C][C]0.3996[/C][/ROW]
[ROW][C]60[/C][C]1.4816[/C][C]1.2342[/C][C]0.9172[/C][C]1.5512[/C][C]0.0631[/C][C]0.0849[/C][C]0.2723[/C][C]0.4048[/C][/ROW]
[ROW][C]61[/C][C]1.4914[/C][C]1.2342[/C][C]0.9015[/C][C]1.5669[/C][C]0.0649[/C][C]0.0725[/C][C]0.4092[/C][C]0.4092[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=71451&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=71451&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.4684-------
381.457-------
391.4718-------
401.4748-------
411.5527-------
421.575-------
431.5557-------
441.5553-------
451.577-------
461.4975-------
471.4369-------
481.3322-------
491.2732-------
501.34491.24971.1891.31050.00110.224500.2245
511.32391.24041.13591.34480.05850.024900.269
521.27851.23671.09581.37760.28030.11255e-040.3056
531.3051.23521.06331.4070.21290.31071e-040.3323
541.3191.23461.03581.43340.20260.24384e-040.3517
551.3651.23441.01161.45710.12520.22820.00230.3663
561.40161.23430.98981.47880.08990.14730.0050.3775
571.40881.23420.96981.49870.09790.10740.00550.3864
581.42681.23420.95121.51730.09120.11340.03420.3936
591.45621.23420.93371.53470.07380.10450.09310.3996
601.48161.23420.91721.55120.06310.08490.27230.4048
611.49141.23420.90151.56690.06490.07250.40920.4092







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
500.02480.076200.009100
510.0430.06730.07170.0070.0080.0895
520.05810.03380.05910.00180.00590.077
530.0710.05650.05850.00490.00570.0753
540.08210.06840.06040.00710.0060.0772
550.09210.10580.0680.01710.00780.0884
560.10110.13560.07770.0280.01070.1034
570.10930.14140.08560.03050.01320.1147
580.1170.1560.09350.03710.01580.1258
590.12420.17990.10210.04930.01920.1384
600.1310.20040.1110.06120.0230.1516
610.13750.20840.11910.06610.02660.1631

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
50 & 0.0248 & 0.0762 & 0 & 0.0091 & 0 & 0 \tabularnewline
51 & 0.043 & 0.0673 & 0.0717 & 0.007 & 0.008 & 0.0895 \tabularnewline
52 & 0.0581 & 0.0338 & 0.0591 & 0.0018 & 0.0059 & 0.077 \tabularnewline
53 & 0.071 & 0.0565 & 0.0585 & 0.0049 & 0.0057 & 0.0753 \tabularnewline
54 & 0.0821 & 0.0684 & 0.0604 & 0.0071 & 0.006 & 0.0772 \tabularnewline
55 & 0.0921 & 0.1058 & 0.068 & 0.0171 & 0.0078 & 0.0884 \tabularnewline
56 & 0.1011 & 0.1356 & 0.0777 & 0.028 & 0.0107 & 0.1034 \tabularnewline
57 & 0.1093 & 0.1414 & 0.0856 & 0.0305 & 0.0132 & 0.1147 \tabularnewline
58 & 0.117 & 0.156 & 0.0935 & 0.0371 & 0.0158 & 0.1258 \tabularnewline
59 & 0.1242 & 0.1799 & 0.1021 & 0.0493 & 0.0192 & 0.1384 \tabularnewline
60 & 0.131 & 0.2004 & 0.111 & 0.0612 & 0.023 & 0.1516 \tabularnewline
61 & 0.1375 & 0.2084 & 0.1191 & 0.0661 & 0.0266 & 0.1631 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=71451&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.0248[/C][C]0.0762[/C][C]0[/C][C]0.0091[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]51[/C][C]0.043[/C][C]0.0673[/C][C]0.0717[/C][C]0.007[/C][C]0.008[/C][C]0.0895[/C][/ROW]
[ROW][C]52[/C][C]0.0581[/C][C]0.0338[/C][C]0.0591[/C][C]0.0018[/C][C]0.0059[/C][C]0.077[/C][/ROW]
[ROW][C]53[/C][C]0.071[/C][C]0.0565[/C][C]0.0585[/C][C]0.0049[/C][C]0.0057[/C][C]0.0753[/C][/ROW]
[ROW][C]54[/C][C]0.0821[/C][C]0.0684[/C][C]0.0604[/C][C]0.0071[/C][C]0.006[/C][C]0.0772[/C][/ROW]
[ROW][C]55[/C][C]0.0921[/C][C]0.1058[/C][C]0.068[/C][C]0.0171[/C][C]0.0078[/C][C]0.0884[/C][/ROW]
[ROW][C]56[/C][C]0.1011[/C][C]0.1356[/C][C]0.0777[/C][C]0.028[/C][C]0.0107[/C][C]0.1034[/C][/ROW]
[ROW][C]57[/C][C]0.1093[/C][C]0.1414[/C][C]0.0856[/C][C]0.0305[/C][C]0.0132[/C][C]0.1147[/C][/ROW]
[ROW][C]58[/C][C]0.117[/C][C]0.156[/C][C]0.0935[/C][C]0.0371[/C][C]0.0158[/C][C]0.1258[/C][/ROW]
[ROW][C]59[/C][C]0.1242[/C][C]0.1799[/C][C]0.1021[/C][C]0.0493[/C][C]0.0192[/C][C]0.1384[/C][/ROW]
[ROW][C]60[/C][C]0.131[/C][C]0.2004[/C][C]0.111[/C][C]0.0612[/C][C]0.023[/C][C]0.1516[/C][/ROW]
[ROW][C]61[/C][C]0.1375[/C][C]0.2084[/C][C]0.1191[/C][C]0.0661[/C][C]0.0266[/C][C]0.1631[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=71451&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=71451&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.02480.076200.009100
510.0430.06730.07170.0070.0080.0895
520.05810.03380.05910.00180.00590.077
530.0710.05650.05850.00490.00570.0753
540.08210.06840.06040.00710.0060.0772
550.09210.10580.0680.01710.00780.0884
560.10110.13560.07770.0280.01070.1034
570.10930.14140.08560.03050.01320.1147
580.1170.1560.09350.03710.01580.1258
590.12420.17990.10210.04930.01920.1384
600.1310.20040.1110.06120.0230.1516
610.13750.20840.11910.06610.02660.1631



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