Free Statistics

of Irreproducible Research!

Author's title

Author*Unverified author*
R Software Modulerwasp_arimaforecasting.wasp
Title produced by softwareARIMA Forecasting
Date of computationThu, 13 Dec 2007 10:01:41 -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/13/t1197564490gyetf3tl3b5gfx7.htm/, Retrieved Sun, 05 May 2024 14:47:13 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=3667, Retrieved Sun, 05 May 2024 14:47:13 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact220
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-       [ARIMA Forecasting] [Forecasting 48] [2007-12-13 17:01:41] [1a2581828a3030ed7733053b32a6f065] [Current]
-   PD    [ARIMA Forecasting] [ARIMA Forecasting 48] [2007-12-26 16:39:50] [74be16979710d4c4e7c6647856088456]
Feedback Forum

Post a new message
Dataseries X:
114.9
124.5
142.2
159.7
165.2
198.6
207.8
219.6
239.6
235.3
218.5
213.8
205.5
198.4
198.5
190.2
180.7
193.6
192.8
195.5
197.2
196.9
178.9
172.4
156.4
143.7
153.6
168.8
185.8
199.9
205.4
197.5
199.6
200.5
193.7
179.6
169.1
169.8
195.5
194.8
204.5
203.8
204.8
204.9
240
248.3
258.4
254.9




Summary of compuational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Herman Ole Andreas Wold' @ 193.190.124.10:1001

\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 & 'Herman Ole Andreas Wold' @ 193.190.124.10:1001 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3667&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]'Herman Ole Andreas Wold' @ 193.190.124.10:1001[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3667&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3667&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'Herman Ole Andreas Wold' @ 193.190.124.10:1001







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[36])
24172.4-------
25156.4-------
26143.7-------
27153.6-------
28168.8-------
29185.8-------
30199.9-------
31205.4-------
32197.5-------
33199.6-------
34200.5-------
35193.7-------
36179.6-------
37169.1165.5302146.6831184.37730.35520.07170.82880.0717
38169.8153.1952117.6657188.72460.17980.19010.69980.0726
39195.5152.740498.1924207.28840.06220.26990.48770.1672
40194.8155.071779.2514230.8920.15220.1480.36130.263
41204.5158.349259.1719257.52660.18090.23570.29370.3373
42203.8160.102335.636284.56860.24570.24220.26540.3794
43204.8157.33465.7762308.89290.26970.2740.26710.3867
44204.9147.5228-32.8227327.86820.26650.26680.29350.3637
45240142.9677-67.7681353.70350.18340.28230.29920.3667
46248.3137.7819-104.8688380.43250.1860.20450.30620.3678
47258.4128.5483-147.4731404.56970.17820.19760.32180.3585
48254.9115.4773-195.3107426.26530.18960.18370.3430.343

