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, 22 Dec 2010 22:41:36 +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/22/t1293057609my31oyrjxjv0fia.htm/, Retrieved Sun, 05 May 2024 21:46:48 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114615, Retrieved Sun, 05 May 2024 21:46:48 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact148
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] [ARIMA forecast ol...] [2010-12-22 22:41:36] [8f110cf3e3846d42560df9b5835185a6] [Current]
-   P           [ARIMA Forecasting] [Arima Forecast ol...] [2010-12-24 09:42:48] [a8a0ff0853b70f438be515083758c362]
-   P             [ARIMA Forecasting] [ARIMA forecasting...] [2010-12-24 21:10:37] [a8a0ff0853b70f438be515083758c362]
Feedback Forum

Post a new message
Dataseries X:
78.33
78.21
78.94
77.94
77.31
75.75
77.73
77.90
77.45
77.46
77.97
77.23
76.56
76.70
76.51
76.03
76.69
76.38
76.80
76.63
77.17
78.63
78.89
76.94
77.50
79.27
79.77
78.62
78.60
77.88
78.71
79.27
80.12
81.12
81.48
82.81
82.39
82.41
82.20
81.99
81.61
83.51
84.05
82.99
83.54
84.44
84.24
83.88
84.17
84.59
84.76
85.14
85.22
84.77
84.50
84.56
83.79
83.96
84.80
84.89
84.78
84.80
84.44
84.65
84.22
84.08
85.29
85.00
84.63
84.92
84.61
84.50
84.29
84.50
84.41
84.71
84.21
83.86
84.40
83.71
84.42
85.26
85.08
85.65
85.74
85.89
86.08
85.49
85.97
85.84
86.72
85.42
83.87
85.45
85.35
84.27
83.13
83.79
83.70
83.76
83.47
83.78
84.83
84.43
84.90
85.36
85.49
85.29




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135

\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 & 'Gwilym Jenkins' @ 72.249.127.135 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114615&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]'Gwilym Jenkins' @ 72.249.127.135[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114615&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114615&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'Gwilym Jenkins' @ 72.249.127.135







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[96])
8485.65-------
8585.74-------
8685.89-------
8786.08-------
8885.49-------
8985.97-------
9085.84-------
9186.72-------
9285.42-------
9383.87-------
9485.45-------
9585.35-------
9684.27-------
9783.1384.414183.067385.7610.03080.58310.02680.5831
9883.7984.776882.960486.59320.14350.96220.11480.7078
9983.784.714582.730686.69850.15810.81950.08870.6697
10083.7684.559282.388586.72990.23530.78110.20030.603
10183.4784.63682.242687.02930.16980.76340.13730.6178
10283.7884.65582.073187.2370.25330.81580.18420.615
10384.8384.715981.97187.46090.46750.7480.07620.6249
10484.4384.596381.692387.50030.45530.43730.28910.5872
10584.984.46981.41187.52710.39120.510.64950.5508
10685.3684.606581.403687.80930.32240.42870.30290.5816
10785.4984.595981.255387.93650.29990.3270.32910.5758
10885.2984.50381.029587.97650.32850.28880.55230.5523

