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, 21 Dec 2010 18:26:12 +0000
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2010/Dec/21/t1292955850s8toen33hc9dpas.htm/, Retrieved Sun, 19 May 2024 17:01:23 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=113806, Retrieved Sun, 19 May 2024 17:01:23 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact94
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   [Standard Deviation-Mean Plot] [Unemployment] [2010-11-29 10:34:47] [b98453cac15ba1066b407e146608df68]
- RMP     [ARIMA Forecasting] [Unemployment] [2010-11-29 20:46:45] [b98453cac15ba1066b407e146608df68]
-   PD      [ARIMA Forecasting] [] [2010-12-07 09:41:46] [39e83c7b0ac936e906a817a1bb402750]
-   PD          [ARIMA Forecasting] [] [2010-12-21 18:26:12] [558c060a42ec367ec2c020fab85c25c7] [Current]
Feedback Forum

Post a new message
Dataseries X:
0.3415
0.3554
0.4035
0.435
0.4105
0.4559
0.4755
0.4918
0.5175
0.5191
0.4754
0.4531
0.469
0.4716
0.4824
0.527
0.5172
0.515
0.5245
0.53
0.4836
0.4663
0.4592
0.4553
0.4217
0.4366
0.4532
0.4743
0.4776
0.4949
0.5069
0.498
0.5213
0.5394
0.6075
0.5919
0.5758
0.5916
0.6474
0.6704
0.7553
0.7891
0.784
0.7007
0.668
0.6102
0.5238
0.4237
0.3983
0.3879
0.3733
0.394
0.3945
0.4324
0.4233
0.455
0.4344
0.4388
0.4561
0.4512




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk

\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 & 'RServer@AstonUniversity' @ vre.aston.ac.uk \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113806&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]'RServer@AstonUniversity' @ vre.aston.ac.uk[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113806&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113806&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'RServer@AstonUniversity' @ vre.aston.ac.uk







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[48])
360.5919-------
370.5758-------
380.5916-------
390.6474-------
400.6704-------
410.7553-------
420.7891-------
430.784-------
440.7007-------
450.668-------
460.6102-------
470.5238-------
480.4237-------
490.39830.380.33730.42810.2280.037500.0375
500.38790.35940.28950.44610.25940.189400.0729
510.37330.34920.2580.47260.35090.269400.1183
520.3940.34410.23560.50260.26860.35900.1624
530.39450.34150.21850.53370.29440.296200.2009
540.43240.34020.20490.56480.21050.317800.2331
550.42330.33950.19350.59560.26060.23853e-040.2597
560.4550.33920.18380.62580.21420.28260.00670.2816
570.43440.3390.17530.65550.27730.23630.02080.3
580.43880.33890.16770.68470.28560.29420.06210.3154
590.45610.33890.16090.71350.26980.30050.16670.3286
600.45120.33880.15470.7420.29240.28430.340.34

