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 computationSun, 05 Dec 2010 12:46:29 +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/05/t1291553125hgwb5oh7liiazck.htm/, Retrieved Wed, 01 May 2024 19:27:01 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=105369, Retrieved Wed, 01 May 2024 19:27:01 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact147
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Univariate Explorative Data Analysis] [Run Sequence gebo...] [2008-12-12 13:32:37] [76963dc1903f0f612b6153510a3818cf]
- R  D  [Univariate Explorative Data Analysis] [Run Sequence gebo...] [2008-12-17 12:14:40] [76963dc1903f0f612b6153510a3818cf]
-         [Univariate Explorative Data Analysis] [Run Sequence Plot...] [2008-12-22 18:19:51] [1ce0d16c8f4225c977b42c8fa93bc163]
- RMP       [Univariate Data Series] [Identifying Integ...] [2009-11-22 12:08:06] [b98453cac15ba1066b407e146608df68]
- RMP         [Standard Deviation-Mean Plot] [Births] [2010-11-29 10:52:49] [b98453cac15ba1066b407e146608df68]
- RMP           [ARIMA Forecasting] [Births] [2010-11-29 20:53:49] [b98453cac15ba1066b407e146608df68]
-    D              [ARIMA Forecasting] [Arima model faill...] [2010-12-05 12:46:29] [b881b0959d750616b68c30017e4e0761] [Current]
Feedback Forum

Post a new message
Dataseries X:
46
62
66
59
58
61
41
27
58
70
49
59
44
36
72
45
56
54
53
35
61
52
47
51
52
63
74
45
51
64
36
30
55
64
39
40
63
45
59
55
40
64
27
28
45
57
45
69
60
56
58
50
51
53
37
22
55
70
62
58
39
49
58
47
42
62
39
40
72
70
54
65




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time6 seconds
R Server'George Udny Yule' @ 72.249.76.132

\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 & 6 seconds \tabularnewline
R Server & 'George Udny Yule' @ 72.249.76.132 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105369&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]6 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ 72.249.76.132[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=105369&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105369&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 time6 seconds
R Server'George Udny Yule' @ 72.249.76.132







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[60])
4869-------
4960-------
5056-------
5158-------
5250-------
5351-------
5453-------
5537-------
5622-------
5755-------
5870-------
5962-------
6058-------
613953.455936.071470.84040.05160.30420.23030.3042
624952.738435.353370.12360.33670.93930.35650.2765
635865.25247.866882.63710.20680.96650.79320.7932
644750.830933.445868.21610.33290.20950.53730.2095
654251.227333.842168.61250.14910.68320.51020.2226
666258.803441.418376.18860.35930.97090.74350.5361
673938.666221.281156.05140.4850.00430.57450.0146
684027.942110.556945.32730.0870.10630.74854e-04
697254.822837.437672.20790.02640.95270.4920.3601
707063.175945.790880.56110.22080.15990.22080.7202
715449.333531.948366.71860.29940.00990.07660.1643
726555.622738.237573.00780.14520.57260.39430.3943

