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 16:42:47 +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/t1291740120pk66rg1ds58rj5n.htm/, Retrieved Fri, 03 May 2024 19:50:24 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=106510, Retrieved Fri, 03 May 2024 19:50:24 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact108
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]
F R PD        [ARIMA Forecasting] [] [2010-12-07 16:42:47] [4dba6678eac10ee5c3460d144a14bd5c] [Current]
-   PD          [ARIMA Forecasting] [Forecast ARIMA] [2010-12-08 17:47:20] [b8e188bcc949964bed729335b3416734]
Feedback Forum
2010-12-08 17:46:54 [] [reply
De D zou gelijk moeten zijn aan 0 zie VRM test.
http://www.freestatistics.org/blog/date/2010/Dec/08/t12918303654hatckl0gtnt1vm.htm

Post a new message
Dataseries X:
5.81    
5.76
5.99    
6.12    
6.03    
6.25    
5.80    
5.67    
5.89    
5.91    
5.86    
6.07    
6.27    
6.68    
6.77    
6.71    
6.62
6.50
5.89
6.05
6.43
6.47
6.62
6.77
6.70
6.95
6.73
7.07
7.28
7.32
6.76
6.93
6.99
7.16
7.28
7.08
7.34
7.87
6.28
6.30
6.36
6.28
5.89
6.04
5.96
6.10
6.26
6.02
6.25
6.41
6.22
6.57
6.18
6.26
6.10
6.02
6.06
6.35
6.21
6.48
6.74
6.53
6.80
6.75
6.56
6.66
6.18
6.40
6.43
6.54
6.44
6.64
6.82
6.97
7.00
6.91
6.74
6.98
6.37
6.56
6.63
6.87
6.68
6.75
6.84
7.15
7.09
6.97
7.15




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106510&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[77])
656.56-------
666.66-------
676.18-------
686.4-------
696.43-------
706.54-------
716.44-------
726.64-------
736.82-------
746.97-------
757-------
766.91-------
776.74-------
786.986.89866.40747.38970.37260.73650.82940.7365
796.376.39445.77997.00890.4690.03090.75290.1351
806.566.4775.80767.14640.4040.6230.58920.2206
816.636.61145.82817.39470.48150.55120.67510.3738
826.876.72215.87247.57170.36650.58410.66280.4835
836.686.73825.82467.65170.45030.38870.73880.4984
846.756.82785.84467.8110.43840.61590.64590.5695
856.846.99115.95218.03010.38780.67540.62660.6821
867.157.17196.07748.26650.48430.72390.64120.7804
877.096.97345.82558.12130.42110.38150.48190.6549
886.977.06495.86778.26210.43830.48360.60010.7026
897.156.97095.72518.21670.38910.50060.64180.6418

