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, 24 Dec 2010 17:41:29 +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/24/t1293212840017ucf2bf8nj462.htm/, Retrieved Tue, 30 Apr 2024 00:50:26 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=115250, Retrieved Tue, 30 Apr 2024 00:50:26 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact102
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [ARIMA Forecasting] [Paper: ARIMA Fore...] [2010-12-22 17:00:49] [48146708a479232c43a8f6e52fbf83b4]
-   PD    [ARIMA Forecasting] [Paper: ARIMA Fore...] [2010-12-24 17:41:29] [6f3869f9d1e39c73f93153f1f7803f84] [Current]
Feedback Forum

Post a new message
Dataseries X:
608
651
691
627
634
731
475
337
803
722
590
724
627
696
825
677
656
785
412
352
839
729
696
641
695
638
762
635
721
854
418
367
824
687
601
676
740
691
683
594
729
731
386
331
706
715
657
653
642
643
718
654
632
731
392
344
792
852
649
629
685
617
715
715
629
916
531
357
917
828
708
858
775
785
1006
789
734
906
532
387
991
841
892
782




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time6 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 & 6 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115250&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]6 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=115250&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115250&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 time6 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[72])
60629-------
61685-------
62617-------
63715-------
64715-------
65629-------
66916-------
67531-------
68357-------
69917-------
70828-------
71708-------
72858-------
73775788.4236679.6316897.21560.40450.1050.96880.105
74785737.9916627.7067848.27640.20170.25540.98420.0165
751006795.4814682.8192908.14371e-040.57230.91930.1384
76789703.8427582.3703825.3150.084700.42860.0064
77734739.7628616.9425862.5830.46340.2160.96140.0296
78906864.0019739.648988.35580.2540.97980.20620.5377
79532487.1548360.773613.53650.243400.24830
80387378.3821251.2585505.50560.44710.00890.62920
81991830.0506702.2357957.86550.006810.09120.3341
82841791.9632663.5229920.40360.22710.00120.29120.1568
83892701.4414572.6597830.22310.00190.01680.46020.0086
84782759.6901630.6245888.75570.36740.02230.06770.0677

