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 computationWed, 08 Dec 2010 17:47:20 +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/08/t12918303654hatckl0gtnt1vm.htm/, Retrieved Fri, 03 May 2024 04:32:36 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=107036, Retrieved Fri, 03 May 2024 04:32:36 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact127
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] [7f2363d2c77d3bf71367965cc53be730]
-   PD          [ARIMA Forecasting] [Forecast ARIMA] [2010-12-08 17:47:20] [278a0539dc236556c5f30b5bc56ff9eb] [Current]
Feedback Forum

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'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=107036&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=107036&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=107036&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'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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.78596.26917.30270.23080.56910.68350.5691
796.376.65835.98717.32960.19990.17380.91870.4058
806.566.72585.9617.49050.33550.81910.79810.4855
816.636.7335.86197.60420.40830.65150.75230.4937
826.876.74255.78247.70260.39730.59080.66030.502
836.686.7285.68787.76810.4640.39450.70630.491
846.756.75945.64327.87550.49340.55540.5830.5136
856.846.79475.6087.98140.47020.52940.48340.536
867.156.86395.61068.11720.32730.51490.43410.5768
877.096.85565.5398.17220.36360.33060.41490.5683
886.976.84445.46748.22130.4290.36330.46280.559
897.156.79695.36218.23170.31480.40660.5310.531