\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[96]) \tabularnewline
84 & 85.65 & - & - & - & - & - & - & - \tabularnewline
85 & 85.74 & - & - & - & - & - & - & - \tabularnewline
86 & 85.89 & - & - & - & - & - & - & - \tabularnewline
87 & 86.08 & - & - & - & - & - & - & - \tabularnewline
88 & 85.49 & - & - & - & - & - & - & - \tabularnewline
89 & 85.97 & - & - & - & - & - & - & - \tabularnewline
90 & 85.84 & - & - & - & - & - & - & - \tabularnewline
91 & 86.72 & - & - & - & - & - & - & - \tabularnewline
92 & 85.42 & - & - & - & - & - & - & - \tabularnewline
93 & 83.87 & - & - & - & - & - & - & - \tabularnewline
94 & 85.45 & - & - & - & - & - & - & - \tabularnewline
95 & 85.35 & - & - & - & - & - & - & - \tabularnewline
96 & 84.27 & - & - & - & - & - & - & - \tabularnewline
97 & 83.13 & 84.4141 & 83.0673 & 85.761 & 0.0308 & 0.5831 & 0.0268 & 0.5831 \tabularnewline
98 & 83.79 & 84.7768 & 82.9604 & 86.5932 & 0.1435 & 0.9622 & 0.1148 & 0.7078 \tabularnewline
99 & 83.7 & 84.7145 & 82.7306 & 86.6985 & 0.1581 & 0.8195 & 0.0887 & 0.6697 \tabularnewline
100 & 83.76 & 84.5592 & 82.3885 & 86.7299 & 0.2353 & 0.7811 & 0.2003 & 0.603 \tabularnewline
101 & 83.47 & 84.636 & 82.2426 & 87.0293 & 0.1698 & 0.7634 & 0.1373 & 0.6178 \tabularnewline
102 & 83.78 & 84.655 & 82.0731 & 87.237 & 0.2533 & 0.8158 & 0.1842 & 0.615 \tabularnewline
103 & 84.83 & 84.7159 & 81.971 & 87.4609 & 0.4675 & 0.748 & 0.0762 & 0.6249 \tabularnewline
104 & 84.43 & 84.5963 & 81.6923 & 87.5003 & 0.4553 & 0.4373 & 0.2891 & 0.5872 \tabularnewline
105 & 84.9 & 84.469 & 81.411 & 87.5271 & 0.3912 & 0.51 & 0.6495 & 0.5508 \tabularnewline
106 & 85.36 & 84.6065 & 81.4036 & 87.8093 & 0.3224 & 0.4287 & 0.3029 & 0.5816 \tabularnewline
107 & 85.49 & 84.5959 & 81.2553 & 87.9365 & 0.2999 & 0.327 & 0.3291 & 0.5758 \tabularnewline
108 & 85.29 & 84.503 & 81.0295 & 87.9765 & 0.3285 & 0.2888 & 0.5523 & 0.5523 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114615&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[96])[/C][/ROW]
[ROW][C]84[/C][C]85.65[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]85.74[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]86[/C][C]85.89[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]87[/C][C]86.08[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]88[/C][C]85.49[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]89[/C][C]85.97[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]90[/C][C]85.84[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]91[/C][C]86.72[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]92[/C][C]85.42[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]93[/C][C]83.87[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]94[/C][C]85.45[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]95[/C][C]85.35[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]96[/C][C]84.27[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]97[/C][C]83.13[/C][C]84.4141[/C][C]83.0673[/C][C]85.761[/C][C]0.0308[/C][C]0.5831[/C][C]0.0268[/C][C]0.5831[/C][/ROW]
[ROW][C]98[/C][C]83.79[/C][C]84.7768[/C][C]82.9604[/C][C]86.5932[/C][C]0.1435[/C][C]0.9622[/C][C]0.1148[/C][C]0.7078[/C][/ROW]
[ROW][C]99[/C][C]83.7[/C][C]84.7145[/C][C]82.7306[/C][C]86.6985[/C][C]0.1581[/C][C]0.8195[/C][C]0.0887[/C][C]0.6697[/C][/ROW]
[ROW][C]100[/C][C]83.76[/C][C]84.5592[/C][C]82.3885[/C][C]86.7299[/C][C]0.2353[/C][C]0.7811[/C][C]0.2003[/C][C]0.603[/C][/ROW]
[ROW][C]101[/C][C]83.47[/C][C]84.636[/C][C]82.2426[/C][C]87.0293[/C][C]0.1698[/C][C]0.7634[/C][C]0.1373[/C][C]0.6178[/C][/ROW]
[ROW][C]102[/C][C]83.78[/C][C]84.655[/C][C]82.0731[/C][C]87.237[/C][C]0.2533[/C][C]0.8158[/C][C]0.1842[/C][C]0.615[/C][/ROW]
[ROW][C]103[/C][C]84.83[/C][C]84.7159[/C][C]81.971[/C][C]87.4609[/C][C]0.4675[/C][C]0.748[/C][C]0.0762[/C][C]0.6249[/C][/ROW]
[ROW][C]104[/C][C]84.43[/C][C]84.5963[/C][C]81.6923[/C][C]87.5003[/C][C]0.4553[/C][C]0.4373[/C][C]0.2891[/C][C]0.5872[/C][/ROW]
[ROW][C]105[/C][C]84.9[/C][C]84.469[/C][C]81.411[/C][C]87.5271[/C][C]0.3912[/C][C]0.51[/C][C]0.6495[/C][C]0.5508[/C][/ROW]
[ROW][C]106[/C][C]85.36[/C][C]84.6065[/C][C]81.4036[/C][C]87.8093[/C][C]0.3224[/C][C]0.4287[/C][C]0.3029[/C][C]0.5816[/C][/ROW]
[ROW][C]107[/C][C]85.49[/C][C]84.5959[/C][C]81.2553[/C][C]87.9365[/C][C]0.2999[/C][C]0.327[/C][C]0.3291[/C][C]0.5758[/C][/ROW]
[ROW][C]108[/C][C]85.29[/C][C]84.503[/C][C]81.0295[/C][C]87.9765[/C][C]0.3285[/C][C]0.2888[/C][C]0.5523[/C][C]0.5523[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114615&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114615&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[96])
8485.65-------
8585.74-------
8685.89-------
8786.08-------
8885.49-------
8985.97-------
9085.84-------
9186.72-------
9285.42-------
9383.87-------
9485.45-------
9585.35-------
9684.27-------
9783.1384.414183.067385.7610.03080.58310.02680.5831
9883.7984.776882.960486.59320.14350.96220.11480.7078
9983.784.714582.730686.69850.15810.81950.08870.6697
10083.7684.559282.388586.72990.23530.78110.20030.603
10183.4784.63682.242687.02930.16980.76340.13730.6178
10283.7884.65582.073187.2370.25330.81580.18420.615
10384.8384.715981.97187.46090.46750.7480.07620.6249
10484.4384.596381.692387.50030.45530.43730.28910.5872
10584.984.46981.41187.52710.39120.510.64950.5508
10685.3684.606581.403687.80930.32240.42870.30290.5816
10785.4984.595981.255387.93650.29990.3270.32910.5758
10885.2984.50381.029587.97650.32850.28880.55230.5523







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
970.0081-0.015201.64900
980.0109-0.01160.01340.97381.31141.1452
990.0119-0.0120.01291.02931.21741.1033
1000.0131-0.00950.01210.63871.07271.0357
1010.0144-0.01380.01241.35951.13011.063
1020.0156-0.01030.01210.76571.06931.0341
1030.01650.00130.01050.0130.91840.9583
1040.0175-0.0020.00950.02770.80710.8984
1050.01850.00510.0090.18570.7380.8591
1060.01930.00890.0090.56780.7210.8491
1070.02010.01060.00910.79930.72810.8533
1080.0210.00930.00910.61940.71910.848

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
97 & 0.0081 & -0.0152 & 0 & 1.649 & 0 & 0 \tabularnewline
98 & 0.0109 & -0.0116 & 0.0134 & 0.9738 & 1.3114 & 1.1452 \tabularnewline
99 & 0.0119 & -0.012 & 0.0129 & 1.0293 & 1.2174 & 1.1033 \tabularnewline
100 & 0.0131 & -0.0095 & 0.0121 & 0.6387 & 1.0727 & 1.0357 \tabularnewline
101 & 0.0144 & -0.0138 & 0.0124 & 1.3595 & 1.1301 & 1.063 \tabularnewline
102 & 0.0156 & -0.0103 & 0.0121 & 0.7657 & 1.0693 & 1.0341 \tabularnewline
103 & 0.0165 & 0.0013 & 0.0105 & 0.013 & 0.9184 & 0.9583 \tabularnewline
104 & 0.0175 & -0.002 & 0.0095 & 0.0277 & 0.8071 & 0.8984 \tabularnewline
105 & 0.0185 & 0.0051 & 0.009 & 0.1857 & 0.738 & 0.8591 \tabularnewline
106 & 0.0193 & 0.0089 & 0.009 & 0.5678 & 0.721 & 0.8491 \tabularnewline
107 & 0.0201 & 0.0106 & 0.0091 & 0.7993 & 0.7281 & 0.8533 \tabularnewline
108 & 0.021 & 0.0093 & 0.0091 & 0.6194 & 0.7191 & 0.848 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114615&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]97[/C][C]0.0081[/C][C]-0.0152[/C][C]0[/C][C]1.649[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]98[/C][C]0.0109[/C][C]-0.0116[/C][C]0.0134[/C][C]0.9738[/C][C]1.3114[/C][C]1.1452[/C][/ROW]
[ROW][C]99[/C][C]0.0119[/C][C]-0.012[/C][C]0.0129[/C][C]1.0293[/C][C]1.2174[/C][C]1.1033[/C][/ROW]
[ROW][C]100[/C][C]0.0131[/C][C]-0.0095[/C][C]0.0121[/C][C]0.6387[/C][C]1.0727[/C][C]1.0357[/C][/ROW]
[ROW][C]101[/C][C]0.0144[/C][C]-0.0138[/C][C]0.0124[/C][C]1.3595[/C][C]1.1301[/C][C]1.063[/C][/ROW]
[ROW][C]102[/C][C]0.0156[/C][C]-0.0103[/C][C]0.0121[/C][C]0.7657[/C][C]1.0693[/C][C]1.0341[/C][/ROW]
[ROW][C]103[/C][C]0.0165[/C][C]0.0013[/C][C]0.0105[/C][C]0.013[/C][C]0.9184[/C][C]0.9583[/C][/ROW]
[ROW][C]104[/C][C]0.0175[/C][C]-0.002[/C][C]0.0095[/C][C]0.0277[/C][C]0.8071[/C][C]0.8984[/C][/ROW]
[ROW][C]105[/C][C]0.0185[/C][C]0.0051[/C][C]0.009[/C][C]0.1857[/C][C]0.738[/C][C]0.8591[/C][/ROW]
[ROW][C]106[/C][C]0.0193[/C][C]0.0089[/C][C]0.009[/C][C]0.5678[/C][C]0.721[/C][C]0.8491[/C][/ROW]
[ROW][C]107[/C][C]0.0201[/C][C]0.0106[/C][C]0.0091[/C][C]0.7993[/C][C]0.7281[/C][C]0.8533[/C][/ROW]
[ROW][C]108[/C][C]0.021[/C][C]0.0093[/C][C]0.0091[/C][C]0.6194[/C][C]0.7191[/C][C]0.848[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114615&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114615&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
970.0081-0.015201.64900
980.0109-0.01160.01340.97381.31141.1452
990.0119-0.0120.01291.02931.21741.1033
1000.0131-0.00950.01210.63871.07271.0357
1010.0144-0.01380.01241.35951.13011.063
1020.0156-0.01030.01210.76571.06931.0341
1030.01650.00130.01050.0130.91840.9583
1040.0175-0.0020.00950.02770.80710.8984
1050.01850.00510.0090.18570.7380.8591
1060.01930.00890.0090.56780.7210.8491
1070.02010.01060.00910.79930.72810.8533
1080.0210.00930.00910.61940.71910.848



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