\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[72]) \tabularnewline
60 & 629 & - & - & - & - & - & - & - \tabularnewline
61 & 685 & - & - & - & - & - & - & - \tabularnewline
62 & 617 & - & - & - & - & - & - & - \tabularnewline
63 & 715 & - & - & - & - & - & - & - \tabularnewline
64 & 715 & - & - & - & - & - & - & - \tabularnewline
65 & 629 & - & - & - & - & - & - & - \tabularnewline
66 & 916 & - & - & - & - & - & - & - \tabularnewline
67 & 531 & - & - & - & - & - & - & - \tabularnewline
68 & 357 & - & - & - & - & - & - & - \tabularnewline
69 & 917 & - & - & - & - & - & - & - \tabularnewline
70 & 828 & - & - & - & - & - & - & - \tabularnewline
71 & 708 & - & - & - & - & - & - & - \tabularnewline
72 & 858 & - & - & - & - & - & - & - \tabularnewline
73 & 775 & 788.4236 & 679.6316 & 897.2156 & 0.4045 & 0.105 & 0.9688 & 0.105 \tabularnewline
74 & 785 & 737.9916 & 627.7067 & 848.2764 & 0.2017 & 0.2554 & 0.9842 & 0.0165 \tabularnewline
75 & 1006 & 795.4814 & 682.8192 & 908.1437 & 1e-04 & 0.5723 & 0.9193 & 0.1384 \tabularnewline
76 & 789 & 703.8427 & 582.3703 & 825.315 & 0.0847 & 0 & 0.4286 & 0.0064 \tabularnewline
77 & 734 & 739.7628 & 616.9425 & 862.583 & 0.4634 & 0.216 & 0.9614 & 0.0296 \tabularnewline
78 & 906 & 864.0019 & 739.648 & 988.3558 & 0.254 & 0.9798 & 0.2062 & 0.5377 \tabularnewline
79 & 532 & 487.1548 & 360.773 & 613.5365 & 0.2434 & 0 & 0.2483 & 0 \tabularnewline
80 & 387 & 378.3821 & 251.2585 & 505.5056 & 0.4471 & 0.0089 & 0.6292 & 0 \tabularnewline
81 & 991 & 830.0506 & 702.2357 & 957.8655 & 0.0068 & 1 & 0.0912 & 0.3341 \tabularnewline
82 & 841 & 791.9632 & 663.5229 & 920.4036 & 0.2271 & 0.0012 & 0.2912 & 0.1568 \tabularnewline
83 & 892 & 701.4414 & 572.6597 & 830.2231 & 0.0019 & 0.0168 & 0.4602 & 0.0086 \tabularnewline
84 & 782 & 759.6901 & 630.6245 & 888.7557 & 0.3674 & 0.0223 & 0.0677 & 0.0677 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115250&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[72])[/C][/ROW]
[ROW][C]60[/C][C]629[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]685[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]617[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]715[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]715[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]629[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]916[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]531[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]357[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]917[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]828[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]708[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]858[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]775[/C][C]788.4236[/C][C]679.6316[/C][C]897.2156[/C][C]0.4045[/C][C]0.105[/C][C]0.9688[/C][C]0.105[/C][/ROW]
[ROW][C]74[/C][C]785[/C][C]737.9916[/C][C]627.7067[/C][C]848.2764[/C][C]0.2017[/C][C]0.2554[/C][C]0.9842[/C][C]0.0165[/C][/ROW]
[ROW][C]75[/C][C]1006[/C][C]795.4814[/C][C]682.8192[/C][C]908.1437[/C][C]1e-04[/C][C]0.5723[/C][C]0.9193[/C][C]0.1384[/C][/ROW]
[ROW][C]76[/C][C]789[/C][C]703.8427[/C][C]582.3703[/C][C]825.315[/C][C]0.0847[/C][C]0[/C][C]0.4286[/C][C]0.0064[/C][/ROW]
[ROW][C]77[/C][C]734[/C][C]739.7628[/C][C]616.9425[/C][C]862.583[/C][C]0.4634[/C][C]0.216[/C][C]0.9614[/C][C]0.0296[/C][/ROW]
[ROW][C]78[/C][C]906[/C][C]864.0019[/C][C]739.648[/C][C]988.3558[/C][C]0.254[/C][C]0.9798[/C][C]0.2062[/C][C]0.5377[/C][/ROW]
[ROW][C]79[/C][C]532[/C][C]487.1548[/C][C]360.773[/C][C]613.5365[/C][C]0.2434[/C][C]0[/C][C]0.2483[/C][C]0[/C][/ROW]
[ROW][C]80[/C][C]387[/C][C]378.3821[/C][C]251.2585[/C][C]505.5056[/C][C]0.4471[/C][C]0.0089[/C][C]0.6292[/C][C]0[/C][/ROW]
[ROW][C]81[/C][C]991[/C][C]830.0506[/C][C]702.2357[/C][C]957.8655[/C][C]0.0068[/C][C]1[/C][C]0.0912[/C][C]0.3341[/C][/ROW]
[ROW][C]82[/C][C]841[/C][C]791.9632[/C][C]663.5229[/C][C]920.4036[/C][C]0.2271[/C][C]0.0012[/C][C]0.2912[/C][C]0.1568[/C][/ROW]
[ROW][C]83[/C][C]892[/C][C]701.4414[/C][C]572.6597[/C][C]830.2231[/C][C]0.0019[/C][C]0.0168[/C][C]0.4602[/C][C]0.0086[/C][/ROW]
[ROW][C]84[/C][C]782[/C][C]759.6901[/C][C]630.6245[/C][C]888.7557[/C][C]0.3674[/C][C]0.0223[/C][C]0.0677[/C][C]0.0677[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115250&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115250&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[72])
60629-------
61685-------
62617-------
63715-------
64715-------
65629-------
66916-------
67531-------
68357-------
69917-------
70828-------
71708-------
72858-------
73775788.4236679.6316897.21560.40450.1050.96880.105
74785737.9916627.7067848.27640.20170.25540.98420.0165
751006795.4814682.8192908.14371e-040.57230.91930.1384
76789703.8427582.3703825.3150.084700.42860.0064
77734739.7628616.9425862.5830.46340.2160.96140.0296
78906864.0019739.648988.35580.2540.97980.20620.5377
79532487.1548360.773613.53650.243400.24830
80387378.3821251.2585505.50560.44710.00890.62920
81991830.0506702.2357957.86550.006810.09120.3341
82841791.9632663.5229920.40360.22710.00120.29120.1568
83892701.4414572.6597830.22310.00190.01680.46020.0086
84782759.6901630.6245888.75570.36740.02230.06770.0677







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
730.0704-0.0170180.193700
740.07620.06370.04042209.79231194.99334.5687
750.07230.26460.115144318.062415569.3495124.7772
760.08810.1210.11667251.770513489.9547116.1463
770.0847-0.00780.094833.209510798.6057103.9163
780.07340.04860.08711763.84299292.811996.3992
790.13240.09210.08782011.09588252.566790.8436
800.17140.02280.079774.26877230.279585.0311
810.07860.19390.092425904.7149305.216696.4636
820.08270.06190.08932404.60588615.155592.8179
830.09370.27170.105936312.57711133.103105.5135
840.08670.02940.0995497.730610246.8219101.2266

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
73 & 0.0704 & -0.017 & 0 & 180.1937 & 0 & 0 \tabularnewline
74 & 0.0762 & 0.0637 & 0.0404 & 2209.7923 & 1194.993 & 34.5687 \tabularnewline
75 & 0.0723 & 0.2646 & 0.1151 & 44318.0624 & 15569.3495 & 124.7772 \tabularnewline
76 & 0.0881 & 0.121 & 0.1166 & 7251.7705 & 13489.9547 & 116.1463 \tabularnewline
77 & 0.0847 & -0.0078 & 0.0948 & 33.2095 & 10798.6057 & 103.9163 \tabularnewline
78 & 0.0734 & 0.0486 & 0.0871 & 1763.8429 & 9292.8119 & 96.3992 \tabularnewline
79 & 0.1324 & 0.0921 & 0.0878 & 2011.0958 & 8252.5667 & 90.8436 \tabularnewline
80 & 0.1714 & 0.0228 & 0.0797 & 74.2687 & 7230.2795 & 85.0311 \tabularnewline
81 & 0.0786 & 0.1939 & 0.0924 & 25904.714 & 9305.2166 & 96.4636 \tabularnewline
82 & 0.0827 & 0.0619 & 0.0893 & 2404.6058 & 8615.1555 & 92.8179 \tabularnewline
83 & 0.0937 & 0.2717 & 0.1059 & 36312.577 & 11133.103 & 105.5135 \tabularnewline
84 & 0.0867 & 0.0294 & 0.0995 & 497.7306 & 10246.8219 & 101.2266 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=115250&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]73[/C][C]0.0704[/C][C]-0.017[/C][C]0[/C][C]180.1937[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]74[/C][C]0.0762[/C][C]0.0637[/C][C]0.0404[/C][C]2209.7923[/C][C]1194.993[/C][C]34.5687[/C][/ROW]
[ROW][C]75[/C][C]0.0723[/C][C]0.2646[/C][C]0.1151[/C][C]44318.0624[/C][C]15569.3495[/C][C]124.7772[/C][/ROW]
[ROW][C]76[/C][C]0.0881[/C][C]0.121[/C][C]0.1166[/C][C]7251.7705[/C][C]13489.9547[/C][C]116.1463[/C][/ROW]
[ROW][C]77[/C][C]0.0847[/C][C]-0.0078[/C][C]0.0948[/C][C]33.2095[/C][C]10798.6057[/C][C]103.9163[/C][/ROW]
[ROW][C]78[/C][C]0.0734[/C][C]0.0486[/C][C]0.0871[/C][C]1763.8429[/C][C]9292.8119[/C][C]96.3992[/C][/ROW]
[ROW][C]79[/C][C]0.1324[/C][C]0.0921[/C][C]0.0878[/C][C]2011.0958[/C][C]8252.5667[/C][C]90.8436[/C][/ROW]
[ROW][C]80[/C][C]0.1714[/C][C]0.0228[/C][C]0.0797[/C][C]74.2687[/C][C]7230.2795[/C][C]85.0311[/C][/ROW]
[ROW][C]81[/C][C]0.0786[/C][C]0.1939[/C][C]0.0924[/C][C]25904.714[/C][C]9305.2166[/C][C]96.4636[/C][/ROW]
[ROW][C]82[/C][C]0.0827[/C][C]0.0619[/C][C]0.0893[/C][C]2404.6058[/C][C]8615.1555[/C][C]92.8179[/C][/ROW]
[ROW][C]83[/C][C]0.0937[/C][C]0.2717[/C][C]0.1059[/C][C]36312.577[/C][C]11133.103[/C][C]105.5135[/C][/ROW]
[ROW][C]84[/C][C]0.0867[/C][C]0.0294[/C][C]0.0995[/C][C]497.7306[/C][C]10246.8219[/C][C]101.2266[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=115250&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=115250&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
730.0704-0.0170180.193700
740.07620.06370.04042209.79231194.99334.5687
750.07230.26460.115144318.062415569.3495124.7772
760.08810.1210.11667251.770513489.9547116.1463
770.0847-0.00780.094833.209510798.6057103.9163
780.07340.04860.08711763.84299292.811996.3992
790.13240.09210.08782011.09588252.566790.8436
800.17140.02280.079774.26877230.279585.0311
810.07860.19390.092425904.7149305.216696.4636
820.08270.06190.08932404.60588615.155592.8179
830.09370.27170.105936312.57711133.103105.5135
840.08670.02940.0995497.730610246.8219101.2266



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