\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[77]) \tabularnewline
65 & 6.56 & - & - & - & - & - & - & - \tabularnewline
66 & 6.66 & - & - & - & - & - & - & - \tabularnewline
67 & 6.18 & - & - & - & - & - & - & - \tabularnewline
68 & 6.4 & - & - & - & - & - & - & - \tabularnewline
69 & 6.43 & - & - & - & - & - & - & - \tabularnewline
70 & 6.54 & - & - & - & - & - & - & - \tabularnewline
71 & 6.44 & - & - & - & - & - & - & - \tabularnewline
72 & 6.64 & - & - & - & - & - & - & - \tabularnewline
73 & 6.82 & - & - & - & - & - & - & - \tabularnewline
74 & 6.97 & - & - & - & - & - & - & - \tabularnewline
75 & 7 & - & - & - & - & - & - & - \tabularnewline
76 & 6.91 & - & - & - & - & - & - & - \tabularnewline
77 & 6.74 & - & - & - & - & - & - & - \tabularnewline
78 & 6.98 & 6.8986 & 6.4074 & 7.3897 & 0.3726 & 0.7365 & 0.8294 & 0.7365 \tabularnewline
79 & 6.37 & 6.3944 & 5.7799 & 7.0089 & 0.469 & 0.0309 & 0.7529 & 0.1351 \tabularnewline
80 & 6.56 & 6.477 & 5.8076 & 7.1464 & 0.404 & 0.623 & 0.5892 & 0.2206 \tabularnewline
81 & 6.63 & 6.6114 & 5.8281 & 7.3947 & 0.4815 & 0.5512 & 0.6751 & 0.3738 \tabularnewline
82 & 6.87 & 6.7221 & 5.8724 & 7.5717 & 0.3665 & 0.5841 & 0.6628 & 0.4835 \tabularnewline
83 & 6.68 & 6.7382 & 5.8246 & 7.6517 & 0.4503 & 0.3887 & 0.7388 & 0.4984 \tabularnewline
84 & 6.75 & 6.8278 & 5.8446 & 7.811 & 0.4384 & 0.6159 & 0.6459 & 0.5695 \tabularnewline
85 & 6.84 & 6.9911 & 5.9521 & 8.0301 & 0.3878 & 0.6754 & 0.6266 & 0.6821 \tabularnewline
86 & 7.15 & 7.1719 & 6.0774 & 8.2665 & 0.4843 & 0.7239 & 0.6412 & 0.7804 \tabularnewline
87 & 7.09 & 6.9734 & 5.8255 & 8.1213 & 0.4211 & 0.3815 & 0.4819 & 0.6549 \tabularnewline
88 & 6.97 & 7.0649 & 5.8677 & 8.2621 & 0.4383 & 0.4836 & 0.6001 & 0.7026 \tabularnewline
89 & 7.15 & 6.9709 & 5.7251 & 8.2167 & 0.3891 & 0.5006 & 0.6418 & 0.6418 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106510&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[77])[/C][/ROW]
[ROW][C]65[/C][C]6.56[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]6.66[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]6.18[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]6.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]6.43[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]6.54[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]71[/C][C]6.44[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]72[/C][C]6.64[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]6.82[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]6.97[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]6.91[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]6.74[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]6.98[/C][C]6.8986[/C][C]6.4074[/C][C]7.3897[/C][C]0.3726[/C][C]0.7365[/C][C]0.8294[/C][C]0.7365[/C][/ROW]
[ROW][C]79[/C][C]6.37[/C][C]6.3944[/C][C]5.7799[/C][C]7.0089[/C][C]0.469[/C][C]0.0309[/C][C]0.7529[/C][C]0.1351[/C][/ROW]
[ROW][C]80[/C][C]6.56[/C][C]6.477[/C][C]5.8076[/C][C]7.1464[/C][C]0.404[/C][C]0.623[/C][C]0.5892[/C][C]0.2206[/C][/ROW]
[ROW][C]81[/C][C]6.63[/C][C]6.6114[/C][C]5.8281[/C][C]7.3947[/C][C]0.4815[/C][C]0.5512[/C][C]0.6751[/C][C]0.3738[/C][/ROW]
[ROW][C]82[/C][C]6.87[/C][C]6.7221[/C][C]5.8724[/C][C]7.5717[/C][C]0.3665[/C][C]0.5841[/C][C]0.6628[/C][C]0.4835[/C][/ROW]
[ROW][C]83[/C][C]6.68[/C][C]6.7382[/C][C]5.8246[/C][C]7.6517[/C][C]0.4503[/C][C]0.3887[/C][C]0.7388[/C][C]0.4984[/C][/ROW]
[ROW][C]84[/C][C]6.75[/C][C]6.8278[/C][C]5.8446[/C][C]7.811[/C][C]0.4384[/C][C]0.6159[/C][C]0.6459[/C][C]0.5695[/C][/ROW]
[ROW][C]85[/C][C]6.84[/C][C]6.9911[/C][C]5.9521[/C][C]8.0301[/C][C]0.3878[/C][C]0.6754[/C][C]0.6266[/C][C]0.6821[/C][/ROW]
[ROW][C]86[/C][C]7.15[/C][C]7.1719[/C][C]6.0774[/C][C]8.2665[/C][C]0.4843[/C][C]0.7239[/C][C]0.6412[/C][C]0.7804[/C][/ROW]
[ROW][C]87[/C][C]7.09[/C][C]6.9734[/C][C]5.8255[/C][C]8.1213[/C][C]0.4211[/C][C]0.3815[/C][C]0.4819[/C][C]0.6549[/C][/ROW]
[ROW][C]88[/C][C]6.97[/C][C]7.0649[/C][C]5.8677[/C][C]8.2621[/C][C]0.4383[/C][C]0.4836[/C][C]0.6001[/C][C]0.7026[/C][/ROW]
[ROW][C]89[/C][C]7.15[/C][C]6.9709[/C][C]5.7251[/C][C]8.2167[/C][C]0.3891[/C][C]0.5006[/C][C]0.6418[/C][C]0.6418[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106510&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106510&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[77])
656.56-------
666.66-------
676.18-------
686.4-------
696.43-------
706.54-------
716.44-------
726.64-------
736.82-------
746.97-------
757-------
766.91-------
776.74-------
786.986.89866.40747.38970.37260.73650.82940.7365
796.376.39445.77997.00890.4690.03090.75290.1351
806.566.4775.80767.14640.4040.6230.58920.2206
816.636.61145.82817.39470.48150.55120.67510.3738
826.876.72215.87247.57170.36650.58410.66280.4835
836.686.73825.82467.65170.45030.38870.73880.4984
846.756.82785.84467.8110.43840.61590.64590.5695
856.846.99115.95218.03010.38780.67540.62660.6821
867.157.17196.07748.26650.48430.72390.64120.7804
877.096.97345.82558.12130.42110.38150.48190.6549
886.977.06495.86778.26210.43830.48360.60010.7026
897.156.97095.72518.21670.38910.50060.64180.6418







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
780.03630.011800.006600
790.049-0.00380.00786e-040.00360.0601
800.05270.01280.00950.00690.00470.0686
810.06040.00280.00783e-040.00360.0601
820.06450.0220.01060.02190.00730.0853
830.0692-0.00860.01030.00340.00660.0814
840.0735-0.01140.01050.00610.00650.0809
850.0758-0.02160.01190.02280.00860.0926
860.0779-0.00310.01095e-040.00770.0876
870.0840.01670.01150.01360.00830.0909
880.0865-0.01340.01160.0090.00830.0913
890.09120.02570.01280.03210.01030.1016

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
78 & 0.0363 & 0.0118 & 0 & 0.0066 & 0 & 0 \tabularnewline
79 & 0.049 & -0.0038 & 0.0078 & 6e-04 & 0.0036 & 0.0601 \tabularnewline
80 & 0.0527 & 0.0128 & 0.0095 & 0.0069 & 0.0047 & 0.0686 \tabularnewline
81 & 0.0604 & 0.0028 & 0.0078 & 3e-04 & 0.0036 & 0.0601 \tabularnewline
82 & 0.0645 & 0.022 & 0.0106 & 0.0219 & 0.0073 & 0.0853 \tabularnewline
83 & 0.0692 & -0.0086 & 0.0103 & 0.0034 & 0.0066 & 0.0814 \tabularnewline
84 & 0.0735 & -0.0114 & 0.0105 & 0.0061 & 0.0065 & 0.0809 \tabularnewline
85 & 0.0758 & -0.0216 & 0.0119 & 0.0228 & 0.0086 & 0.0926 \tabularnewline
86 & 0.0779 & -0.0031 & 0.0109 & 5e-04 & 0.0077 & 0.0876 \tabularnewline
87 & 0.084 & 0.0167 & 0.0115 & 0.0136 & 0.0083 & 0.0909 \tabularnewline
88 & 0.0865 & -0.0134 & 0.0116 & 0.009 & 0.0083 & 0.0913 \tabularnewline
89 & 0.0912 & 0.0257 & 0.0128 & 0.0321 & 0.0103 & 0.1016 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=106510&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]78[/C][C]0.0363[/C][C]0.0118[/C][C]0[/C][C]0.0066[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]79[/C][C]0.049[/C][C]-0.0038[/C][C]0.0078[/C][C]6e-04[/C][C]0.0036[/C][C]0.0601[/C][/ROW]
[ROW][C]80[/C][C]0.0527[/C][C]0.0128[/C][C]0.0095[/C][C]0.0069[/C][C]0.0047[/C][C]0.0686[/C][/ROW]
[ROW][C]81[/C][C]0.0604[/C][C]0.0028[/C][C]0.0078[/C][C]3e-04[/C][C]0.0036[/C][C]0.0601[/C][/ROW]
[ROW][C]82[/C][C]0.0645[/C][C]0.022[/C][C]0.0106[/C][C]0.0219[/C][C]0.0073[/C][C]0.0853[/C][/ROW]
[ROW][C]83[/C][C]0.0692[/C][C]-0.0086[/C][C]0.0103[/C][C]0.0034[/C][C]0.0066[/C][C]0.0814[/C][/ROW]
[ROW][C]84[/C][C]0.0735[/C][C]-0.0114[/C][C]0.0105[/C][C]0.0061[/C][C]0.0065[/C][C]0.0809[/C][/ROW]
[ROW][C]85[/C][C]0.0758[/C][C]-0.0216[/C][C]0.0119[/C][C]0.0228[/C][C]0.0086[/C][C]0.0926[/C][/ROW]
[ROW][C]86[/C][C]0.0779[/C][C]-0.0031[/C][C]0.0109[/C][C]5e-04[/C][C]0.0077[/C][C]0.0876[/C][/ROW]
[ROW][C]87[/C][C]0.084[/C][C]0.0167[/C][C]0.0115[/C][C]0.0136[/C][C]0.0083[/C][C]0.0909[/C][/ROW]
[ROW][C]88[/C][C]0.0865[/C][C]-0.0134[/C][C]0.0116[/C][C]0.009[/C][C]0.0083[/C][C]0.0913[/C][/ROW]
[ROW][C]89[/C][C]0.0912[/C][C]0.0257[/C][C]0.0128[/C][C]0.0321[/C][C]0.0103[/C][C]0.1016[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=106510&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=106510&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
780.03630.011800.006600
790.049-0.00380.00786e-040.00360.0601
800.05270.01280.00950.00690.00470.0686
810.06040.00280.00783e-040.00360.0601
820.06450.0220.01060.02190.00730.0853
830.0692-0.00860.01030.00340.00660.0814
840.0735-0.01140.01050.00610.00650.0809
850.0758-0.02160.01190.02280.00860.0926
860.0779-0.00310.01095e-040.00770.0876
870.0840.01670.01150.01360.00830.0909
880.0865-0.01340.01160.0090.00830.0913
890.09120.02570.01280.03210.01030.1016



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