\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[36]) \tabularnewline
24 & 172.4 & - & - & - & - & - & - & - \tabularnewline
25 & 156.4 & - & - & - & - & - & - & - \tabularnewline
26 & 143.7 & - & - & - & - & - & - & - \tabularnewline
27 & 153.6 & - & - & - & - & - & - & - \tabularnewline
28 & 168.8 & - & - & - & - & - & - & - \tabularnewline
29 & 185.8 & - & - & - & - & - & - & - \tabularnewline
30 & 199.9 & - & - & - & - & - & - & - \tabularnewline
31 & 205.4 & - & - & - & - & - & - & - \tabularnewline
32 & 197.5 & - & - & - & - & - & - & - \tabularnewline
33 & 199.6 & - & - & - & - & - & - & - \tabularnewline
34 & 200.5 & - & - & - & - & - & - & - \tabularnewline
35 & 193.7 & - & - & - & - & - & - & - \tabularnewline
36 & 179.6 & - & - & - & - & - & - & - \tabularnewline
37 & 169.1 & 165.5302 & 146.6831 & 184.3773 & 0.3552 & 0.0717 & 0.8288 & 0.0717 \tabularnewline
38 & 169.8 & 153.1952 & 117.6657 & 188.7246 & 0.1798 & 0.1901 & 0.6998 & 0.0726 \tabularnewline
39 & 195.5 & 152.7404 & 98.1924 & 207.2884 & 0.0622 & 0.2699 & 0.4877 & 0.1672 \tabularnewline
40 & 194.8 & 155.0717 & 79.2514 & 230.892 & 0.1522 & 0.148 & 0.3613 & 0.263 \tabularnewline
41 & 204.5 & 158.3492 & 59.1719 & 257.5266 & 0.1809 & 0.2357 & 0.2937 & 0.3373 \tabularnewline
42 & 203.8 & 160.1023 & 35.636 & 284.5686 & 0.2457 & 0.2422 & 0.2654 & 0.3794 \tabularnewline
43 & 204.8 & 157.3346 & 5.7762 & 308.8929 & 0.2697 & 0.274 & 0.2671 & 0.3867 \tabularnewline
44 & 204.9 & 147.5228 & -32.8227 & 327.8682 & 0.2665 & 0.2668 & 0.2935 & 0.3637 \tabularnewline
45 & 240 & 142.9677 & -67.7681 & 353.7035 & 0.1834 & 0.2823 & 0.2992 & 0.3667 \tabularnewline
46 & 248.3 & 137.7819 & -104.8688 & 380.4325 & 0.186 & 0.2045 & 0.3062 & 0.3678 \tabularnewline
47 & 258.4 & 128.5483 & -147.4731 & 404.5697 & 0.1782 & 0.1976 & 0.3218 & 0.3585 \tabularnewline
48 & 254.9 & 115.4773 & -195.3107 & 426.2653 & 0.1896 & 0.1837 & 0.343 & 0.343 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3667&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[36])[/C][/ROW]
[ROW][C]24[/C][C]172.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]25[/C][C]156.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]26[/C][C]143.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]27[/C][C]153.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]28[/C][C]168.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]29[/C][C]185.8[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]30[/C][C]199.9[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]31[/C][C]205.4[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]32[/C][C]197.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]33[/C][C]199.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]34[/C][C]200.5[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]35[/C][C]193.7[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]36[/C][C]179.6[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]169.1[/C][C]165.5302[/C][C]146.6831[/C][C]184.3773[/C][C]0.3552[/C][C]0.0717[/C][C]0.8288[/C][C]0.0717[/C][/ROW]
[ROW][C]38[/C][C]169.8[/C][C]153.1952[/C][C]117.6657[/C][C]188.7246[/C][C]0.1798[/C][C]0.1901[/C][C]0.6998[/C][C]0.0726[/C][/ROW]
[ROW][C]39[/C][C]195.5[/C][C]152.7404[/C][C]98.1924[/C][C]207.2884[/C][C]0.0622[/C][C]0.2699[/C][C]0.4877[/C][C]0.1672[/C][/ROW]
[ROW][C]40[/C][C]194.8[/C][C]155.0717[/C][C]79.2514[/C][C]230.892[/C][C]0.1522[/C][C]0.148[/C][C]0.3613[/C][C]0.263[/C][/ROW]
[ROW][C]41[/C][C]204.5[/C][C]158.3492[/C][C]59.1719[/C][C]257.5266[/C][C]0.1809[/C][C]0.2357[/C][C]0.2937[/C][C]0.3373[/C][/ROW]
[ROW][C]42[/C][C]203.8[/C][C]160.1023[/C][C]35.636[/C][C]284.5686[/C][C]0.2457[/C][C]0.2422[/C][C]0.2654[/C][C]0.3794[/C][/ROW]
[ROW][C]43[/C][C]204.8[/C][C]157.3346[/C][C]5.7762[/C][C]308.8929[/C][C]0.2697[/C][C]0.274[/C][C]0.2671[/C][C]0.3867[/C][/ROW]
[ROW][C]44[/C][C]204.9[/C][C]147.5228[/C][C]-32.8227[/C][C]327.8682[/C][C]0.2665[/C][C]0.2668[/C][C]0.2935[/C][C]0.3637[/C][/ROW]
[ROW][C]45[/C][C]240[/C][C]142.9677[/C][C]-67.7681[/C][C]353.7035[/C][C]0.1834[/C][C]0.2823[/C][C]0.2992[/C][C]0.3667[/C][/ROW]
[ROW][C]46[/C][C]248.3[/C][C]137.7819[/C][C]-104.8688[/C][C]380.4325[/C][C]0.186[/C][C]0.2045[/C][C]0.3062[/C][C]0.3678[/C][/ROW]
[ROW][C]47[/C][C]258.4[/C][C]128.5483[/C][C]-147.4731[/C][C]404.5697[/C][C]0.1782[/C][C]0.1976[/C][C]0.3218[/C][C]0.3585[/C][/ROW]
[ROW][C]48[/C][C]254.9[/C][C]115.4773[/C][C]-195.3107[/C][C]426.2653[/C][C]0.1896[/C][C]0.1837[/C][C]0.343[/C][C]0.343[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3667&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3667&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[36])
24172.4-------
25156.4-------
26143.7-------
27153.6-------
28168.8-------
29185.8-------
30199.9-------
31205.4-------
32197.5-------
33199.6-------
34200.5-------
35193.7-------
36179.6-------
37169.1165.5302146.6831184.37730.35520.07170.82880.0717
38169.8153.1952117.6657188.72460.17980.19010.69980.0726
39195.5152.740498.1924207.28840.06220.26990.48770.1672
40194.8155.071779.2514230.8920.15220.1480.36130.263
41204.5158.349259.1719257.52660.18090.23570.29370.3373
42203.8160.102335.636284.56860.24570.24220.26540.3794
43204.8157.33465.7762308.89290.26970.2740.26710.3867
44204.9147.5228-32.8227327.86820.26650.26680.29350.3637
45240142.9677-67.7681353.70350.18340.28230.29920.3667
46248.3137.7819-104.8688380.43250.1860.20450.30620.3678
47258.4128.5483-147.4731404.56970.17820.19760.32180.3585
48254.9115.4773-195.3107426.26530.18960.18370.3430.343







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
370.05810.02160.001812.74341.06191.0305
380.11830.10840.009275.720922.97674.7934
390.18220.27990.02331828.3845152.365412.3436
400.24950.25620.02131578.3375131.528111.4686
410.31960.29140.02432129.8928177.491113.3226
420.39660.27290.02271909.488159.12412.6144
430.49150.30170.02512252.9674187.747313.7021
440.62370.38890.03243292.148274.345716.5634
450.7520.67870.05669415.2648784.605428.0108
460.89850.80210.066812214.26021017.85531.9038
471.09551.01010.084216861.46641405.122237.485
481.37311.20740.100619438.69271619.891140.2479

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
37 & 0.0581 & 0.0216 & 0.0018 & 12.7434 & 1.0619 & 1.0305 \tabularnewline
38 & 0.1183 & 0.1084 & 0.009 & 275.7209 & 22.9767 & 4.7934 \tabularnewline
39 & 0.1822 & 0.2799 & 0.0233 & 1828.3845 & 152.3654 & 12.3436 \tabularnewline
40 & 0.2495 & 0.2562 & 0.0213 & 1578.3375 & 131.5281 & 11.4686 \tabularnewline
41 & 0.3196 & 0.2914 & 0.0243 & 2129.8928 & 177.4911 & 13.3226 \tabularnewline
42 & 0.3966 & 0.2729 & 0.0227 & 1909.488 & 159.124 & 12.6144 \tabularnewline
43 & 0.4915 & 0.3017 & 0.0251 & 2252.9674 & 187.7473 & 13.7021 \tabularnewline
44 & 0.6237 & 0.3889 & 0.0324 & 3292.148 & 274.3457 & 16.5634 \tabularnewline
45 & 0.752 & 0.6787 & 0.0566 & 9415.2648 & 784.6054 & 28.0108 \tabularnewline
46 & 0.8985 & 0.8021 & 0.0668 & 12214.2602 & 1017.855 & 31.9038 \tabularnewline
47 & 1.0955 & 1.0101 & 0.0842 & 16861.4664 & 1405.1222 & 37.485 \tabularnewline
48 & 1.3731 & 1.2074 & 0.1006 & 19438.6927 & 1619.8911 & 40.2479 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=3667&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]37[/C][C]0.0581[/C][C]0.0216[/C][C]0.0018[/C][C]12.7434[/C][C]1.0619[/C][C]1.0305[/C][/ROW]
[ROW][C]38[/C][C]0.1183[/C][C]0.1084[/C][C]0.009[/C][C]275.7209[/C][C]22.9767[/C][C]4.7934[/C][/ROW]
[ROW][C]39[/C][C]0.1822[/C][C]0.2799[/C][C]0.0233[/C][C]1828.3845[/C][C]152.3654[/C][C]12.3436[/C][/ROW]
[ROW][C]40[/C][C]0.2495[/C][C]0.2562[/C][C]0.0213[/C][C]1578.3375[/C][C]131.5281[/C][C]11.4686[/C][/ROW]
[ROW][C]41[/C][C]0.3196[/C][C]0.2914[/C][C]0.0243[/C][C]2129.8928[/C][C]177.4911[/C][C]13.3226[/C][/ROW]
[ROW][C]42[/C][C]0.3966[/C][C]0.2729[/C][C]0.0227[/C][C]1909.488[/C][C]159.124[/C][C]12.6144[/C][/ROW]
[ROW][C]43[/C][C]0.4915[/C][C]0.3017[/C][C]0.0251[/C][C]2252.9674[/C][C]187.7473[/C][C]13.7021[/C][/ROW]
[ROW][C]44[/C][C]0.6237[/C][C]0.3889[/C][C]0.0324[/C][C]3292.148[/C][C]274.3457[/C][C]16.5634[/C][/ROW]
[ROW][C]45[/C][C]0.752[/C][C]0.6787[/C][C]0.0566[/C][C]9415.2648[/C][C]784.6054[/C][C]28.0108[/C][/ROW]
[ROW][C]46[/C][C]0.8985[/C][C]0.8021[/C][C]0.0668[/C][C]12214.2602[/C][C]1017.855[/C][C]31.9038[/C][/ROW]
[ROW][C]47[/C][C]1.0955[/C][C]1.0101[/C][C]0.0842[/C][C]16861.4664[/C][C]1405.1222[/C][C]37.485[/C][/ROW]
[ROW][C]48[/C][C]1.3731[/C][C]1.2074[/C][C]0.1006[/C][C]19438.6927[/C][C]1619.8911[/C][C]40.2479[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=3667&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=3667&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
370.05810.02160.001812.74341.06191.0305
380.11830.10840.009275.720922.97674.7934
390.18220.27990.02331828.3845152.365412.3436
400.24950.25620.02131578.3375131.528111.4686
410.31960.29140.02432129.8928177.491113.3226
420.39660.27290.02271909.488159.12412.6144
430.49150.30170.02512252.9674187.747313.7021
440.62370.38890.03243292.148274.345716.5634
450.7520.67870.05669415.2648784.605428.0108
460.89850.80210.066812214.26021017.85531.9038
471.09551.01010.084216861.46641405.122237.485
481.37311.20740.100619438.69271619.891140.2479



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