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 14:52:04 +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/t12913878477hv27t7epshvkmo.htm/, Retrieved Tue, 07 May 2024 23:39:46 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=104841, Retrieved Tue, 07 May 2024 23:39:46 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact64
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]
-   PD        [ARIMA Forecasting] [Workshop 9] [2010-12-03 14:52:04] [ecfb965f5669057f3ac5b58964283289] [Current]
Feedback Forum

Post a new message
Dataseries X:
63.152
60.106
72.616
73.159
68.848
77.056
62.246
60.777
64.513
58.353
56.511
44.554
71.414
65.719
80.997
69.826
65.386
75.589
65.520
59.003
63.961
59.716
57.520
42.886
69.805
64.656
80.353
71.321
76.577
81.580
71.127
63.478
48.152
69.236
57.038
43.621
69.551
72.009
72.140
81.519
73.310
80.406
70.697
59.328
68.281
70.041
51.244
46.538
61.443
62.256
73.117
74.155
65.191
77.889
68.688
59.983
65.470
65.089
54.795
47.123




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

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104841&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[48])
3643.621-------
3769.551-------
3872.009-------
3972.14-------
4081.519-------
4173.31-------
4280.406-------
4370.697-------
4459.328-------
4568.281-------
4670.041-------
4751.244-------
4846.538-------
4961.44369.113958.134180.09370.085410.46891
5062.25667.495356.515578.47510.17480.860.21020.9999
5173.11775.851864.87286.83170.31270.99240.74621
5274.15575.864.820286.77980.38450.6840.15371
5365.19172.263361.283583.24310.10340.36780.42591
5477.88979.474868.49590.45460.38860.99460.4341
5568.68868.857757.877979.83750.48790.05350.37131
5659.98360.549249.569471.5290.45970.07310.58630.9938
5765.4761.780950.801172.76070.25510.62590.1230.9967
5865.08966.59655.616277.57580.3940.57970.26930.9998
5954.79554.497543.517765.47730.47880.02930.71930.9223
6047.12344.902433.922655.88220.34590.03870.38520.3852

