Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 03 Jan 2008 01:46:47 -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/2008/Jan/03/t1199350033wi1mpnir1goirf0.htm/, Retrieved Tue, 14 May 2024 13:34:53 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=7762, Retrieved Tue, 14 May 2024 13:34:53 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact283
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [verbetering forec...] [2008-01-03 08:46:47] [bad81931077d8a4f1668ce1551154583] [Current]
Feedback Forum

Post a new message
Dataseries X:
106.0
100.9
114.3
101.2
109.2
111.6
91.7
93.7
105.7
109.5
105.3
102.8
100.6
97.6
110.3
107.2
107.2
108.1
97.1
92.2
112.2
111.6
115.7
111.3
104.2
103.2
112.7
106.4
102.6
110.6
95.2
89.0
112.5
116.8
107.2
113.6
101.8
102.6
122.7
110.3
110.5
121.6
100.3
100.7
123.4
127.1
124.1
131.2
111.6
114.2
130.1
125.9
119.0
133.8
107.5
113.5
134.4
126.8
135.6
139.9
129.8
131.0
153.1
134.1
144.1
155.9
123.3
128.1
144.3
153.0
149.9
150.9
141.0
138.9
157.4
142.9
151.7
161.0
138.6
136.0
151.9




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7762&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[69])
57134.4-------
58126.8-------
59135.6-------
60139.9-------
61129.8-------
62131-------
63153.1-------
64134.1-------
65144.1-------
66155.9-------
67123.3-------
68128.1-------
69144.3-------
70153144.7209134.8294154.61250.05050.53320.99980.5332
71149.9148.9807138.486159.47540.43180.22640.99380.809
72150.9154.1233143.0701165.17660.28380.7730.99420.9592
73141140.3349128.7612151.90860.45520.03680.96280.251
74138.9141.8656129.8043153.92690.31490.55590.96130.3462
75157.4161.4973148.9771174.01750.26060.99980.90570.9965
76142.9147.7706134.8171160.7240.23060.07260.98070.7003
77151.7151.3627137.9988164.72670.48030.89270.85660.8499
78161164.091150.3372177.84470.32980.96130.87840.9976
79138.6133.6373119.5125147.76220.24551e-040.92430.0695
80136138.706124.2272153.18470.35710.50570.92450.2244
81151.9156.4664141.6494171.28340.27290.99660.94620.9462