\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[60]) \tabularnewline
48 & 69 & - & - & - & - & - & - & - \tabularnewline
49 & 60 & - & - & - & - & - & - & - \tabularnewline
50 & 56 & - & - & - & - & - & - & - \tabularnewline
51 & 58 & - & - & - & - & - & - & - \tabularnewline
52 & 50 & - & - & - & - & - & - & - \tabularnewline
53 & 51 & - & - & - & - & - & - & - \tabularnewline
54 & 53 & - & - & - & - & - & - & - \tabularnewline
55 & 37 & - & - & - & - & - & - & - \tabularnewline
56 & 22 & - & - & - & - & - & - & - \tabularnewline
57 & 55 & - & - & - & - & - & - & - \tabularnewline
58 & 70 & - & - & - & - & - & - & - \tabularnewline
59 & 62 & - & - & - & - & - & - & - \tabularnewline
60 & 58 & - & - & - & - & - & - & - \tabularnewline
61 & 39 & 53.4559 & 36.0714 & 70.8404 & 0.0516 & 0.3042 & 0.2303 & 0.3042 \tabularnewline
62 & 49 & 52.7384 & 35.3533 & 70.1236 & 0.3367 & 0.9393 & 0.3565 & 0.2765 \tabularnewline
63 & 58 & 65.252 & 47.8668 & 82.6371 & 0.2068 & 0.9665 & 0.7932 & 0.7932 \tabularnewline
64 & 47 & 50.8309 & 33.4458 & 68.2161 & 0.3329 & 0.2095 & 0.5373 & 0.2095 \tabularnewline
65 & 42 & 51.2273 & 33.8421 & 68.6125 & 0.1491 & 0.6832 & 0.5102 & 0.2226 \tabularnewline
66 & 62 & 58.8034 & 41.4183 & 76.1886 & 0.3593 & 0.9709 & 0.7435 & 0.5361 \tabularnewline
67 & 39 & 38.6662 & 21.2811 & 56.0514 & 0.485 & 0.0043 & 0.5745 & 0.0146 \tabularnewline
68 & 40 & 27.9421 & 10.5569 & 45.3273 & 0.087 & 0.1063 & 0.7485 & 4e-04 \tabularnewline
69 & 72 & 54.8228 & 37.4376 & 72.2079 & 0.0264 & 0.9527 & 0.492 & 0.3601 \tabularnewline
70 & 70 & 63.1759 & 45.7908 & 80.5611 & 0.2208 & 0.1599 & 0.2208 & 0.7202 \tabularnewline
71 & 54 & 49.3335 & 31.9483 & 66.7186 & 0.2994 & 0.0099 & 0.0766 & 0.1643 \tabularnewline
72 & 65 & 55.6227 & 38.2375 & 73.0078 & 0.1452 & 0.5726 & 0.3943 & 0.3943 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105369&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[60])[/C][/ROW]
[ROW][C]48[/C][C]69[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]49[/C][C]60[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]50[/C][C]56[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]51[/C][C]58[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]52[/C][C]50[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]53[/C][C]51[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]54[/C][C]53[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]55[/C][C]37[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]56[/C][C]22[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]57[/C][C]55[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]58[/C][C]70[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]59[/C][C]62[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]60[/C][C]58[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][C]-[/C][/ROW]
[ROW][C]61[/C][C]39[/C][C]53.4559[/C][C]36.0714[/C][C]70.8404[/C][C]0.0516[/C][C]0.3042[/C][C]0.2303[/C][C]0.3042[/C][/ROW]
[ROW][C]62[/C][C]49[/C][C]52.7384[/C][C]35.3533[/C][C]70.1236[/C][C]0.3367[/C][C]0.9393[/C][C]0.3565[/C][C]0.2765[/C][/ROW]
[ROW][C]63[/C][C]58[/C][C]65.252[/C][C]47.8668[/C][C]82.6371[/C][C]0.2068[/C][C]0.9665[/C][C]0.7932[/C][C]0.7932[/C][/ROW]
[ROW][C]64[/C][C]47[/C][C]50.8309[/C][C]33.4458[/C][C]68.2161[/C][C]0.3329[/C][C]0.2095[/C][C]0.5373[/C][C]0.2095[/C][/ROW]
[ROW][C]65[/C][C]42[/C][C]51.2273[/C][C]33.8421[/C][C]68.6125[/C][C]0.1491[/C][C]0.6832[/C][C]0.5102[/C][C]0.2226[/C][/ROW]
[ROW][C]66[/C][C]62[/C][C]58.8034[/C][C]41.4183[/C][C]76.1886[/C][C]0.3593[/C][C]0.9709[/C][C]0.7435[/C][C]0.5361[/C][/ROW]
[ROW][C]67[/C][C]39[/C][C]38.6662[/C][C]21.2811[/C][C]56.0514[/C][C]0.485[/C][C]0.0043[/C][C]0.5745[/C][C]0.0146[/C][/ROW]
[ROW][C]68[/C][C]40[/C][C]27.9421[/C][C]10.5569[/C][C]45.3273[/C][C]0.087[/C][C]0.1063[/C][C]0.7485[/C][C]4e-04[/C][/ROW]
[ROW][C]69[/C][C]72[/C][C]54.8228[/C][C]37.4376[/C][C]72.2079[/C][C]0.0264[/C][C]0.9527[/C][C]0.492[/C][C]0.3601[/C][/ROW]
[ROW][C]70[/C][C]70[/C][C]63.1759[/C][C]45.7908[/C][C]80.5611[/C][C]0.2208[/C][C]0.1599[/C][C]0.2208[/C][C]0.7202[/C][/ROW]
[ROW][C]71[/C][C]54[/C][C]49.3335[/C][C]31.9483[/C][C]66.7186[/C][C]0.2994[/C][C]0.0099[/C][C]0.0766[/C][C]0.1643[/C][/ROW]
[ROW][C]72[/C][C]65[/C][C]55.6227[/C][C]38.2375[/C][C]73.0078[/C][C]0.1452[/C][C]0.5726[/C][C]0.3943[/C][C]0.3943[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=105369&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105369&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[60])
4869-------
4960-------
5056-------
5158-------
5250-------
5351-------
5453-------
5537-------
5622-------
5755-------
5870-------
5962-------
6058-------
613953.455936.071470.84040.05160.30420.23030.3042
624952.738435.353370.12360.33670.93930.35650.2765
635865.25247.866882.63710.20680.96650.79320.7932
644750.830933.445868.21610.33290.20950.53730.2095
654251.227333.842168.61250.14910.68320.51020.2226
666258.803441.418376.18860.35930.97090.74350.5361
673938.666221.281156.05140.4850.00430.57450.0146
684027.942110.556945.32730.0870.10630.74854e-04
697254.822837.437672.20790.02640.95270.4920.3601
707063.175945.790880.56110.22080.15990.22080.7202
715449.333531.948366.71860.29940.00990.07660.1643
726555.622738.237573.00780.14520.57260.39430.3943







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.1659-0.27040208.971900
620.1682-0.07090.170713.976111.473910.5581
630.1359-0.11110.150852.591191.84639.5836
640.1745-0.07540.13214.67672.55378.5178
650.1731-0.18010.141685.142975.07168.6644
660.15080.05440.127110.21864.26268.0164
670.22940.00860.11010.111455.09827.4228
680.31740.43150.1503145.392666.3858.1477
690.16180.31330.1684295.057591.7939.5809
700.14040.1080.162446.567987.27059.3419
710.17980.09460.156221.776681.31659.0176
720.15950.16860.157287.934681.8689.0481

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.1659 & -0.2704 & 0 & 208.9719 & 0 & 0 \tabularnewline
62 & 0.1682 & -0.0709 & 0.1707 & 13.976 & 111.4739 & 10.5581 \tabularnewline
63 & 0.1359 & -0.1111 & 0.1508 & 52.5911 & 91.8463 & 9.5836 \tabularnewline
64 & 0.1745 & -0.0754 & 0.132 & 14.676 & 72.5537 & 8.5178 \tabularnewline
65 & 0.1731 & -0.1801 & 0.1416 & 85.1429 & 75.0716 & 8.6644 \tabularnewline
66 & 0.1508 & 0.0544 & 0.1271 & 10.218 & 64.2626 & 8.0164 \tabularnewline
67 & 0.2294 & 0.0086 & 0.1101 & 0.1114 & 55.0982 & 7.4228 \tabularnewline
68 & 0.3174 & 0.4315 & 0.1503 & 145.3926 & 66.385 & 8.1477 \tabularnewline
69 & 0.1618 & 0.3133 & 0.1684 & 295.0575 & 91.793 & 9.5809 \tabularnewline
70 & 0.1404 & 0.108 & 0.1624 & 46.5679 & 87.2705 & 9.3419 \tabularnewline
71 & 0.1798 & 0.0946 & 0.1562 & 21.7766 & 81.3165 & 9.0176 \tabularnewline
72 & 0.1595 & 0.1686 & 0.1572 & 87.9346 & 81.868 & 9.0481 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=105369&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]61[/C][C]0.1659[/C][C]-0.2704[/C][C]0[/C][C]208.9719[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.1682[/C][C]-0.0709[/C][C]0.1707[/C][C]13.976[/C][C]111.4739[/C][C]10.5581[/C][/ROW]
[ROW][C]63[/C][C]0.1359[/C][C]-0.1111[/C][C]0.1508[/C][C]52.5911[/C][C]91.8463[/C][C]9.5836[/C][/ROW]
[ROW][C]64[/C][C]0.1745[/C][C]-0.0754[/C][C]0.132[/C][C]14.676[/C][C]72.5537[/C][C]8.5178[/C][/ROW]
[ROW][C]65[/C][C]0.1731[/C][C]-0.1801[/C][C]0.1416[/C][C]85.1429[/C][C]75.0716[/C][C]8.6644[/C][/ROW]
[ROW][C]66[/C][C]0.1508[/C][C]0.0544[/C][C]0.1271[/C][C]10.218[/C][C]64.2626[/C][C]8.0164[/C][/ROW]
[ROW][C]67[/C][C]0.2294[/C][C]0.0086[/C][C]0.1101[/C][C]0.1114[/C][C]55.0982[/C][C]7.4228[/C][/ROW]
[ROW][C]68[/C][C]0.3174[/C][C]0.4315[/C][C]0.1503[/C][C]145.3926[/C][C]66.385[/C][C]8.1477[/C][/ROW]
[ROW][C]69[/C][C]0.1618[/C][C]0.3133[/C][C]0.1684[/C][C]295.0575[/C][C]91.793[/C][C]9.5809[/C][/ROW]
[ROW][C]70[/C][C]0.1404[/C][C]0.108[/C][C]0.1624[/C][C]46.5679[/C][C]87.2705[/C][C]9.3419[/C][/ROW]
[ROW][C]71[/C][C]0.1798[/C][C]0.0946[/C][C]0.1562[/C][C]21.7766[/C][C]81.3165[/C][C]9.0176[/C][/ROW]
[ROW][C]72[/C][C]0.1595[/C][C]0.1686[/C][C]0.1572[/C][C]87.9346[/C][C]81.868[/C][C]9.0481[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=105369&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=105369&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
610.1659-0.27040208.971900
620.1682-0.07090.170713.976111.473910.5581
630.1359-0.11110.150852.591191.84639.5836
640.1745-0.07540.13214.67672.55378.5178
650.1731-0.18010.141685.142975.07168.6644
660.15080.05440.127110.21864.26268.0164
670.22940.00860.11010.111455.09827.4228
680.31740.43150.1503145.392666.3858.1477
690.16180.31330.1684295.057591.7939.5809
700.14040.1080.162446.567987.27059.3419
710.17980.09460.156221.776681.31659.0176
720.15950.16860.157287.934681.8689.0481



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