Free Statistics

of Irreproducible Research!

Author's title

Paper G12 Vervaardiging elektrische en elektronische apparaten en instrumen...

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationSun, 16 Dec 2007 04:37:27 -0700
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2007/Dec/16/t1197804099e54pljyyngr88fg.htm/, Retrieved Thu, 02 May 2024 00:46:14 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=4137, Retrieved Thu, 02 May 2024 00:46:14 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywordsPaper G12 vervaardiging elektrische en elektronische apparaten en instrumenten
Estimated Impact213
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Paper G12 Vervaar...] [2007-12-16 11:37:27] [ae3f0dfb5dab6ea17524363c550229d5] [Current]
Feedback Forum

Post a new message
Dataseries X:
104,8
105,6
118,3
89,9
90,2
107
64,5
92,6
95,8
94,3
91,2
86,3
77,6
82,5
97,7
83,3
84,2
92,8
77,4
72,5
88,8
93,4
92,6
90,7
81,6
84,1
88,1
85,3
82,9
84,8
71,2
68,9
94,3
97,6
85,6
91,9
75,8
79,8
99
88,5
86,7
97,9
94,3
72,9
91,8
93,2
86,5
98,9
77,2
79,4
90,4
81,4
85,8
103,6
73,6
75,7
99,2
88,7
94,6
98,7
84,2
87,7
103,3
88,2
93,4
106,3
73,1
78,6
101,6
101,4
98,5
99
89,5
83,5
97,4
87,8
90,4
97,1
79,4
85




Summary of compuational 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 compuational 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=4137&T=0

[TABLE]
[ROW][C]Summary of compuational 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=4137&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4137&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 compuational 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[68])
5675.7-------
5799.2-------
5888.7-------
5994.6-------
6098.7-------
6184.2-------
6287.7-------
63103.3-------
6488.2-------
6593.4-------
66106.3-------
6773.1-------
6878.6-------
69101.694.785780.4438111.68450.21470.96980.30430.9698
70101.493.04778.4725110.32840.17170.1660.6890.9493
7198.593.163377.987111.29280.2820.18660.43830.9423
729994.547378.2167114.28740.32920.34740.34010.9433
7389.582.99268.6828100.28230.23030.03480.44550.6907
7483.584.251269.2517102.49950.46780.28650.35550.7281
7597.498.942781.3269120.37420.44390.92110.34510.9686
7687.886.085370.6366104.91290.42920.11940.41290.7821
7790.488.230172.3831107.54650.41290.51740.29990.8358
7897.1100.847382.7204122.94640.36980.82290.31430.9758
7979.475.675362.05492.28650.33020.00570.61940.365
808576.715662.908193.55360.16740.37730.41320.4132

