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, 07 Dec 2010 14:50:04 +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/07/t12917332890o3fcmpu30sk9lc.htm/, Retrieved Fri, 03 May 2024 16:58:01 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=106374, Retrieved Fri, 03 May 2024 16:58:01 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact147
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] [WS9 ARiMA Forcast] [2010-12-07 14:50:04] [67e3c2d70de1dbb070b545ca6c893d5e] [Current]
Feedback Forum

Post a new message
Dataseries X:
562.325 
560.854 
555.332 
543.599 
536.662 
542.722 
593.530 
610.763 
612.613 
611.324 
594.167 
595.454 
590.865 
589.379 
584.428 
573.100 
567.456 
569.028 
620.735 
628.884 
628.232 
612.117 
595.404 
597.141 
593.408 
590.072 
579.799 
574.205 
572.775 
572.942 
619.567 
625.809 
619.916 
587.625 
565.742 
557.274 
560.576 
548.854 
531.673 
525.919 
511.038 
498.662 
555.362 
564.591 
541.657 
527.070 
509.846 
514.258 
516.922 
507.561 
492.622 
490.243 
469.357 
477.580 
528.379 
533.590 
517.945 
506.174 
501.866 
516.141 
528.222 
532.638 
536.322 
536.535 
523.597 
536.214 
586.570 
596.594 
580.523 
564.478 
557.560 
575.093 




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106374&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[60])
48514.258-------
49516.922-------
50507.561-------
51492.622-------
52490.243-------
53469.357-------
54477.58-------
55528.379-------
56533.59-------
57517.945-------
58506.174-------
59501.866-------
60516.141-------
61528.222520.549505.4945535.82440.16240.71420.67920.7142
62532.638515.2365494.4385536.46290.0540.11530.76080.4667
63536.322502.5657476.6225529.19630.00650.01340.76790.1589
64536.535500.9463468.7744534.18580.01790.01850.7360.1851
65523.597481.0017444.416519.03450.01410.00210.72580.0351
66536.214489.932448.1999533.52150.01870.0650.71070.1193
67586.57541.6799492.9147592.7450.04240.58310.69520.8365
68596.594547.3133493.8725603.49880.04280.08540.68390.8616
69580.523531.64474.899591.58220.0550.01680.67290.6938
70564.478519.8198459.9218583.38320.08420.03060.6630.5452
71557.56515.5518452.3505582.88430.11070.07720.65480.4932
72575.093530.0686462.5304602.20750.11060.22760.64740.6474