\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.7859 & 6.2691 & 7.3027 & 0.2308 & 0.5691 & 0.6835 & 0.5691 \tabularnewline
79 & 6.37 & 6.6583 & 5.9871 & 7.3296 & 0.1999 & 0.1738 & 0.9187 & 0.4058 \tabularnewline
80 & 6.56 & 6.7258 & 5.961 & 7.4905 & 0.3355 & 0.8191 & 0.7981 & 0.4855 \tabularnewline
81 & 6.63 & 6.733 & 5.8619 & 7.6042 & 0.4083 & 0.6515 & 0.7523 & 0.4937 \tabularnewline
82 & 6.87 & 6.7425 & 5.7824 & 7.7026 & 0.3973 & 0.5908 & 0.6603 & 0.502 \tabularnewline
83 & 6.68 & 6.728 & 5.6878 & 7.7681 & 0.464 & 0.3945 & 0.7063 & 0.491 \tabularnewline
84 & 6.75 & 6.7594 & 5.6432 & 7.8755 & 0.4934 & 0.5554 & 0.583 & 0.5136 \tabularnewline
85 & 6.84 & 6.7947 & 5.608 & 7.9814 & 0.4702 & 0.5294 & 0.4834 & 0.536 \tabularnewline
86 & 7.15 & 6.8639 & 5.6106 & 8.1172 & 0.3273 & 0.5149 & 0.4341 & 0.5768 \tabularnewline
87 & 7.09 & 6.8556 & 5.539 & 8.1722 & 0.3636 & 0.3306 & 0.4149 & 0.5683 \tabularnewline
88 & 6.97 & 6.8444 & 5.4674 & 8.2213 & 0.429 & 0.3633 & 0.4628 & 0.559 \tabularnewline
89 & 7.15 & 6.7969 & 5.3621 & 8.2317 & 0.3148 & 0.4066 & 0.531 & 0.531 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=107036&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.7859[/C][C]6.2691[/C][C]7.3027[/C][C]0.2308[/C][C]0.5691[/C][C]0.6835[/C][C]0.5691[/C][/ROW]
[ROW][C]79[/C][C]6.37[/C][C]6.6583[/C][C]5.9871[/C][C]7.3296[/C][C]0.1999[/C][C]0.1738[/C][C]0.9187[/C][C]0.4058[/C][/ROW]
[ROW][C]80[/C][C]6.56[/C][C]6.7258[/C][C]5.961[/C][C]7.4905[/C][C]0.3355[/C][C]0.8191[/C][C]0.7981[/C][C]0.4855[/C][/ROW]
[ROW][C]81[/C][C]6.63[/C][C]6.733[/C][C]5.8619[/C][C]7.6042[/C][C]0.4083[/C][C]0.6515[/C][C]0.7523[/C][C]0.4937[/C][/ROW]
[ROW][C]82[/C][C]6.87[/C][C]6.7425[/C][C]5.7824[/C][C]7.7026[/C][C]0.3973[/C][C]0.5908[/C][C]0.6603[/C][C]0.502[/C][/ROW]
[ROW][C]83[/C][C]6.68[/C][C]6.728[/C][C]5.6878[/C][C]7.7681[/C][C]0.464[/C][C]0.3945[/C][C]0.7063[/C][C]0.491[/C][/ROW]
[ROW][C]84[/C][C]6.75[/C][C]6.7594[/C][C]5.6432[/C][C]7.8755[/C][C]0.4934[/C][C]0.5554[/C][C]0.583[/C][C]0.5136[/C][/ROW]
[ROW][C]85[/C][C]6.84[/C][C]6.7947[/C][C]5.608[/C][C]7.9814[/C][C]0.4702[/C][C]0.5294[/C][C]0.4834[/C][C]0.536[/C][/ROW]
[ROW][C]86[/C][C]7.15[/C][C]6.8639[/C][C]5.6106[/C][C]8.1172[/C][C]0.3273[/C][C]0.5149[/C][C]0.4341[/C][C]0.5768[/C][/ROW]
[ROW][C]87[/C][C]7.09[/C][C]6.8556[/C][C]5.539[/C][C]8.1722[/C][C]0.3636[/C][C]0.3306[/C][C]0.4149[/C][C]0.5683[/C][/ROW]
[ROW][C]88[/C][C]6.97[/C][C]6.8444[/C][C]5.4674[/C][C]8.2213[/C][C]0.429[/C][C]0.3633[/C][C]0.4628[/C][C]0.559[/C][/ROW]
[ROW][C]89[/C][C]7.15[/C][C]6.7969[/C][C]5.3621[/C][C]8.2317[/C][C]0.3148[/C][C]0.4066[/C][C]0.531[/C][C]0.531[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=107036&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=107036&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.78596.26917.30270.23080.56910.68350.5691
796.376.65835.98717.32960.19990.17380.91870.4058
806.566.72585.9617.49050.33550.81910.79810.4855
816.636.7335.86197.60420.40830.65150.75230.4937
826.876.74255.78247.70260.39730.59080.66030.502
836.686.7285.68787.76810.4640.39450.70630.491
846.756.75945.64327.87550.49340.55540.5830.5136
856.846.79475.6087.98140.47020.52940.48340.536
867.156.86395.61068.11720.32730.51490.43410.5768
877.096.85565.5398.17220.36360.33060.41490.5683
886.976.84445.46748.22130.4290.36330.46280.559
897.156.79695.36218.23170.31480.40660.5310.531







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
780.03890.028600.037700
790.0514-0.04330.0360.08310.06040.2458
800.058-0.02460.03220.02750.04940.2223
810.066-0.01530.0280.01060.03970.1993
820.07270.01890.02620.01630.0350.1872
830.0789-0.00710.0230.00230.02960.172
840.0842-0.00140.01991e-040.02540.1593
850.08910.00670.01820.0020.02240.1498
860.09320.04170.02080.08180.0290.1704
870.0980.03420.02220.05490.03160.1779
880.10260.01840.02180.01580.03020.1738
890.10770.05190.02430.12470.03810.1951

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
78 & 0.0389 & 0.0286 & 0 & 0.0377 & 0 & 0 \tabularnewline
79 & 0.0514 & -0.0433 & 0.036 & 0.0831 & 0.0604 & 0.2458 \tabularnewline
80 & 0.058 & -0.0246 & 0.0322 & 0.0275 & 0.0494 & 0.2223 \tabularnewline
81 & 0.066 & -0.0153 & 0.028 & 0.0106 & 0.0397 & 0.1993 \tabularnewline
82 & 0.0727 & 0.0189 & 0.0262 & 0.0163 & 0.035 & 0.1872 \tabularnewline
83 & 0.0789 & -0.0071 & 0.023 & 0.0023 & 0.0296 & 0.172 \tabularnewline
84 & 0.0842 & -0.0014 & 0.0199 & 1e-04 & 0.0254 & 0.1593 \tabularnewline
85 & 0.0891 & 0.0067 & 0.0182 & 0.002 & 0.0224 & 0.1498 \tabularnewline
86 & 0.0932 & 0.0417 & 0.0208 & 0.0818 & 0.029 & 0.1704 \tabularnewline
87 & 0.098 & 0.0342 & 0.0222 & 0.0549 & 0.0316 & 0.1779 \tabularnewline
88 & 0.1026 & 0.0184 & 0.0218 & 0.0158 & 0.0302 & 0.1738 \tabularnewline
89 & 0.1077 & 0.0519 & 0.0243 & 0.1247 & 0.0381 & 0.1951 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=107036&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.0389[/C][C]0.0286[/C][C]0[/C][C]0.0377[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]79[/C][C]0.0514[/C][C]-0.0433[/C][C]0.036[/C][C]0.0831[/C][C]0.0604[/C][C]0.2458[/C][/ROW]
[ROW][C]80[/C][C]0.058[/C][C]-0.0246[/C][C]0.0322[/C][C]0.0275[/C][C]0.0494[/C][C]0.2223[/C][/ROW]
[ROW][C]81[/C][C]0.066[/C][C]-0.0153[/C][C]0.028[/C][C]0.0106[/C][C]0.0397[/C][C]0.1993[/C][/ROW]
[ROW][C]82[/C][C]0.0727[/C][C]0.0189[/C][C]0.0262[/C][C]0.0163[/C][C]0.035[/C][C]0.1872[/C][/ROW]
[ROW][C]83[/C][C]0.0789[/C][C]-0.0071[/C][C]0.023[/C][C]0.0023[/C][C]0.0296[/C][C]0.172[/C][/ROW]
[ROW][C]84[/C][C]0.0842[/C][C]-0.0014[/C][C]0.0199[/C][C]1e-04[/C][C]0.0254[/C][C]0.1593[/C][/ROW]
[ROW][C]85[/C][C]0.0891[/C][C]0.0067[/C][C]0.0182[/C][C]0.002[/C][C]0.0224[/C][C]0.1498[/C][/ROW]
[ROW][C]86[/C][C]0.0932[/C][C]0.0417[/C][C]0.0208[/C][C]0.0818[/C][C]0.029[/C][C]0.1704[/C][/ROW]
[ROW][C]87[/C][C]0.098[/C][C]0.0342[/C][C]0.0222[/C][C]0.0549[/C][C]0.0316[/C][C]0.1779[/C][/ROW]
[ROW][C]88[/C][C]0.1026[/C][C]0.0184[/C][C]0.0218[/C][C]0.0158[/C][C]0.0302[/C][C]0.1738[/C][/ROW]
[ROW][C]89[/C][C]0.1077[/C][C]0.0519[/C][C]0.0243[/C][C]0.1247[/C][C]0.0381[/C][C]0.1951[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=107036&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=107036&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.03890.028600.037700
790.0514-0.04330.0360.08310.06040.2458
800.058-0.02460.03220.02750.04940.2223
810.066-0.01530.0280.01060.03970.1993
820.07270.01890.02620.01630.0350.1872
830.0789-0.00710.0230.00230.02960.172
840.0842-0.00140.01991e-040.02540.1593
850.08910.00670.01820.0020.02240.1498
860.09320.04170.02080.08180.0290.1704
870.0980.03420.02220.05490.03160.1779
880.10260.01840.02180.01580.03020.1738
890.10770.05190.02430.12470.03810.1951



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