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, 03 Dec 2010 15:46:30 +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/03/t1291391081h7811yxlk16ku3r.htm/, Retrieved Tue, 07 May 2024 09:16:39 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=104881, Retrieved Tue, 07 May 2024 09:16:39 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact118
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]
- R PD        [ARIMA Forecasting] [arima forecasting...] [2010-12-03 15:46:30] [e926a978b40506c05812140b9c5157ab] [Current]
Feedback Forum

Post a new message
Dataseries X:
9769
9321
9939
9336
10195
9464
10010
10213
9563
9890
9305
9391
9928
8686
9843
9627
10074
9503
10119
10000
9313
9866
9172
9241
9659
8904
9755
9080
9435
8971
10063
9793
9454
9759
8820
9403
9676
8642
9402
9610
9294
9448
10319
9548
9801
9596
8923
9746
9829
9125
9782
9441
9162
9915
10444
10209
9985
9842
9429
10132
9849
9172
10313
9819
9955
10048
10082
10541
10208
10233
9439
9963
10158
9225
10474
9757
10490
10281
10444
10640
10695
10786
9832
9747
10411
9511
10402
9701
10540
10112
10915
11183
10384
10834
9886
10216




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time2 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24

\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 & 'Sir Ronald Aylmer Fisher' @ 193.190.124.24 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104881&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]'Sir Ronald Aylmer Fisher' @ 193.190.124.24[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104881&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104881&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'Sir Ronald Aylmer Fisher' @ 193.190.124.24







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[84])
729963-------
7310158-------
749225-------
7510474-------
769757-------
7710490-------
7810281-------
7910444-------
8010640-------
8110695-------
8210786-------
839832-------
849747-------
851041110373.83499851.354510896.31530.44460.99070.79090.9907
8695119506.72158976.621110036.82190.49374e-040.85120.1872
871040210599.959310062.34711137.57170.235210.6770.9991
88970110002.61519457.594310547.63590.1390.07550.81150.821
891054010576.946210024.616311129.27610.44780.99910.62120.9984
901011210363.57099804.027410923.11440.18910.26830.61380.9846
911091510688.979810122.314511255.64510.21720.9770.80160.9994
921118310786.322110212.623411360.02080.08770.33010.69140.9998
931038410681.350310100.703311261.99720.15780.04520.48160.9992
941083410802.173910214.660911389.68690.45770.91850.52150.9998
9598869953.53889359.239110547.83850.41190.00180.65570.7521
961021610049.39639448.386510650.40610.29350.70290.8380.838