\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[68]) \tabularnewline
56 & 75.7 & - & - & - & - & - & - & - \tabularnewline
57 & 99.2 & - & - & - & - & - & - & - \tabularnewline
58 & 88.7 & - & - & - & - & - & - & - \tabularnewline
59 & 94.6 & - & - & - & - & - & - & - \tabularnewline
60 & 98.7 & - & - & - & - & - & - & - \tabularnewline
61 & 84.2 & - & - & - & - & - & - & - \tabularnewline
62 & 87.7 & - & - & - & - & - & - & - \tabularnewline
63 & 103.3 & - & - & - & - & - & - & - \tabularnewline
64 & 88.2 & - & - & - & - & - & - & - \tabularnewline
65 & 93.4 & - & - & - & - & - & - & - \tabularnewline
66 & 106.3 & - & - & - & - & - & - & - \tabularnewline
67 & 73.1 & - & - & - & - & - & - & - \tabularnewline
68 & 78.6 & - & - & - & - & - & - & - \tabularnewline
69 & 101.6 & 94.7857 & 80.4438 & 111.6845 & 0.2147 & 0.9698 & 0.3043 & 0.9698 \tabularnewline
70 & 101.4 & 93.047 & 78.4725 & 110.3284 & 0.1717 & 0.166 & 0.689 & 0.9493 \tabularnewline
71 & 98.5 & 93.1633 & 77.987 & 111.2928 & 0.282 & 0.1866 & 0.4383 & 0.9423 \tabularnewline
72 & 99 & 94.5473 & 78.2167 & 114.2874 & 0.3292 & 0.3474 & 0.3401 & 0.9433 \tabularnewline
73 & 89.5 & 82.992 & 68.6828 & 100.2823 & 0.2303 & 0.0348 & 0.4455 & 0.6907 \tabularnewline
74 & 83.5 & 84.2512 & 69.2517 & 102.4995 & 0.4678 & 0.2865 & 0.3555 & 0.7281 \tabularnewline
75 & 97.4 & 98.9427 & 81.3269 & 120.3742 & 0.4439 & 0.9211 & 0.3451 & 0.9686 \tabularnewline
76 & 87.8 & 86.0853 & 70.6366 & 104.9129 & 0.4292 & 0.1194 & 0.4129 & 0.7821 \tabularnewline
77 & 90.4 & 88.2301 & 72.3831 & 107.5465 & 0.4129 & 0.5174 & 0.2999 & 0.8358 \tabularnewline
78 & 97.1 & 100.8473 & 82.7204 & 122.9464 & 0.3698 & 0.8229 & 0.3143 & 0.9758 \tabularnewline
79 & 79.4 & 75.6753 & 62.054 & 92.2865 & 0.3302 & 0.0057 & 0.6194 & 0.365 \tabularnewline
80 & 85 & 76.7156 & 62.9081 & 93.5536 & 0.1674 & 0.3773 & 0.4132 & 0.4132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4137&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[68])[/C][/ROW]
[ROW][C]56[/C][C]75.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]99.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]88.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]94.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]98.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]84.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]87.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]103.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]88.2[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]93.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]106.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]73.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]78.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]101.6[/C][C]94.7857[/C][C]80.4438[/C][C]111.6845[/C][C]0.2147[/C][C]0.9698[/C][C]0.3043[/C][C]0.9698[/C][/ROW]
[ROW][C]70[/C][C]101.4[/C][C]93.047[/C][C]78.4725[/C][C]110.3284[/C][C]0.1717[/C][C]0.166[/C][C]0.689[/C][C]0.9493[/C][/ROW]
[ROW][C]71[/C][C]98.5[/C][C]93.1633[/C][C]77.987[/C][C]111.2928[/C][C]0.282[/C][C]0.1866[/C][C]0.4383[/C][C]0.9423[/C][/ROW]
[ROW][C]72[/C][C]99[/C][C]94.5473[/C][C]78.2167[/C][C]114.2874[/C][C]0.3292[/C][C]0.3474[/C][C]0.3401[/C][C]0.9433[/C][/ROW]
[ROW][C]73[/C][C]89.5[/C][C]82.992[/C][C]68.6828[/C][C]100.2823[/C][C]0.2303[/C][C]0.0348[/C][C]0.4455[/C][C]0.6907[/C][/ROW]
[ROW][C]74[/C][C]83.5[/C][C]84.2512[/C][C]69.2517[/C][C]102.4995[/C][C]0.4678[/C][C]0.2865[/C][C]0.3555[/C][C]0.7281[/C][/ROW]
[ROW][C]75[/C][C]97.4[/C][C]98.9427[/C][C]81.3269[/C][C]120.3742[/C][C]0.4439[/C][C]0.9211[/C][C]0.3451[/C][C]0.9686[/C][/ROW]
[ROW][C]76[/C][C]87.8[/C][C]86.0853[/C][C]70.6366[/C][C]104.9129[/C][C]0.4292[/C][C]0.1194[/C][C]0.4129[/C][C]0.7821[/C][/ROW]
[ROW][C]77[/C][C]90.4[/C][C]88.2301[/C][C]72.3831[/C][C]107.5465[/C][C]0.4129[/C][C]0.5174[/C][C]0.2999[/C][C]0.8358[/C][/ROW]
[ROW][C]78[/C][C]97.1[/C][C]100.8473[/C][C]82.7204[/C][C]122.9464[/C][C]0.3698[/C][C]0.8229[/C][C]0.3143[/C][C]0.9758[/C][/ROW]
[ROW][C]79[/C][C]79.4[/C][C]75.6753[/C][C]62.054[/C][C]92.2865[/C][C]0.3302[/C][C]0.0057[/C][C]0.6194[/C][C]0.365[/C][/ROW]
[ROW][C]80[/C][C]85[/C][C]76.7156[/C][C]62.9081[/C][C]93.5536[/C][C]0.1674[/C][C]0.3773[/C][C]0.4132[/C][C]0.4132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4137&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4137&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[68])
5675.7-------
5799.2-------
5888.7-------
5994.6-------
6098.7-------
6184.2-------
6287.7-------
63103.3-------
6488.2-------
6593.4-------
66106.3-------
6773.1-------
6878.6-------
69101.694.785780.4438111.68450.21470.96980.30430.9698
70101.493.04778.4725110.32840.17170.1660.6890.9493
7198.593.163377.987111.29280.2820.18660.43830.9423
729994.547378.2167114.28740.32920.34740.34010.9433
7389.582.99268.6828100.28230.23030.03480.44550.6907
7483.584.251269.2517102.49950.46780.28650.35550.7281
7597.498.942781.3269120.37420.44390.92110.34510.9686
7687.886.085370.6366104.91290.42920.11940.41290.7821
7790.488.230172.3831107.54650.41290.51740.29990.8358
7897.1100.847382.7204122.94640.36980.82290.31430.9758
7979.475.675362.05492.28650.33020.00570.61940.365
808576.715662.908193.55360.16740.37730.41320.4132







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
690.0910.07190.00646.43533.86961.9671
700.09480.08980.007569.77225.81442.4113
710.09930.05730.004828.48062.37341.5406
720.10650.04710.003919.82681.65221.2854
730.10630.07840.006542.35473.52961.8787
740.1105-0.00897e-040.56430.0470.2168
750.1105-0.01560.00132.37990.19830.4453
760.11160.01990.00172.94010.2450.495
770.11170.02460.0024.70850.39240.6264
780.1118-0.03720.003114.04191.17021.0817
790.1120.04920.004113.87361.15611.0752
800.1120.1080.00968.6325.71932.3915

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
69 & 0.091 & 0.0719 & 0.006 & 46.4353 & 3.8696 & 1.9671 \tabularnewline
70 & 0.0948 & 0.0898 & 0.0075 & 69.7722 & 5.8144 & 2.4113 \tabularnewline
71 & 0.0993 & 0.0573 & 0.0048 & 28.4806 & 2.3734 & 1.5406 \tabularnewline
72 & 0.1065 & 0.0471 & 0.0039 & 19.8268 & 1.6522 & 1.2854 \tabularnewline
73 & 0.1063 & 0.0784 & 0.0065 & 42.3547 & 3.5296 & 1.8787 \tabularnewline
74 & 0.1105 & -0.0089 & 7e-04 & 0.5643 & 0.047 & 0.2168 \tabularnewline
75 & 0.1105 & -0.0156 & 0.0013 & 2.3799 & 0.1983 & 0.4453 \tabularnewline
76 & 0.1116 & 0.0199 & 0.0017 & 2.9401 & 0.245 & 0.495 \tabularnewline
77 & 0.1117 & 0.0246 & 0.002 & 4.7085 & 0.3924 & 0.6264 \tabularnewline
78 & 0.1118 & -0.0372 & 0.0031 & 14.0419 & 1.1702 & 1.0817 \tabularnewline
79 & 0.112 & 0.0492 & 0.0041 & 13.8736 & 1.1561 & 1.0752 \tabularnewline
80 & 0.112 & 0.108 & 0.009 & 68.632 & 5.7193 & 2.3915 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=4137&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]69[/C][C]0.091[/C][C]0.0719[/C][C]0.006[/C][C]46.4353[/C][C]3.8696[/C][C]1.9671[/C][/ROW]
[ROW][C]70[/C][C]0.0948[/C][C]0.0898[/C][C]0.0075[/C][C]69.7722[/C][C]5.8144[/C][C]2.4113[/C][/ROW]
[ROW][C]71[/C][C]0.0993[/C][C]0.0573[/C][C]0.0048[/C][C]28.4806[/C][C]2.3734[/C][C]1.5406[/C][/ROW]
[ROW][C]72[/C][C]0.1065[/C][C]0.0471[/C][C]0.0039[/C][C]19.8268[/C][C]1.6522[/C][C]1.2854[/C][/ROW]
[ROW][C]73[/C][C]0.1063[/C][C]0.0784[/C][C]0.0065[/C][C]42.3547[/C][C]3.5296[/C][C]1.8787[/C][/ROW]
[ROW][C]74[/C][C]0.1105[/C][C]-0.0089[/C][C]7e-04[/C][C]0.5643[/C][C]0.047[/C][C]0.2168[/C][/ROW]
[ROW][C]75[/C][C]0.1105[/C][C]-0.0156[/C][C]0.0013[/C][C]2.3799[/C][C]0.1983[/C][C]0.4453[/C][/ROW]
[ROW][C]76[/C][C]0.1116[/C][C]0.0199[/C][C]0.0017[/C][C]2.9401[/C][C]0.245[/C][C]0.495[/C][/ROW]
[ROW][C]77[/C][C]0.1117[/C][C]0.0246[/C][C]0.002[/C][C]4.7085[/C][C]0.3924[/C][C]0.6264[/C][/ROW]
[ROW][C]78[/C][C]0.1118[/C][C]-0.0372[/C][C]0.0031[/C][C]14.0419[/C][C]1.1702[/C][C]1.0817[/C][/ROW]
[ROW][C]79[/C][C]0.112[/C][C]0.0492[/C][C]0.0041[/C][C]13.8736[/C][C]1.1561[/C][C]1.0752[/C][/ROW]
[ROW][C]80[/C][C]0.112[/C][C]0.108[/C][C]0.009[/C][C]68.632[/C][C]5.7193[/C][C]2.3915[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=4137&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=4137&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
690.0910.07190.00646.43533.86961.9671
700.09480.08980.007569.77225.81442.4113
710.09930.05730.004828.48062.37341.5406
720.10650.04710.003919.82681.65221.2854
730.10630.07840.006542.35473.52961.8787
740.1105-0.00897e-040.56430.0470.2168
750.1105-0.01560.00132.37990.19830.4453
760.11160.01990.00172.94010.2450.495
770.11170.02460.0024.70850.39240.6264
780.1118-0.03720.003114.04191.17021.0817
790.1120.04920.004113.87361.15611.0752
800.1120.1080.00968.6325.71932.3915



Parameters (Session):
par1 = 12 ; par2 = 0.0 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; par7 = 1 ; par8 = 0 ; par9 = 1 ; par10 = FALSE ;
Parameters (R input):
par1 = 12 ; par2 = 0.0 ; par3 = 0 ; par4 = 1 ; par5 = 12 ; par6 = 3 ; 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,fx))
(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.se <- array(0, dim=fx)
perf.mse <- 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.mape[i] = perf.mape[i] + abs(perf.pe[i])
perf.se[i] = (x[nx+i] - forecast$pred[i])^2
perf.mse[i] = perf.mse[i] + perf.se[i]
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 = perf.mape / fx
perf.mse = perf.mse / fx
perf.rmse = sqrt(perf.mse)
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:12] <- 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.mape[i],4))
a<-table.element(a,round(perf.se[i],4))
a<-table.element(a,round(perf.mse[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')