\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[48]) \tabularnewline
36 & 0.5919 & - & - & - & - & - & - & - \tabularnewline
37 & 0.5758 & - & - & - & - & - & - & - \tabularnewline
38 & 0.5916 & - & - & - & - & - & - & - \tabularnewline
39 & 0.6474 & - & - & - & - & - & - & - \tabularnewline
40 & 0.6704 & - & - & - & - & - & - & - \tabularnewline
41 & 0.7553 & - & - & - & - & - & - & - \tabularnewline
42 & 0.7891 & - & - & - & - & - & - & - \tabularnewline
43 & 0.784 & - & - & - & - & - & - & - \tabularnewline
44 & 0.7007 & - & - & - & - & - & - & - \tabularnewline
45 & 0.668 & - & - & - & - & - & - & - \tabularnewline
46 & 0.6102 & - & - & - & - & - & - & - \tabularnewline
47 & 0.5238 & - & - & - & - & - & - & - \tabularnewline
48 & 0.4237 & - & - & - & - & - & - & - \tabularnewline
49 & 0.3983 & 0.38 & 0.3373 & 0.4281 & 0.228 & 0.0375 & 0 & 0.0375 \tabularnewline
50 & 0.3879 & 0.3594 & 0.2895 & 0.4461 & 0.2594 & 0.1894 & 0 & 0.0729 \tabularnewline
51 & 0.3733 & 0.3492 & 0.258 & 0.4726 & 0.3509 & 0.2694 & 0 & 0.1183 \tabularnewline
52 & 0.394 & 0.3441 & 0.2356 & 0.5026 & 0.2686 & 0.359 & 0 & 0.1624 \tabularnewline
53 & 0.3945 & 0.3415 & 0.2185 & 0.5337 & 0.2944 & 0.2962 & 0 & 0.2009 \tabularnewline
54 & 0.4324 & 0.3402 & 0.2049 & 0.5648 & 0.2105 & 0.3178 & 0 & 0.2331 \tabularnewline
55 & 0.4233 & 0.3395 & 0.1935 & 0.5956 & 0.2606 & 0.2385 & 3e-04 & 0.2597 \tabularnewline
56 & 0.455 & 0.3392 & 0.1838 & 0.6258 & 0.2142 & 0.2826 & 0.0067 & 0.2816 \tabularnewline
57 & 0.4344 & 0.339 & 0.1753 & 0.6555 & 0.2773 & 0.2363 & 0.0208 & 0.3 \tabularnewline
58 & 0.4388 & 0.3389 & 0.1677 & 0.6847 & 0.2856 & 0.2942 & 0.0621 & 0.3154 \tabularnewline
59 & 0.4561 & 0.3389 & 0.1609 & 0.7135 & 0.2698 & 0.3005 & 0.1667 & 0.3286 \tabularnewline
60 & 0.4512 & 0.3388 & 0.1547 & 0.742 & 0.2924 & 0.2843 & 0.34 & 0.34 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113806&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[48])[/C][/ROW]
[ROW][C]36[/C][C]0.5919[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]0.5758[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]0.5916[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]0.6474[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]0.6704[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]0.7553[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]0.7891[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]0.784[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]0.7007[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]0.668[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]0.6102[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]0.5238[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]0.4237[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]0.3983[/C][C]0.38[/C][C]0.3373[/C][C]0.4281[/C][C]0.228[/C][C]0.0375[/C][C]0[/C][C]0.0375[/C][/ROW]
[ROW][C]50[/C][C]0.3879[/C][C]0.3594[/C][C]0.2895[/C][C]0.4461[/C][C]0.2594[/C][C]0.1894[/C][C]0[/C][C]0.0729[/C][/ROW]
[ROW][C]51[/C][C]0.3733[/C][C]0.3492[/C][C]0.258[/C][C]0.4726[/C][C]0.3509[/C][C]0.2694[/C][C]0[/C][C]0.1183[/C][/ROW]
[ROW][C]52[/C][C]0.394[/C][C]0.3441[/C][C]0.2356[/C][C]0.5026[/C][C]0.2686[/C][C]0.359[/C][C]0[/C][C]0.1624[/C][/ROW]
[ROW][C]53[/C][C]0.3945[/C][C]0.3415[/C][C]0.2185[/C][C]0.5337[/C][C]0.2944[/C][C]0.2962[/C][C]0[/C][C]0.2009[/C][/ROW]
[ROW][C]54[/C][C]0.4324[/C][C]0.3402[/C][C]0.2049[/C][C]0.5648[/C][C]0.2105[/C][C]0.3178[/C][C]0[/C][C]0.2331[/C][/ROW]
[ROW][C]55[/C][C]0.4233[/C][C]0.3395[/C][C]0.1935[/C][C]0.5956[/C][C]0.2606[/C][C]0.2385[/C][C]3e-04[/C][C]0.2597[/C][/ROW]
[ROW][C]56[/C][C]0.455[/C][C]0.3392[/C][C]0.1838[/C][C]0.6258[/C][C]0.2142[/C][C]0.2826[/C][C]0.0067[/C][C]0.2816[/C][/ROW]
[ROW][C]57[/C][C]0.4344[/C][C]0.339[/C][C]0.1753[/C][C]0.6555[/C][C]0.2773[/C][C]0.2363[/C][C]0.0208[/C][C]0.3[/C][/ROW]
[ROW][C]58[/C][C]0.4388[/C][C]0.3389[/C][C]0.1677[/C][C]0.6847[/C][C]0.2856[/C][C]0.2942[/C][C]0.0621[/C][C]0.3154[/C][/ROW]
[ROW][C]59[/C][C]0.4561[/C][C]0.3389[/C][C]0.1609[/C][C]0.7135[/C][C]0.2698[/C][C]0.3005[/C][C]0.1667[/C][C]0.3286[/C][/ROW]
[ROW][C]60[/C][C]0.4512[/C][C]0.3388[/C][C]0.1547[/C][C]0.742[/C][C]0.2924[/C][C]0.2843[/C][C]0.34[/C][C]0.34[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113806&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113806&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[48])
360.5919-------
370.5758-------
380.5916-------
390.6474-------
400.6704-------
410.7553-------
420.7891-------
430.784-------
440.7007-------
450.668-------
460.6102-------
470.5238-------
480.4237-------
490.39830.380.33730.42810.2280.037500.0375
500.38790.35940.28950.44610.25940.189400.0729
510.37330.34920.2580.47260.35090.269400.1183
520.3940.34410.23560.50260.26860.35900.1624
530.39450.34150.21850.53370.29440.296200.2009
540.43240.34020.20490.56480.21050.317800.2331
550.42330.33950.19350.59560.26060.23853e-040.2597
560.4550.33920.18380.62580.21420.28260.00670.2816
570.43440.3390.17530.65550.27730.23630.02080.3
580.43880.33890.16770.68470.28560.29420.06210.3154
590.45610.33890.16090.71350.26980.30050.16670.3286
600.45120.33880.15470.7420.29240.28430.340.34







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.06460.048203e-0400
500.12310.07940.06388e-046e-040.024
510.18030.0690.06556e-046e-040.024
520.2350.1450.08540.00250.00110.0325
530.28710.15520.09940.00280.00140.0375
540.33690.27110.1280.00850.00260.0509
550.38480.24680.14490.0070.00320.0568
560.43120.34150.16950.01340.00450.0671
570.47640.28150.1820.00910.0050.0708
580.52070.29480.19320.010.00550.0742
590.56420.3460.20710.01370.00630.0791
600.60710.33170.21750.01260.00680.0824

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0646 & 0.0482 & 0 & 3e-04 & 0 & 0 \tabularnewline
50 & 0.1231 & 0.0794 & 0.0638 & 8e-04 & 6e-04 & 0.024 \tabularnewline
51 & 0.1803 & 0.069 & 0.0655 & 6e-04 & 6e-04 & 0.024 \tabularnewline
52 & 0.235 & 0.145 & 0.0854 & 0.0025 & 0.0011 & 0.0325 \tabularnewline
53 & 0.2871 & 0.1552 & 0.0994 & 0.0028 & 0.0014 & 0.0375 \tabularnewline
54 & 0.3369 & 0.2711 & 0.128 & 0.0085 & 0.0026 & 0.0509 \tabularnewline
55 & 0.3848 & 0.2468 & 0.1449 & 0.007 & 0.0032 & 0.0568 \tabularnewline
56 & 0.4312 & 0.3415 & 0.1695 & 0.0134 & 0.0045 & 0.0671 \tabularnewline
57 & 0.4764 & 0.2815 & 0.182 & 0.0091 & 0.005 & 0.0708 \tabularnewline
58 & 0.5207 & 0.2948 & 0.1932 & 0.01 & 0.0055 & 0.0742 \tabularnewline
59 & 0.5642 & 0.346 & 0.2071 & 0.0137 & 0.0063 & 0.0791 \tabularnewline
60 & 0.6071 & 0.3317 & 0.2175 & 0.0126 & 0.0068 & 0.0824 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=113806&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]49[/C][C]0.0646[/C][C]0.0482[/C][C]0[/C][C]3e-04[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.1231[/C][C]0.0794[/C][C]0.0638[/C][C]8e-04[/C][C]6e-04[/C][C]0.024[/C][/ROW]
[ROW][C]51[/C][C]0.1803[/C][C]0.069[/C][C]0.0655[/C][C]6e-04[/C][C]6e-04[/C][C]0.024[/C][/ROW]
[ROW][C]52[/C][C]0.235[/C][C]0.145[/C][C]0.0854[/C][C]0.0025[/C][C]0.0011[/C][C]0.0325[/C][/ROW]
[ROW][C]53[/C][C]0.2871[/C][C]0.1552[/C][C]0.0994[/C][C]0.0028[/C][C]0.0014[/C][C]0.0375[/C][/ROW]
[ROW][C]54[/C][C]0.3369[/C][C]0.2711[/C][C]0.128[/C][C]0.0085[/C][C]0.0026[/C][C]0.0509[/C][/ROW]
[ROW][C]55[/C][C]0.3848[/C][C]0.2468[/C][C]0.1449[/C][C]0.007[/C][C]0.0032[/C][C]0.0568[/C][/ROW]
[ROW][C]56[/C][C]0.4312[/C][C]0.3415[/C][C]0.1695[/C][C]0.0134[/C][C]0.0045[/C][C]0.0671[/C][/ROW]
[ROW][C]57[/C][C]0.4764[/C][C]0.2815[/C][C]0.182[/C][C]0.0091[/C][C]0.005[/C][C]0.0708[/C][/ROW]
[ROW][C]58[/C][C]0.5207[/C][C]0.2948[/C][C]0.1932[/C][C]0.01[/C][C]0.0055[/C][C]0.0742[/C][/ROW]
[ROW][C]59[/C][C]0.5642[/C][C]0.346[/C][C]0.2071[/C][C]0.0137[/C][C]0.0063[/C][C]0.0791[/C][/ROW]
[ROW][C]60[/C][C]0.6071[/C][C]0.3317[/C][C]0.2175[/C][C]0.0126[/C][C]0.0068[/C][C]0.0824[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=113806&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=113806&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
490.06460.048203e-0400
500.12310.07940.06388e-046e-040.024
510.18030.0690.06556e-046e-040.024
520.2350.1450.08540.00250.00110.0325
530.28710.15520.09940.00280.00140.0375
540.33690.27110.1280.00850.00260.0509
550.38480.24680.14490.0070.00320.0568
560.43120.34150.16950.01340.00450.0671
570.47640.28150.1820.00910.0050.0708
580.52070.29480.19320.010.00550.0742
590.56420.3460.20710.01370.00630.0791
600.60710.33170.21750.01260.00680.0824



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