\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[84]) \tabularnewline
72 & 9963 & - & - & - & - & - & - & - \tabularnewline
73 & 10158 & - & - & - & - & - & - & - \tabularnewline
74 & 9225 & - & - & - & - & - & - & - \tabularnewline
75 & 10474 & - & - & - & - & - & - & - \tabularnewline
76 & 9757 & - & - & - & - & - & - & - \tabularnewline
77 & 10490 & - & - & - & - & - & - & - \tabularnewline
78 & 10281 & - & - & - & - & - & - & - \tabularnewline
79 & 10444 & - & - & - & - & - & - & - \tabularnewline
80 & 10640 & - & - & - & - & - & - & - \tabularnewline
81 & 10695 & - & - & - & - & - & - & - \tabularnewline
82 & 10786 & - & - & - & - & - & - & - \tabularnewline
83 & 9832 & - & - & - & - & - & - & - \tabularnewline
84 & 9747 & - & - & - & - & - & - & - \tabularnewline
85 & 10411 & 10373.8349 & 9851.3545 & 10896.3153 & 0.4446 & 0.9907 & 0.7909 & 0.9907 \tabularnewline
86 & 9511 & 9506.7215 & 8976.6211 & 10036.8219 & 0.4937 & 4e-04 & 0.8512 & 0.1872 \tabularnewline
87 & 10402 & 10599.9593 & 10062.347 & 11137.5717 & 0.2352 & 1 & 0.677 & 0.9991 \tabularnewline
88 & 9701 & 10002.6151 & 9457.5943 & 10547.6359 & 0.139 & 0.0755 & 0.8115 & 0.821 \tabularnewline
89 & 10540 & 10576.9462 & 10024.6163 & 11129.2761 & 0.4478 & 0.9991 & 0.6212 & 0.9984 \tabularnewline
90 & 10112 & 10363.5709 & 9804.0274 & 10923.1144 & 0.1891 & 0.2683 & 0.6138 & 0.9846 \tabularnewline
91 & 10915 & 10688.9798 & 10122.3145 & 11255.6451 & 0.2172 & 0.977 & 0.8016 & 0.9994 \tabularnewline
92 & 11183 & 10786.3221 & 10212.6234 & 11360.0208 & 0.0877 & 0.3301 & 0.6914 & 0.9998 \tabularnewline
93 & 10384 & 10681.3503 & 10100.7033 & 11261.9972 & 0.1578 & 0.0452 & 0.4816 & 0.9992 \tabularnewline
94 & 10834 & 10802.1739 & 10214.6609 & 11389.6869 & 0.4577 & 0.9185 & 0.5215 & 0.9998 \tabularnewline
95 & 9886 & 9953.5388 & 9359.2391 & 10547.8385 & 0.4119 & 0.0018 & 0.6557 & 0.7521 \tabularnewline
96 & 10216 & 10049.3963 & 9448.3865 & 10650.4061 & 0.2935 & 0.7029 & 0.838 & 0.838 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104881&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[84])[/C][/ROW]
[ROW][C]72[/C][C]9963[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]73[/C][C]10158[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]74[/C][C]9225[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]75[/C][C]10474[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]76[/C][C]9757[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]77[/C][C]10490[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]78[/C][C]10281[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]79[/C][C]10444[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]80[/C][C]10640[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]81[/C][C]10695[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]82[/C][C]10786[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]83[/C][C]9832[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]84[/C][C]9747[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]85[/C][C]10411[/C][C]10373.8349[/C][C]9851.3545[/C][C]10896.3153[/C][C]0.4446[/C][C]0.9907[/C][C]0.7909[/C][C]0.9907[/C][/ROW]
[ROW][C]86[/C][C]9511[/C][C]9506.7215[/C][C]8976.6211[/C][C]10036.8219[/C][C]0.4937[/C][C]4e-04[/C][C]0.8512[/C][C]0.1872[/C][/ROW]
[ROW][C]87[/C][C]10402[/C][C]10599.9593[/C][C]10062.347[/C][C]11137.5717[/C][C]0.2352[/C][C]1[/C][C]0.677[/C][C]0.9991[/C][/ROW]
[ROW][C]88[/C][C]9701[/C][C]10002.6151[/C][C]9457.5943[/C][C]10547.6359[/C][C]0.139[/C][C]0.0755[/C][C]0.8115[/C][C]0.821[/C][/ROW]
[ROW][C]89[/C][C]10540[/C][C]10576.9462[/C][C]10024.6163[/C][C]11129.2761[/C][C]0.4478[/C][C]0.9991[/C][C]0.6212[/C][C]0.9984[/C][/ROW]
[ROW][C]90[/C][C]10112[/C][C]10363.5709[/C][C]9804.0274[/C][C]10923.1144[/C][C]0.1891[/C][C]0.2683[/C][C]0.6138[/C][C]0.9846[/C][/ROW]
[ROW][C]91[/C][C]10915[/C][C]10688.9798[/C][C]10122.3145[/C][C]11255.6451[/C][C]0.2172[/C][C]0.977[/C][C]0.8016[/C][C]0.9994[/C][/ROW]
[ROW][C]92[/C][C]11183[/C][C]10786.3221[/C][C]10212.6234[/C][C]11360.0208[/C][C]0.0877[/C][C]0.3301[/C][C]0.6914[/C][C]0.9998[/C][/ROW]
[ROW][C]93[/C][C]10384[/C][C]10681.3503[/C][C]10100.7033[/C][C]11261.9972[/C][C]0.1578[/C][C]0.0452[/C][C]0.4816[/C][C]0.9992[/C][/ROW]
[ROW][C]94[/C][C]10834[/C][C]10802.1739[/C][C]10214.6609[/C][C]11389.6869[/C][C]0.4577[/C][C]0.9185[/C][C]0.5215[/C][C]0.9998[/C][/ROW]
[ROW][C]95[/C][C]9886[/C][C]9953.5388[/C][C]9359.2391[/C][C]10547.8385[/C][C]0.4119[/C][C]0.0018[/C][C]0.6557[/C][C]0.7521[/C][/ROW]
[ROW][C]96[/C][C]10216[/C][C]10049.3963[/C][C]9448.3865[/C][C]10650.4061[/C][C]0.2935[/C][C]0.7029[/C][C]0.838[/C][C]0.838[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104881&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104881&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[84])
729963-------
7310158-------
749225-------
7510474-------
769757-------
7710490-------
7810281-------
7910444-------
8010640-------
8110695-------
8210786-------
839832-------
849747-------
851041110373.83499851.354510896.31530.44460.99070.79090.9907
8695119506.72158976.621110036.82190.49374e-040.85120.1872
871040210599.959310062.34711137.57170.235210.6770.9991
88970110002.61519457.594310547.63590.1390.07550.81150.821
891054010576.946210024.616311129.27610.44780.99910.62120.9984
901011210363.57099804.027410923.11440.18910.26830.61380.9846
911091510688.979810122.314511255.64510.21720.9770.80160.9994
921118310786.322110212.623411360.02080.08770.33010.69140.9998
931038410681.350310100.703311261.99720.15780.04520.48160.9992
941083410802.173910214.660911389.68690.45770.91850.52150.9998
9598869953.53889359.239110547.83850.41190.00180.65570.7521
961021610049.39639448.386510650.40610.29350.70290.8380.838







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
850.02570.003601381.245700
860.02845e-040.00218.3055699.775626.4533
870.0259-0.01870.007639187.894913529.1487116.3149
880.0278-0.03020.013290971.654932889.7753181.3554
890.0266-0.00350.01131365.023226584.8248163.0485
900.0275-0.02430.013463287.913632702.0063180.837
910.0270.02110.014551085.148835328.1695187.9579
920.02710.03680.0173157353.346750581.3167224.9029
930.0277-0.02780.018588417.176754785.3011234.0626
940.02770.00290.01691012.901449408.0611222.2792
950.0305-0.00680.0164561.491945331.1003212.911
960.03050.01660.016127756.793143866.5747209.4435

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
85 & 0.0257 & 0.0036 & 0 & 1381.2457 & 0 & 0 \tabularnewline
86 & 0.0284 & 5e-04 & 0.002 & 18.3055 & 699.7756 & 26.4533 \tabularnewline
87 & 0.0259 & -0.0187 & 0.0076 & 39187.8949 & 13529.1487 & 116.3149 \tabularnewline
88 & 0.0278 & -0.0302 & 0.0132 & 90971.6549 & 32889.7753 & 181.3554 \tabularnewline
89 & 0.0266 & -0.0035 & 0.0113 & 1365.0232 & 26584.8248 & 163.0485 \tabularnewline
90 & 0.0275 & -0.0243 & 0.0134 & 63287.9136 & 32702.0063 & 180.837 \tabularnewline
91 & 0.027 & 0.0211 & 0.0145 & 51085.1488 & 35328.1695 & 187.9579 \tabularnewline
92 & 0.0271 & 0.0368 & 0.0173 & 157353.3467 & 50581.3167 & 224.9029 \tabularnewline
93 & 0.0277 & -0.0278 & 0.0185 & 88417.1767 & 54785.3011 & 234.0626 \tabularnewline
94 & 0.0277 & 0.0029 & 0.0169 & 1012.9014 & 49408.0611 & 222.2792 \tabularnewline
95 & 0.0305 & -0.0068 & 0.016 & 4561.4919 & 45331.1003 & 212.911 \tabularnewline
96 & 0.0305 & 0.0166 & 0.0161 & 27756.7931 & 43866.5747 & 209.4435 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104881&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]85[/C][C]0.0257[/C][C]0.0036[/C][C]0[/C][C]1381.2457[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]86[/C][C]0.0284[/C][C]5e-04[/C][C]0.002[/C][C]18.3055[/C][C]699.7756[/C][C]26.4533[/C][/ROW]
[ROW][C]87[/C][C]0.0259[/C][C]-0.0187[/C][C]0.0076[/C][C]39187.8949[/C][C]13529.1487[/C][C]116.3149[/C][/ROW]
[ROW][C]88[/C][C]0.0278[/C][C]-0.0302[/C][C]0.0132[/C][C]90971.6549[/C][C]32889.7753[/C][C]181.3554[/C][/ROW]
[ROW][C]89[/C][C]0.0266[/C][C]-0.0035[/C][C]0.0113[/C][C]1365.0232[/C][C]26584.8248[/C][C]163.0485[/C][/ROW]
[ROW][C]90[/C][C]0.0275[/C][C]-0.0243[/C][C]0.0134[/C][C]63287.9136[/C][C]32702.0063[/C][C]180.837[/C][/ROW]
[ROW][C]91[/C][C]0.027[/C][C]0.0211[/C][C]0.0145[/C][C]51085.1488[/C][C]35328.1695[/C][C]187.9579[/C][/ROW]
[ROW][C]92[/C][C]0.0271[/C][C]0.0368[/C][C]0.0173[/C][C]157353.3467[/C][C]50581.3167[/C][C]224.9029[/C][/ROW]
[ROW][C]93[/C][C]0.0277[/C][C]-0.0278[/C][C]0.0185[/C][C]88417.1767[/C][C]54785.3011[/C][C]234.0626[/C][/ROW]
[ROW][C]94[/C][C]0.0277[/C][C]0.0029[/C][C]0.0169[/C][C]1012.9014[/C][C]49408.0611[/C][C]222.2792[/C][/ROW]
[ROW][C]95[/C][C]0.0305[/C][C]-0.0068[/C][C]0.016[/C][C]4561.4919[/C][C]45331.1003[/C][C]212.911[/C][/ROW]
[ROW][C]96[/C][C]0.0305[/C][C]0.0166[/C][C]0.0161[/C][C]27756.7931[/C][C]43866.5747[/C][C]209.4435[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104881&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104881&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
850.02570.003601381.245700
860.02845e-040.00218.3055699.775626.4533
870.0259-0.01870.007639187.894913529.1487116.3149
880.0278-0.03020.013290971.654932889.7753181.3554
890.0266-0.00350.01131365.023226584.8248163.0485
900.0275-0.02430.013463287.913632702.0063180.837
910.0270.02110.014551085.148835328.1695187.9579
920.02710.03680.0173157353.346750581.3167224.9029
930.0277-0.02780.018588417.176754785.3011234.0626
940.02770.00290.01691012.901449408.0611222.2792
950.0305-0.00680.0164561.491945331.1003212.911
960.03050.01660.016127756.793143866.5747209.4435



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