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 09:44:05 +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/t12931837222ig0ff3senqfpta.htm/, Retrieved Tue, 30 Apr 2024 06:06:54 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=114670, Retrieved Tue, 30 Apr 2024 06:06:54 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact174
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   PD      [ARIMA Forecasting] [ARIMA model faill...] [2010-12-03 14:08:17] [95e8426e0df851c9330605aa1e892ab5]
-   P         [ARIMA Forecasting] [verbetering forec...] [2010-12-13 18:37:08] [bd591a1ebb67d263a02e7adae3fa1a4d]
-   PD          [ARIMA Forecasting] [Forecast] [2010-12-21 10:29:11] [bd591a1ebb67d263a02e7adae3fa1a4d]
-   PD              [ARIMA Forecasting] [forecast 2] [2010-12-24 09:44:05] [09489ba95453d3f5c9e6f2eaeda915af] [Current]
Feedback Forum

Post a new message
Dataseries X:
94.6
95.9
104.7
102.8
98.1
113.9
80.9
95.7
113.2
105.9
108.8
102.3
99
100.7
115.5
100.7
109.9
114.6
85.4
100.5
114.8
116.5
112.9
102
106
105.3
118.8
106.1
109.3
117.2
92.5
104.2
112.5
122.4
113.3
100
110.7
112.8
109.8
117.3
109.1
115.9
96
99.8
116.8
115.7
99.4
94.3
91
93.2
103.1
94.1
91.8
102.7
82.6
89.1
104.5
105.1
95.1
88.7
86.3
91.8
111.5
99.7
97.5
111.7
86.2
95.4




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114670&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 time3 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[56])
4499.8-------
45116.8-------
46115.7-------
4799.4-------
4894.3-------
4991-------
5093.2-------
51103.1-------
5294.1-------
5391.8-------
54102.7-------
5582.6-------
5689.1-------
57104.5103.122494.1684112.07650.38150.99890.00140.9989
58105.1105.22696.1718114.28020.48910.56240.01170.9998
5995.193.537883.6479103.42770.37840.0110.12270.8104
6088.786.276474.464398.08850.34380.07160.09150.3197
6186.387.449975.281499.61840.42650.42020.28370.3952
6291.888.966475.7709102.16190.33690.6540.26470.4921
63111.596.103281.8746110.33180.0170.72330.16760.8327
6499.790.952676.1756105.72950.1230.00320.33820.5971
6597.588.351972.6716104.03220.12640.0780.33320.4627
66111.797.376480.9413113.81160.04380.49410.26280.8382
6786.277.06760.012494.12160.146900.26240.0833
6895.483.750865.9373101.56430.10.39380.27810.2781