\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[60]) \tabularnewline
48 & 514.258 & - & - & - & - & - & - & - \tabularnewline
49 & 516.922 & - & - & - & - & - & - & - \tabularnewline
50 & 507.561 & - & - & - & - & - & - & - \tabularnewline
51 & 492.622 & - & - & - & - & - & - & - \tabularnewline
52 & 490.243 & - & - & - & - & - & - & - \tabularnewline
53 & 469.357 & - & - & - & - & - & - & - \tabularnewline
54 & 477.58 & - & - & - & - & - & - & - \tabularnewline
55 & 528.379 & - & - & - & - & - & - & - \tabularnewline
56 & 533.59 & - & - & - & - & - & - & - \tabularnewline
57 & 517.945 & - & - & - & - & - & - & - \tabularnewline
58 & 506.174 & - & - & - & - & - & - & - \tabularnewline
59 & 501.866 & - & - & - & - & - & - & - \tabularnewline
60 & 516.141 & - & - & - & - & - & - & - \tabularnewline
61 & 528.222 & 520.549 & 505.4945 & 535.8244 & 0.1624 & 0.7142 & 0.6792 & 0.7142 \tabularnewline
62 & 532.638 & 515.2365 & 494.4385 & 536.4629 & 0.054 & 0.1153 & 0.7608 & 0.4667 \tabularnewline
63 & 536.322 & 502.5657 & 476.6225 & 529.1963 & 0.0065 & 0.0134 & 0.7679 & 0.1589 \tabularnewline
64 & 536.535 & 500.9463 & 468.7744 & 534.1858 & 0.0179 & 0.0185 & 0.736 & 0.1851 \tabularnewline
65 & 523.597 & 481.0017 & 444.416 & 519.0345 & 0.0141 & 0.0021 & 0.7258 & 0.0351 \tabularnewline
66 & 536.214 & 489.932 & 448.1999 & 533.5215 & 0.0187 & 0.065 & 0.7107 & 0.1193 \tabularnewline
67 & 586.57 & 541.6799 & 492.9147 & 592.745 & 0.0424 & 0.5831 & 0.6952 & 0.8365 \tabularnewline
68 & 596.594 & 547.3133 & 493.8725 & 603.4988 & 0.0428 & 0.0854 & 0.6839 & 0.8616 \tabularnewline
69 & 580.523 & 531.64 & 474.899 & 591.5822 & 0.055 & 0.0168 & 0.6729 & 0.6938 \tabularnewline
70 & 564.478 & 519.8198 & 459.9218 & 583.3832 & 0.0842 & 0.0306 & 0.663 & 0.5452 \tabularnewline
71 & 557.56 & 515.5518 & 452.3505 & 582.8843 & 0.1107 & 0.0772 & 0.6548 & 0.4932 \tabularnewline
72 & 575.093 & 530.0686 & 462.5304 & 602.2075 & 0.1106 & 0.2276 & 0.6474 & 0.6474 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106374&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[60])[/C][/ROW]
[ROW][C]48[/C][C]514.258[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]516.922[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]507.561[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]492.622[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]490.243[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]469.357[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]477.58[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]528.379[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]533.59[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]517.945[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]506.174[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]501.866[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]516.141[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]528.222[/C][C]520.549[/C][C]505.4945[/C][C]535.8244[/C][C]0.1624[/C][C]0.7142[/C][C]0.6792[/C][C]0.7142[/C][/ROW]
[ROW][C]62[/C][C]532.638[/C][C]515.2365[/C][C]494.4385[/C][C]536.4629[/C][C]0.054[/C][C]0.1153[/C][C]0.7608[/C][C]0.4667[/C][/ROW]
[ROW][C]63[/C][C]536.322[/C][C]502.5657[/C][C]476.6225[/C][C]529.1963[/C][C]0.0065[/C][C]0.0134[/C][C]0.7679[/C][C]0.1589[/C][/ROW]
[ROW][C]64[/C][C]536.535[/C][C]500.9463[/C][C]468.7744[/C][C]534.1858[/C][C]0.0179[/C][C]0.0185[/C][C]0.736[/C][C]0.1851[/C][/ROW]
[ROW][C]65[/C][C]523.597[/C][C]481.0017[/C][C]444.416[/C][C]519.0345[/C][C]0.0141[/C][C]0.0021[/C][C]0.7258[/C][C]0.0351[/C][/ROW]
[ROW][C]66[/C][C]536.214[/C][C]489.932[/C][C]448.1999[/C][C]533.5215[/C][C]0.0187[/C][C]0.065[/C][C]0.7107[/C][C]0.1193[/C][/ROW]
[ROW][C]67[/C][C]586.57[/C][C]541.6799[/C][C]492.9147[/C][C]592.745[/C][C]0.0424[/C][C]0.5831[/C][C]0.6952[/C][C]0.8365[/C][/ROW]
[ROW][C]68[/C][C]596.594[/C][C]547.3133[/C][C]493.8725[/C][C]603.4988[/C][C]0.0428[/C][C]0.0854[/C][C]0.6839[/C][C]0.8616[/C][/ROW]
[ROW][C]69[/C][C]580.523[/C][C]531.64[/C][C]474.899[/C][C]591.5822[/C][C]0.055[/C][C]0.0168[/C][C]0.6729[/C][C]0.6938[/C][/ROW]
[ROW][C]70[/C][C]564.478[/C][C]519.8198[/C][C]459.9218[/C][C]583.3832[/C][C]0.0842[/C][C]0.0306[/C][C]0.663[/C][C]0.5452[/C][/ROW]
[ROW][C]71[/C][C]557.56[/C][C]515.5518[/C][C]452.3505[/C][C]582.8843[/C][C]0.1107[/C][C]0.0772[/C][C]0.6548[/C][C]0.4932[/C][/ROW]
[ROW][C]72[/C][C]575.093[/C][C]530.0686[/C][C]462.5304[/C][C]602.2075[/C][C]0.1106[/C][C]0.2276[/C][C]0.6474[/C][C]0.6474[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106374&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106374&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[60])
48514.258-------
49516.922-------
50507.561-------
51492.622-------
52490.243-------
53469.357-------
54477.58-------
55528.379-------
56533.59-------
57517.945-------
58506.174-------
59501.866-------
60516.141-------
61528.222520.549505.4945535.82440.16240.71420.67920.7142
62532.638515.2365494.4385536.46290.0540.11530.76080.4667
63536.322502.5657476.6225529.19630.00650.01340.76790.1589
64536.535500.9463468.7744534.18580.01790.01850.7360.1851
65523.597481.0017444.416519.03450.01410.00210.72580.0351
66536.214489.932448.1999533.52150.01870.0650.71070.1193
67586.57541.6799492.9147592.7450.04240.58310.69520.8365
68596.594547.3133493.8725603.49880.04280.08540.68390.8616
69580.523531.64474.899591.58220.0550.01680.67290.6938
70564.478519.8198459.9218583.38320.08420.03060.6630.5452
71557.56515.5518452.3505582.88430.11070.07720.65480.4932
72575.093530.0686462.5304602.20750.11060.22760.64740.6474







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.0150.0147058.874600
620.0210.03380.0243302.8136180.844113.4478
630.0270.06720.03861139.4908500.39322.3695
640.03390.0710.04671266.5565691.933826.3046
650.04030.08860.05511814.3554916.418130.2724
660.04540.09450.06162142.02061120.685233.4766
670.04810.08290.06472015.11661248.461135.3336
680.05240.090.06782428.58841395.97737.3628
690.05750.09190.07052389.54351506.373338.812
700.06240.08590.07211994.35581555.171639.4357
710.06660.08150.07291764.6911574.218839.6764
720.06940.08490.07392027.19811611.967140.1493

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.015 & 0.0147 & 0 & 58.8746 & 0 & 0 \tabularnewline
62 & 0.021 & 0.0338 & 0.0243 & 302.8136 & 180.8441 & 13.4478 \tabularnewline
63 & 0.027 & 0.0672 & 0.0386 & 1139.4908 & 500.393 & 22.3695 \tabularnewline
64 & 0.0339 & 0.071 & 0.0467 & 1266.5565 & 691.9338 & 26.3046 \tabularnewline
65 & 0.0403 & 0.0886 & 0.0551 & 1814.3554 & 916.4181 & 30.2724 \tabularnewline
66 & 0.0454 & 0.0945 & 0.0616 & 2142.0206 & 1120.6852 & 33.4766 \tabularnewline
67 & 0.0481 & 0.0829 & 0.0647 & 2015.1166 & 1248.4611 & 35.3336 \tabularnewline
68 & 0.0524 & 0.09 & 0.0678 & 2428.5884 & 1395.977 & 37.3628 \tabularnewline
69 & 0.0575 & 0.0919 & 0.0705 & 2389.5435 & 1506.3733 & 38.812 \tabularnewline
70 & 0.0624 & 0.0859 & 0.0721 & 1994.3558 & 1555.1716 & 39.4357 \tabularnewline
71 & 0.0666 & 0.0815 & 0.0729 & 1764.691 & 1574.2188 & 39.6764 \tabularnewline
72 & 0.0694 & 0.0849 & 0.0739 & 2027.1981 & 1611.9671 & 40.1493 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106374&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]61[/C][C]0.015[/C][C]0.0147[/C][C]0[/C][C]58.8746[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.021[/C][C]0.0338[/C][C]0.0243[/C][C]302.8136[/C][C]180.8441[/C][C]13.4478[/C][/ROW]
[ROW][C]63[/C][C]0.027[/C][C]0.0672[/C][C]0.0386[/C][C]1139.4908[/C][C]500.393[/C][C]22.3695[/C][/ROW]
[ROW][C]64[/C][C]0.0339[/C][C]0.071[/C][C]0.0467[/C][C]1266.5565[/C][C]691.9338[/C][C]26.3046[/C][/ROW]
[ROW][C]65[/C][C]0.0403[/C][C]0.0886[/C][C]0.0551[/C][C]1814.3554[/C][C]916.4181[/C][C]30.2724[/C][/ROW]
[ROW][C]66[/C][C]0.0454[/C][C]0.0945[/C][C]0.0616[/C][C]2142.0206[/C][C]1120.6852[/C][C]33.4766[/C][/ROW]
[ROW][C]67[/C][C]0.0481[/C][C]0.0829[/C][C]0.0647[/C][C]2015.1166[/C][C]1248.4611[/C][C]35.3336[/C][/ROW]
[ROW][C]68[/C][C]0.0524[/C][C]0.09[/C][C]0.0678[/C][C]2428.5884[/C][C]1395.977[/C][C]37.3628[/C][/ROW]
[ROW][C]69[/C][C]0.0575[/C][C]0.0919[/C][C]0.0705[/C][C]2389.5435[/C][C]1506.3733[/C][C]38.812[/C][/ROW]
[ROW][C]70[/C][C]0.0624[/C][C]0.0859[/C][C]0.0721[/C][C]1994.3558[/C][C]1555.1716[/C][C]39.4357[/C][/ROW]
[ROW][C]71[/C][C]0.0666[/C][C]0.0815[/C][C]0.0729[/C][C]1764.691[/C][C]1574.2188[/C][C]39.6764[/C][/ROW]
[ROW][C]72[/C][C]0.0694[/C][C]0.0849[/C][C]0.0739[/C][C]2027.1981[/C][C]1611.9671[/C][C]40.1493[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106374&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106374&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
610.0150.0147058.874600
620.0210.03380.0243302.8136180.844113.4478
630.0270.06720.03861139.4908500.39322.3695
640.03390.0710.04671266.5565691.933826.3046
650.04030.08860.05511814.3554916.418130.2724
660.04540.09450.06162142.02061120.685233.4766
670.04810.08290.06472015.11661248.461135.3336
680.05240.090.06782428.58841395.97737.3628
690.05750.09190.07052389.54351506.373338.812
700.06240.08590.07211994.35581555.171639.4357
710.06660.08150.07291764.6911574.218839.6764
720.06940.08490.07392027.19811611.967140.1493



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