\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[48]) \tabularnewline
36 & 43.621 & - & - & - & - & - & - & - \tabularnewline
37 & 69.551 & - & - & - & - & - & - & - \tabularnewline
38 & 72.009 & - & - & - & - & - & - & - \tabularnewline
39 & 72.14 & - & - & - & - & - & - & - \tabularnewline
40 & 81.519 & - & - & - & - & - & - & - \tabularnewline
41 & 73.31 & - & - & - & - & - & - & - \tabularnewline
42 & 80.406 & - & - & - & - & - & - & - \tabularnewline
43 & 70.697 & - & - & - & - & - & - & - \tabularnewline
44 & 59.328 & - & - & - & - & - & - & - \tabularnewline
45 & 68.281 & - & - & - & - & - & - & - \tabularnewline
46 & 70.041 & - & - & - & - & - & - & - \tabularnewline
47 & 51.244 & - & - & - & - & - & - & - \tabularnewline
48 & 46.538 & - & - & - & - & - & - & - \tabularnewline
49 & 61.443 & 69.1139 & 58.1341 & 80.0937 & 0.0854 & 1 & 0.4689 & 1 \tabularnewline
50 & 62.256 & 67.4953 & 56.5155 & 78.4751 & 0.1748 & 0.86 & 0.2102 & 0.9999 \tabularnewline
51 & 73.117 & 75.8518 & 64.872 & 86.8317 & 0.3127 & 0.9924 & 0.7462 & 1 \tabularnewline
52 & 74.155 & 75.8 & 64.8202 & 86.7798 & 0.3845 & 0.684 & 0.1537 & 1 \tabularnewline
53 & 65.191 & 72.2633 & 61.2835 & 83.2431 & 0.1034 & 0.3678 & 0.4259 & 1 \tabularnewline
54 & 77.889 & 79.4748 & 68.495 & 90.4546 & 0.3886 & 0.9946 & 0.434 & 1 \tabularnewline
55 & 68.688 & 68.8577 & 57.8779 & 79.8375 & 0.4879 & 0.0535 & 0.3713 & 1 \tabularnewline
56 & 59.983 & 60.5492 & 49.5694 & 71.529 & 0.4597 & 0.0731 & 0.5863 & 0.9938 \tabularnewline
57 & 65.47 & 61.7809 & 50.8011 & 72.7607 & 0.2551 & 0.6259 & 0.123 & 0.9967 \tabularnewline
58 & 65.089 & 66.596 & 55.6162 & 77.5758 & 0.394 & 0.5797 & 0.2693 & 0.9998 \tabularnewline
59 & 54.795 & 54.4975 & 43.5177 & 65.4773 & 0.4788 & 0.0293 & 0.7193 & 0.9223 \tabularnewline
60 & 47.123 & 44.9024 & 33.9226 & 55.8822 & 0.3459 & 0.0387 & 0.3852 & 0.3852 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104841&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[48])[/C][/ROW]
[ROW][C]36[/C][C]43.621[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]37[/C][C]69.551[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]38[/C][C]72.009[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]39[/C][C]72.14[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]40[/C][C]81.519[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]41[/C][C]73.31[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]42[/C][C]80.406[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]43[/C][C]70.697[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]44[/C][C]59.328[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]45[/C][C]68.281[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]46[/C][C]70.041[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]47[/C][C]51.244[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]48[/C][C]46.538[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]61.443[/C][C]69.1139[/C][C]58.1341[/C][C]80.0937[/C][C]0.0854[/C][C]1[/C][C]0.4689[/C][C]1[/C][/ROW]
[ROW][C]50[/C][C]62.256[/C][C]67.4953[/C][C]56.5155[/C][C]78.4751[/C][C]0.1748[/C][C]0.86[/C][C]0.2102[/C][C]0.9999[/C][/ROW]
[ROW][C]51[/C][C]73.117[/C][C]75.8518[/C][C]64.872[/C][C]86.8317[/C][C]0.3127[/C][C]0.9924[/C][C]0.7462[/C][C]1[/C][/ROW]
[ROW][C]52[/C][C]74.155[/C][C]75.8[/C][C]64.8202[/C][C]86.7798[/C][C]0.3845[/C][C]0.684[/C][C]0.1537[/C][C]1[/C][/ROW]
[ROW][C]53[/C][C]65.191[/C][C]72.2633[/C][C]61.2835[/C][C]83.2431[/C][C]0.1034[/C][C]0.3678[/C][C]0.4259[/C][C]1[/C][/ROW]
[ROW][C]54[/C][C]77.889[/C][C]79.4748[/C][C]68.495[/C][C]90.4546[/C][C]0.3886[/C][C]0.9946[/C][C]0.434[/C][C]1[/C][/ROW]
[ROW][C]55[/C][C]68.688[/C][C]68.8577[/C][C]57.8779[/C][C]79.8375[/C][C]0.4879[/C][C]0.0535[/C][C]0.3713[/C][C]1[/C][/ROW]
[ROW][C]56[/C][C]59.983[/C][C]60.5492[/C][C]49.5694[/C][C]71.529[/C][C]0.4597[/C][C]0.0731[/C][C]0.5863[/C][C]0.9938[/C][/ROW]
[ROW][C]57[/C][C]65.47[/C][C]61.7809[/C][C]50.8011[/C][C]72.7607[/C][C]0.2551[/C][C]0.6259[/C][C]0.123[/C][C]0.9967[/C][/ROW]
[ROW][C]58[/C][C]65.089[/C][C]66.596[/C][C]55.6162[/C][C]77.5758[/C][C]0.394[/C][C]0.5797[/C][C]0.2693[/C][C]0.9998[/C][/ROW]
[ROW][C]59[/C][C]54.795[/C][C]54.4975[/C][C]43.5177[/C][C]65.4773[/C][C]0.4788[/C][C]0.0293[/C][C]0.7193[/C][C]0.9223[/C][/ROW]
[ROW][C]60[/C][C]47.123[/C][C]44.9024[/C][C]33.9226[/C][C]55.8822[/C][C]0.3459[/C][C]0.0387[/C][C]0.3852[/C][C]0.3852[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104841&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104841&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[48])
3643.621-------
3769.551-------
3872.009-------
3972.14-------
4081.519-------
4173.31-------
4280.406-------
4370.697-------
4459.328-------
4568.281-------
4670.041-------
4751.244-------
4846.538-------
4961.44369.113958.134180.09370.085410.46891
5062.25667.495356.515578.47510.17480.860.21020.9999
5173.11775.851864.87286.83170.31270.99240.74621
5274.15575.864.820286.77980.38450.6840.15371
5365.19172.263361.283583.24310.10340.36780.42591
5477.88979.474868.49590.45460.38860.99460.4341
5568.68868.857757.877979.83750.48790.05350.37131
5659.98360.549249.569471.5290.45970.07310.58630.9938
5765.4761.780950.801172.76070.25510.62590.1230.9967
5865.08966.59655.616277.57580.3940.57970.26930.9998
5954.79554.497543.517765.47730.47880.02930.71930.9223
6047.12344.902433.922655.88220.34590.03870.38520.3852







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
490.0811-0.111058.842200
500.083-0.07760.094327.450643.14646.5686
510.0739-0.03610.07497.479431.25745.5908
520.0739-0.02170.06162.70624.11954.9112
530.0775-0.09790.068850.017429.29915.4129
540.0705-0.020.06072.514824.8354.9835
550.0814-0.00250.05240.028821.29134.6142
560.0925-0.00940.0470.320618.674.3209
570.09070.05970.048413.609318.10774.2553
580.0841-0.02260.04582.27116.5244.065
590.10280.00550.04220.088515.02993.8768
600.12480.04950.04284.93114.18833.7667

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
49 & 0.0811 & -0.111 & 0 & 58.8422 & 0 & 0 \tabularnewline
50 & 0.083 & -0.0776 & 0.0943 & 27.4506 & 43.1464 & 6.5686 \tabularnewline
51 & 0.0739 & -0.0361 & 0.0749 & 7.4794 & 31.2574 & 5.5908 \tabularnewline
52 & 0.0739 & -0.0217 & 0.0616 & 2.706 & 24.1195 & 4.9112 \tabularnewline
53 & 0.0775 & -0.0979 & 0.0688 & 50.0174 & 29.2991 & 5.4129 \tabularnewline
54 & 0.0705 & -0.02 & 0.0607 & 2.5148 & 24.835 & 4.9835 \tabularnewline
55 & 0.0814 & -0.0025 & 0.0524 & 0.0288 & 21.2913 & 4.6142 \tabularnewline
56 & 0.0925 & -0.0094 & 0.047 & 0.3206 & 18.67 & 4.3209 \tabularnewline
57 & 0.0907 & 0.0597 & 0.0484 & 13.6093 & 18.1077 & 4.2553 \tabularnewline
58 & 0.0841 & -0.0226 & 0.0458 & 2.271 & 16.524 & 4.065 \tabularnewline
59 & 0.1028 & 0.0055 & 0.0422 & 0.0885 & 15.0299 & 3.8768 \tabularnewline
60 & 0.1248 & 0.0495 & 0.0428 & 4.931 & 14.1883 & 3.7667 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=104841&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]49[/C][C]0.0811[/C][C]-0.111[/C][C]0[/C][C]58.8422[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]50[/C][C]0.083[/C][C]-0.0776[/C][C]0.0943[/C][C]27.4506[/C][C]43.1464[/C][C]6.5686[/C][/ROW]
[ROW][C]51[/C][C]0.0739[/C][C]-0.0361[/C][C]0.0749[/C][C]7.4794[/C][C]31.2574[/C][C]5.5908[/C][/ROW]
[ROW][C]52[/C][C]0.0739[/C][C]-0.0217[/C][C]0.0616[/C][C]2.706[/C][C]24.1195[/C][C]4.9112[/C][/ROW]
[ROW][C]53[/C][C]0.0775[/C][C]-0.0979[/C][C]0.0688[/C][C]50.0174[/C][C]29.2991[/C][C]5.4129[/C][/ROW]
[ROW][C]54[/C][C]0.0705[/C][C]-0.02[/C][C]0.0607[/C][C]2.5148[/C][C]24.835[/C][C]4.9835[/C][/ROW]
[ROW][C]55[/C][C]0.0814[/C][C]-0.0025[/C][C]0.0524[/C][C]0.0288[/C][C]21.2913[/C][C]4.6142[/C][/ROW]
[ROW][C]56[/C][C]0.0925[/C][C]-0.0094[/C][C]0.047[/C][C]0.3206[/C][C]18.67[/C][C]4.3209[/C][/ROW]
[ROW][C]57[/C][C]0.0907[/C][C]0.0597[/C][C]0.0484[/C][C]13.6093[/C][C]18.1077[/C][C]4.2553[/C][/ROW]
[ROW][C]58[/C][C]0.0841[/C][C]-0.0226[/C][C]0.0458[/C][C]2.271[/C][C]16.524[/C][C]4.065[/C][/ROW]
[ROW][C]59[/C][C]0.1028[/C][C]0.0055[/C][C]0.0422[/C][C]0.0885[/C][C]15.0299[/C][C]3.8768[/C][/ROW]
[ROW][C]60[/C][C]0.1248[/C][C]0.0495[/C][C]0.0428[/C][C]4.931[/C][C]14.1883[/C][C]3.7667[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=104841&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=104841&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
490.0811-0.111058.842200
500.083-0.07760.094327.450643.14646.5686
510.0739-0.03610.07497.479431.25745.5908
520.0739-0.02170.06162.70624.11954.9112
530.0775-0.09790.068850.017429.29915.4129
540.0705-0.020.06072.514824.8354.9835
550.0814-0.00250.05240.028821.29134.6142
560.0925-0.00940.0470.320618.674.3209
570.09070.05970.048413.609318.10774.2553
580.0841-0.02260.04582.27116.5244.065
590.10280.00550.04220.088515.02993.8768
600.12480.04950.04284.93114.18833.7667



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