\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[69]) \tabularnewline
57 & 134.4 & - & - & - & - & - & - & - \tabularnewline
58 & 126.8 & - & - & - & - & - & - & - \tabularnewline
59 & 135.6 & - & - & - & - & - & - & - \tabularnewline
60 & 139.9 & - & - & - & - & - & - & - \tabularnewline
61 & 129.8 & - & - & - & - & - & - & - \tabularnewline
62 & 131 & - & - & - & - & - & - & - \tabularnewline
63 & 153.1 & - & - & - & - & - & - & - \tabularnewline
64 & 134.1 & - & - & - & - & - & - & - \tabularnewline
65 & 144.1 & - & - & - & - & - & - & - \tabularnewline
66 & 155.9 & - & - & - & - & - & - & - \tabularnewline
67 & 123.3 & - & - & - & - & - & - & - \tabularnewline
68 & 128.1 & - & - & - & - & - & - & - \tabularnewline
69 & 144.3 & - & - & - & - & - & - & - \tabularnewline
70 & 153 & 144.7209 & 134.8294 & 154.6125 & 0.0505 & 0.5332 & 0.9998 & 0.5332 \tabularnewline
71 & 149.9 & 148.9807 & 138.486 & 159.4754 & 0.4318 & 0.2264 & 0.9938 & 0.809 \tabularnewline
72 & 150.9 & 154.1233 & 143.0701 & 165.1766 & 0.2838 & 0.773 & 0.9942 & 0.9592 \tabularnewline
73 & 141 & 140.3349 & 128.7612 & 151.9086 & 0.4552 & 0.0368 & 0.9628 & 0.251 \tabularnewline
74 & 138.9 & 141.8656 & 129.8043 & 153.9269 & 0.3149 & 0.5559 & 0.9613 & 0.3462 \tabularnewline
75 & 157.4 & 161.4973 & 148.9771 & 174.0175 & 0.2606 & 0.9998 & 0.9057 & 0.9965 \tabularnewline
76 & 142.9 & 147.7706 & 134.8171 & 160.724 & 0.2306 & 0.0726 & 0.9807 & 0.7003 \tabularnewline
77 & 151.7 & 151.3627 & 137.9988 & 164.7267 & 0.4803 & 0.8927 & 0.8566 & 0.8499 \tabularnewline
78 & 161 & 164.091 & 150.3372 & 177.8447 & 0.3298 & 0.9613 & 0.8784 & 0.9976 \tabularnewline
79 & 138.6 & 133.6373 & 119.5125 & 147.7622 & 0.2455 & 1e-04 & 0.9243 & 0.0695 \tabularnewline
80 & 136 & 138.706 & 124.2272 & 153.1847 & 0.3571 & 0.5057 & 0.9245 & 0.2244 \tabularnewline
81 & 151.9 & 156.4664 & 141.6494 & 171.2834 & 0.2729 & 0.9966 & 0.9462 & 0.9462 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=7762&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[69])[/C][/ROW]
[ROW][C]57[/C][C]134.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]126.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]135.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]139.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]129.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]62[/C][C]131[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]63[/C][C]153.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]64[/C][C]134.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]65[/C][C]144.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]66[/C][C]155.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]67[/C][C]123.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]68[/C][C]128.1[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]69[/C][C]144.3[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]70[/C][C]153[/C][C]144.7209[/C][C]134.8294[/C][C]154.6125[/C][C]0.0505[/C][C]0.5332[/C][C]0.9998[/C][C]0.5332[/C][/ROW]
[ROW][C]71[/C][C]149.9[/C][C]148.9807[/C][C]138.486[/C][C]159.4754[/C][C]0.4318[/C][C]0.2264[/C][C]0.9938[/C][C]0.809[/C][/ROW]
[ROW][C]72[/C][C]150.9[/C][C]154.1233[/C][C]143.0701[/C][C]165.1766[/C][C]0.2838[/C][C]0.773[/C][C]0.9942[/C][C]0.9592[/C][/ROW]
[ROW][C]73[/C][C]141[/C][C]140.3349[/C][C]128.7612[/C][C]151.9086[/C][C]0.4552[/C][C]0.0368[/C][C]0.9628[/C][C]0.251[/C][/ROW]
[ROW][C]74[/C][C]138.9[/C][C]141.8656[/C][C]129.8043[/C][C]153.9269[/C][C]0.3149[/C][C]0.5559[/C][C]0.9613[/C][C]0.3462[/C][/ROW]
[ROW][C]75[/C][C]157.4[/C][C]161.4973[/C][C]148.9771[/C][C]174.0175[/C][C]0.2606[/C][C]0.9998[/C][C]0.9057[/C][C]0.9965[/C][/ROW]
[ROW][C]76[/C][C]142.9[/C][C]147.7706[/C][C]134.8171[/C][C]160.724[/C][C]0.2306[/C][C]0.0726[/C][C]0.9807[/C][C]0.7003[/C][/ROW]
[ROW][C]77[/C][C]151.7[/C][C]151.3627[/C][C]137.9988[/C][C]164.7267[/C][C]0.4803[/C][C]0.8927[/C][C]0.8566[/C][C]0.8499[/C][/ROW]
[ROW][C]78[/C][C]161[/C][C]164.091[/C][C]150.3372[/C][C]177.8447[/C][C]0.3298[/C][C]0.9613[/C][C]0.8784[/C][C]0.9976[/C][/ROW]
[ROW][C]79[/C][C]138.6[/C][C]133.6373[/C][C]119.5125[/C][C]147.7622[/C][C]0.2455[/C][C]1e-04[/C][C]0.9243[/C][C]0.0695[/C][/ROW]
[ROW][C]80[/C][C]136[/C][C]138.706[/C][C]124.2272[/C][C]153.1847[/C][C]0.3571[/C][C]0.5057[/C][C]0.9245[/C][C]0.2244[/C][/ROW]
[ROW][C]81[/C][C]151.9[/C][C]156.4664[/C][C]141.6494[/C][C]171.2834[/C][C]0.2729[/C][C]0.9966[/C][C]0.9462[/C][C]0.9462[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=7762&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7762&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[69])
57134.4-------
58126.8-------
59135.6-------
60139.9-------
61129.8-------
62131-------
63153.1-------
64134.1-------
65144.1-------
66155.9-------
67123.3-------
68128.1-------
69144.3-------
70153144.7209134.8294154.61250.05050.53320.99980.5332
71149.9148.9807138.486159.47540.43180.22640.99380.809
72150.9154.1233143.0701165.17660.28380.7730.99420.9592
73141140.3349128.7612151.90860.45520.03680.96280.251
74138.9141.8656129.8043153.92690.31490.55590.96130.3462
75157.4161.4973148.9771174.01750.26060.99980.90570.9965
76142.9147.7706134.8171160.7240.23060.07260.98070.7003
77151.7151.3627137.9988164.72670.48030.89270.85660.8499
78161164.091150.3372177.84470.32980.96130.87840.9976
79138.6133.6373119.5125147.76220.24551e-040.92430.0695
80136138.706124.2272153.18470.35710.50570.92450.2244
81151.9156.4664141.6494171.28340.27290.99660.94620.9462







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
700.03490.05720.004868.54295.71192.39
710.03590.00625e-040.84510.07040.2654
720.0366-0.02090.001710.390.86580.9305
730.04210.00474e-040.44240.03690.192
740.0434-0.02090.00178.79470.73290.8561
750.0396-0.02540.002116.7881.3991.1828
760.0447-0.0330.002723.72251.97691.406
770.0450.00222e-040.11370.00950.0974
780.0428-0.01880.00169.55410.79620.8923
790.05390.03710.003124.6282.05231.4326
800.0533-0.01950.00167.32230.61020.7811
810.0483-0.02920.002420.85211.73771.3182

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
70 & 0.0349 & 0.0572 & 0.0048 & 68.5429 & 5.7119 & 2.39 \tabularnewline
71 & 0.0359 & 0.0062 & 5e-04 & 0.8451 & 0.0704 & 0.2654 \tabularnewline
72 & 0.0366 & -0.0209 & 0.0017 & 10.39 & 0.8658 & 0.9305 \tabularnewline
73 & 0.0421 & 0.0047 & 4e-04 & 0.4424 & 0.0369 & 0.192 \tabularnewline
74 & 0.0434 & -0.0209 & 0.0017 & 8.7947 & 0.7329 & 0.8561 \tabularnewline
75 & 0.0396 & -0.0254 & 0.0021 & 16.788 & 1.399 & 1.1828 \tabularnewline
76 & 0.0447 & -0.033 & 0.0027 & 23.7225 & 1.9769 & 1.406 \tabularnewline
77 & 0.045 & 0.0022 & 2e-04 & 0.1137 & 0.0095 & 0.0974 \tabularnewline
78 & 0.0428 & -0.0188 & 0.0016 & 9.5541 & 0.7962 & 0.8923 \tabularnewline
79 & 0.0539 & 0.0371 & 0.0031 & 24.628 & 2.0523 & 1.4326 \tabularnewline
80 & 0.0533 & -0.0195 & 0.0016 & 7.3223 & 0.6102 & 0.7811 \tabularnewline
81 & 0.0483 & -0.0292 & 0.0024 & 20.8521 & 1.7377 & 1.3182 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=7762&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]70[/C][C]0.0349[/C][C]0.0572[/C][C]0.0048[/C][C]68.5429[/C][C]5.7119[/C][C]2.39[/C][/ROW]
[ROW][C]71[/C][C]0.0359[/C][C]0.0062[/C][C]5e-04[/C][C]0.8451[/C][C]0.0704[/C][C]0.2654[/C][/ROW]
[ROW][C]72[/C][C]0.0366[/C][C]-0.0209[/C][C]0.0017[/C][C]10.39[/C][C]0.8658[/C][C]0.9305[/C][/ROW]
[ROW][C]73[/C][C]0.0421[/C][C]0.0047[/C][C]4e-04[/C][C]0.4424[/C][C]0.0369[/C][C]0.192[/C][/ROW]
[ROW][C]74[/C][C]0.0434[/C][C]-0.0209[/C][C]0.0017[/C][C]8.7947[/C][C]0.7329[/C][C]0.8561[/C][/ROW]
[ROW][C]75[/C][C]0.0396[/C][C]-0.0254[/C][C]0.0021[/C][C]16.788[/C][C]1.399[/C][C]1.1828[/C][/ROW]
[ROW][C]76[/C][C]0.0447[/C][C]-0.033[/C][C]0.0027[/C][C]23.7225[/C][C]1.9769[/C][C]1.406[/C][/ROW]
[ROW][C]77[/C][C]0.045[/C][C]0.0022[/C][C]2e-04[/C][C]0.1137[/C][C]0.0095[/C][C]0.0974[/C][/ROW]
[ROW][C]78[/C][C]0.0428[/C][C]-0.0188[/C][C]0.0016[/C][C]9.5541[/C][C]0.7962[/C][C]0.8923[/C][/ROW]
[ROW][C]79[/C][C]0.0539[/C][C]0.0371[/C][C]0.0031[/C][C]24.628[/C][C]2.0523[/C][C]1.4326[/C][/ROW]
[ROW][C]80[/C][C]0.0533[/C][C]-0.0195[/C][C]0.0016[/C][C]7.3223[/C][C]0.6102[/C][C]0.7811[/C][/ROW]
[ROW][C]81[/C][C]0.0483[/C][C]-0.0292[/C][C]0.0024[/C][C]20.8521[/C][C]1.7377[/C][C]1.3182[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=7762&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=7762&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
700.03490.05720.004868.54295.71192.39
710.03590.00625e-040.84510.07040.2654
720.0366-0.02090.001710.390.86580.9305
730.04210.00474e-040.44240.03690.192
740.0434-0.02090.00178.79470.73290.8561
750.0396-0.02540.002116.7881.3991.1828
760.0447-0.0330.002723.72251.97691.406
770.0450.00222e-040.11370.00950.0974
780.0428-0.01880.00169.55410.79620.8923
790.05390.03710.003124.6282.05231.4326
800.0533-0.01950.00167.32230.61020.7811
810.0483-0.02920.002420.85211.73771.3182



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