\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[56]) \tabularnewline
44 & 99.8 & - & - & - & - & - & - & - \tabularnewline
45 & 116.8 & - & - & - & - & - & - & - \tabularnewline
46 & 115.7 & - & - & - & - & - & - & - \tabularnewline
47 & 99.4 & - & - & - & - & - & - & - \tabularnewline
48 & 94.3 & - & - & - & - & - & - & - \tabularnewline
49 & 91 & - & - & - & - & - & - & - \tabularnewline
50 & 93.2 & - & - & - & - & - & - & - \tabularnewline
51 & 103.1 & - & - & - & - & - & - & - \tabularnewline
52 & 94.1 & - & - & - & - & - & - & - \tabularnewline
53 & 91.8 & - & - & - & - & - & - & - \tabularnewline
54 & 102.7 & - & - & - & - & - & - & - \tabularnewline
55 & 82.6 & - & - & - & - & - & - & - \tabularnewline
56 & 89.1 & - & - & - & - & - & - & - \tabularnewline
57 & 104.5 & 103.1224 & 94.1684 & 112.0765 & 0.3815 & 0.9989 & 0.0014 & 0.9989 \tabularnewline
58 & 105.1 & 105.226 & 96.1718 & 114.2802 & 0.4891 & 0.5624 & 0.0117 & 0.9998 \tabularnewline
59 & 95.1 & 93.5378 & 83.6479 & 103.4277 & 0.3784 & 0.011 & 0.1227 & 0.8104 \tabularnewline
60 & 88.7 & 86.2764 & 74.4643 & 98.0885 & 0.3438 & 0.0716 & 0.0915 & 0.3197 \tabularnewline
61 & 86.3 & 87.4499 & 75.2814 & 99.6184 & 0.4265 & 0.4202 & 0.2837 & 0.3952 \tabularnewline
62 & 91.8 & 88.9664 & 75.7709 & 102.1619 & 0.3369 & 0.654 & 0.2647 & 0.4921 \tabularnewline
63 & 111.5 & 96.1032 & 81.8746 & 110.3318 & 0.017 & 0.7233 & 0.1676 & 0.8327 \tabularnewline
64 & 99.7 & 90.9526 & 76.1756 & 105.7295 & 0.123 & 0.0032 & 0.3382 & 0.5971 \tabularnewline
65 & 97.5 & 88.3519 & 72.6716 & 104.0322 & 0.1264 & 0.078 & 0.3332 & 0.4627 \tabularnewline
66 & 111.7 & 97.3764 & 80.9413 & 113.8116 & 0.0438 & 0.4941 & 0.2628 & 0.8382 \tabularnewline
67 & 86.2 & 77.067 & 60.0124 & 94.1216 & 0.1469 & 0 & 0.2624 & 0.0833 \tabularnewline
68 & 95.4 & 83.7508 & 65.9373 & 101.5643 & 0.1 & 0.3938 & 0.2781 & 0.2781 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114670&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[56])[/C][/ROW]
[ROW][C]44[/C][C]99.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]116.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]115.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]99.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]94.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]91[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]93.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]103.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]94.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]91.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]102.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]82.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]89.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]104.5[/C][C]103.1224[/C][C]94.1684[/C][C]112.0765[/C][C]0.3815[/C][C]0.9989[/C][C]0.0014[/C][C]0.9989[/C][/ROW]
[ROW][C]58[/C][C]105.1[/C][C]105.226[/C][C]96.1718[/C][C]114.2802[/C][C]0.4891[/C][C]0.5624[/C][C]0.0117[/C][C]0.9998[/C][/ROW]
[ROW][C]59[/C][C]95.1[/C][C]93.5378[/C][C]83.6479[/C][C]103.4277[/C][C]0.3784[/C][C]0.011[/C][C]0.1227[/C][C]0.8104[/C][/ROW]
[ROW][C]60[/C][C]88.7[/C][C]86.2764[/C][C]74.4643[/C][C]98.0885[/C][C]0.3438[/C][C]0.0716[/C][C]0.0915[/C][C]0.3197[/C][/ROW]
[ROW][C]61[/C][C]86.3[/C][C]87.4499[/C][C]75.2814[/C][C]99.6184[/C][C]0.4265[/C][C]0.4202[/C][C]0.2837[/C][C]0.3952[/C][/ROW]
[ROW][C]62[/C][C]91.8[/C][C]88.9664[/C][C]75.7709[/C][C]102.1619[/C][C]0.3369[/C][C]0.654[/C][C]0.2647[/C][C]0.4921[/C][/ROW]
[ROW][C]63[/C][C]111.5[/C][C]96.1032[/C][C]81.8746[/C][C]110.3318[/C][C]0.017[/C][C]0.7233[/C][C]0.1676[/C][C]0.8327[/C][/ROW]
[ROW][C]64[/C][C]99.7[/C][C]90.9526[/C][C]76.1756[/C][C]105.7295[/C][C]0.123[/C][C]0.0032[/C][C]0.3382[/C][C]0.5971[/C][/ROW]
[ROW][C]65[/C][C]97.5[/C][C]88.3519[/C][C]72.6716[/C][C]104.0322[/C][C]0.1264[/C][C]0.078[/C][C]0.3332[/C][C]0.4627[/C][/ROW]
[ROW][C]66[/C][C]111.7[/C][C]97.3764[/C][C]80.9413[/C][C]113.8116[/C][C]0.0438[/C][C]0.4941[/C][C]0.2628[/C][C]0.8382[/C][/ROW]
[ROW][C]67[/C][C]86.2[/C][C]77.067[/C][C]60.0124[/C][C]94.1216[/C][C]0.1469[/C][C]0[/C][C]0.2624[/C][C]0.0833[/C][/ROW]
[ROW][C]68[/C][C]95.4[/C][C]83.7508[/C][C]65.9373[/C][C]101.5643[/C][C]0.1[/C][C]0.3938[/C][C]0.2781[/C][C]0.2781[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114670&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114670&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[56])
4499.8-------
45116.8-------
46115.7-------
4799.4-------
4894.3-------
4991-------
5093.2-------
51103.1-------
5294.1-------
5391.8-------
54102.7-------
5582.6-------
5689.1-------
57104.5103.122494.1684112.07650.38150.99890.00140.9989
58105.1105.22696.1718114.28020.48910.56240.01170.9998
5995.193.537883.6479103.42770.37840.0110.12270.8104
6088.786.276474.464398.08850.34380.07160.09150.3197
6186.387.449975.281499.61840.42650.42020.28370.3952
6291.888.966475.7709102.16190.33690.6540.26470.4921
63111.596.103281.8746110.33180.0170.72330.16760.8327
6499.790.952676.1756105.72950.1230.00320.33820.5971
6597.588.351972.6716104.03220.12640.0780.33320.4627
66111.797.376480.9413113.81160.04380.49410.26280.8382
6786.277.06760.012494.12160.146900.26240.0833
6895.483.750865.9373101.56430.10.39380.27810.2781







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
570.04430.013401.897700
580.0439-0.00120.00730.01590.95680.9782
590.05390.01670.01042.44061.45141.2047
600.06990.02810.01485.8742.5571.5991
610.071-0.01310.01451.32222.31011.5199
620.07570.03190.01748.02923.26331.8065
630.07550.16020.0378237.061736.6636.055
640.08290.09620.045176.517541.64496.4533
650.09050.10350.051683.688646.31646.8056
660.08610.14710.0611205.165262.20137.8868
670.11290.11850.066483.411764.12958.0081
680.10850.13910.0724135.704170.0948.3722

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
57 & 0.0443 & 0.0134 & 0 & 1.8977 & 0 & 0 \tabularnewline
58 & 0.0439 & -0.0012 & 0.0073 & 0.0159 & 0.9568 & 0.9782 \tabularnewline
59 & 0.0539 & 0.0167 & 0.0104 & 2.4406 & 1.4514 & 1.2047 \tabularnewline
60 & 0.0699 & 0.0281 & 0.0148 & 5.874 & 2.557 & 1.5991 \tabularnewline
61 & 0.071 & -0.0131 & 0.0145 & 1.3222 & 2.3101 & 1.5199 \tabularnewline
62 & 0.0757 & 0.0319 & 0.0174 & 8.0292 & 3.2633 & 1.8065 \tabularnewline
63 & 0.0755 & 0.1602 & 0.0378 & 237.0617 & 36.663 & 6.055 \tabularnewline
64 & 0.0829 & 0.0962 & 0.0451 & 76.5175 & 41.6449 & 6.4533 \tabularnewline
65 & 0.0905 & 0.1035 & 0.0516 & 83.6886 & 46.3164 & 6.8056 \tabularnewline
66 & 0.0861 & 0.1471 & 0.0611 & 205.1652 & 62.2013 & 7.8868 \tabularnewline
67 & 0.1129 & 0.1185 & 0.0664 & 83.4117 & 64.1295 & 8.0081 \tabularnewline
68 & 0.1085 & 0.1391 & 0.0724 & 135.7041 & 70.094 & 8.3722 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=114670&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]57[/C][C]0.0443[/C][C]0.0134[/C][C]0[/C][C]1.8977[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]58[/C][C]0.0439[/C][C]-0.0012[/C][C]0.0073[/C][C]0.0159[/C][C]0.9568[/C][C]0.9782[/C][/ROW]
[ROW][C]59[/C][C]0.0539[/C][C]0.0167[/C][C]0.0104[/C][C]2.4406[/C][C]1.4514[/C][C]1.2047[/C][/ROW]
[ROW][C]60[/C][C]0.0699[/C][C]0.0281[/C][C]0.0148[/C][C]5.874[/C][C]2.557[/C][C]1.5991[/C][/ROW]
[ROW][C]61[/C][C]0.071[/C][C]-0.0131[/C][C]0.0145[/C][C]1.3222[/C][C]2.3101[/C][C]1.5199[/C][/ROW]
[ROW][C]62[/C][C]0.0757[/C][C]0.0319[/C][C]0.0174[/C][C]8.0292[/C][C]3.2633[/C][C]1.8065[/C][/ROW]
[ROW][C]63[/C][C]0.0755[/C][C]0.1602[/C][C]0.0378[/C][C]237.0617[/C][C]36.663[/C][C]6.055[/C][/ROW]
[ROW][C]64[/C][C]0.0829[/C][C]0.0962[/C][C]0.0451[/C][C]76.5175[/C][C]41.6449[/C][C]6.4533[/C][/ROW]
[ROW][C]65[/C][C]0.0905[/C][C]0.1035[/C][C]0.0516[/C][C]83.6886[/C][C]46.3164[/C][C]6.8056[/C][/ROW]
[ROW][C]66[/C][C]0.0861[/C][C]0.1471[/C][C]0.0611[/C][C]205.1652[/C][C]62.2013[/C][C]7.8868[/C][/ROW]
[ROW][C]67[/C][C]0.1129[/C][C]0.1185[/C][C]0.0664[/C][C]83.4117[/C][C]64.1295[/C][C]8.0081[/C][/ROW]
[ROW][C]68[/C][C]0.1085[/C][C]0.1391[/C][C]0.0724[/C][C]135.7041[/C][C]70.094[/C][C]8.3722[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=114670&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=114670&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
570.04430.013401.897700
580.0439-0.00120.00730.01590.95680.9782
590.05390.01670.01042.44061.45141.2047
600.06990.02810.01485.8742.5571.5991
610.071-0.01310.01451.32222.31011.5199
620.07570.03190.01748.02923.26331.8065
630.07550.16020.0378237.061736.6636.055
640.08290.09620.045176.517541.64496.4533
650.09050.10350.051683.688646.31646.8056
660.08610.14710.0611205.165262.20137.8868
670.11290.11850.066483.411764.12958.0081
680.10850.13910.0724135.704170.0948.3722



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