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 computationTue, 06 Dec 2011 09:35:02 -0500
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2011/Dec/06/t1323182162gpzoz0326b3t5vf.htm/, Retrieved Mon, 29 Apr 2024 01:41:02 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=151617, Retrieved Mon, 29 Apr 2024 01:41:02 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact150
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] [ws9 5 Arima FOUTM...] [2010-12-07 16:14:08] [afe9379cca749d06b3d6872e02cc47ed]
- R PD        [ARIMA Forecasting] [] [2011-12-03 14:06:59] [74be16979710d4c4e7c6647856088456]
- R P             [ARIMA Forecasting] [] [2011-12-06 14:35:02] [ef12b3094dcc95645ac503919f1fca4e] [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 time1 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net

\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 & 1 seconds \tabularnewline
R Server & 'Gwilym Jenkins' @ jenkins.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=151617&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]1 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Gwilym Jenkins' @ jenkins.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=151617&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151617&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 time1 seconds
R Server'Gwilym Jenkins' @ jenkins.wessa.net







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.390236.036970.74340.0520.30130.22770.3013
624952.689135.334870.04330.33850.9390.35420.2743
635865.3447.985882.69430.20360.96750.79640.7964
644750.829933.475668.18410.33270.2090.53730.209
654251.233733.879468.58790.14850.68370.51050.2224
666258.861541.507376.21580.36150.97160.7460.5388
673938.671821.317656.0260.48520.00420.57490.0145
684028.035610.681445.38980.08830.10780.75234e-04
697254.827237.472972.18140.02620.9530.49220.36
707063.094945.740780.44920.21770.15730.21770.7175
715449.195331.84166.54960.29370.00940.07410.16
726555.581238.226972.93540.14370.57090.39240.3924

\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.3902 & 36.0369 & 70.7434 & 0.052 & 0.3013 & 0.2277 & 0.3013 \tabularnewline
62 & 49 & 52.6891 & 35.3348 & 70.0433 & 0.3385 & 0.939 & 0.3542 & 0.2743 \tabularnewline
63 & 58 & 65.34 & 47.9858 & 82.6943 & 0.2036 & 0.9675 & 0.7964 & 0.7964 \tabularnewline
64 & 47 & 50.8299 & 33.4756 & 68.1841 & 0.3327 & 0.209 & 0.5373 & 0.209 \tabularnewline
65 & 42 & 51.2337 & 33.8794 & 68.5879 & 0.1485 & 0.6837 & 0.5105 & 0.2224 \tabularnewline
66 & 62 & 58.8615 & 41.5073 & 76.2158 & 0.3615 & 0.9716 & 0.746 & 0.5388 \tabularnewline
67 & 39 & 38.6718 & 21.3176 & 56.026 & 0.4852 & 0.0042 & 0.5749 & 0.0145 \tabularnewline
68 & 40 & 28.0356 & 10.6814 & 45.3898 & 0.0883 & 0.1078 & 0.7523 & 4e-04 \tabularnewline
69 & 72 & 54.8272 & 37.4729 & 72.1814 & 0.0262 & 0.953 & 0.4922 & 0.36 \tabularnewline
70 & 70 & 63.0949 & 45.7407 & 80.4492 & 0.2177 & 0.1573 & 0.2177 & 0.7175 \tabularnewline
71 & 54 & 49.1953 & 31.841 & 66.5496 & 0.2937 & 0.0094 & 0.0741 & 0.16 \tabularnewline
72 & 65 & 55.5812 & 38.2269 & 72.9354 & 0.1437 & 0.5709 & 0.3924 & 0.3924 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=151617&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.3902[/C][C]36.0369[/C][C]70.7434[/C][C]0.052[/C][C]0.3013[/C][C]0.2277[/C][C]0.3013[/C][/ROW]
[ROW][C]62[/C][C]49[/C][C]52.6891[/C][C]35.3348[/C][C]70.0433[/C][C]0.3385[/C][C]0.939[/C][C]0.3542[/C][C]0.2743[/C][/ROW]
[ROW][C]63[/C][C]58[/C][C]65.34[/C][C]47.9858[/C][C]82.6943[/C][C]0.2036[/C][C]0.9675[/C][C]0.7964[/C][C]0.7964[/C][/ROW]
[ROW][C]64[/C][C]47[/C][C]50.8299[/C][C]33.4756[/C][C]68.1841[/C][C]0.3327[/C][C]0.209[/C][C]0.5373[/C][C]0.209[/C][/ROW]
[ROW][C]65[/C][C]42[/C][C]51.2337[/C][C]33.8794[/C][C]68.5879[/C][C]0.1485[/C][C]0.6837[/C][C]0.5105[/C][C]0.2224[/C][/ROW]
[ROW][C]66[/C][C]62[/C][C]58.8615[/C][C]41.5073[/C][C]76.2158[/C][C]0.3615[/C][C]0.9716[/C][C]0.746[/C][C]0.5388[/C][/ROW]
[ROW][C]67[/C][C]39[/C][C]38.6718[/C][C]21.3176[/C][C]56.026[/C][C]0.4852[/C][C]0.0042[/C][C]0.5749[/C][C]0.0145[/C][/ROW]
[ROW][C]68[/C][C]40[/C][C]28.0356[/C][C]10.6814[/C][C]45.3898[/C][C]0.0883[/C][C]0.1078[/C][C]0.7523[/C][C]4e-04[/C][/ROW]
[ROW][C]69[/C][C]72[/C][C]54.8272[/C][C]37.4729[/C][C]72.1814[/C][C]0.0262[/C][C]0.953[/C][C]0.4922[/C][C]0.36[/C][/ROW]
[ROW][C]70[/C][C]70[/C][C]63.0949[/C][C]45.7407[/C][C]80.4492[/C][C]0.2177[/C][C]0.1573[/C][C]0.2177[/C][C]0.7175[/C][/ROW]
[ROW][C]71[/C][C]54[/C][C]49.1953[/C][C]31.841[/C][C]66.5496[/C][C]0.2937[/C][C]0.0094[/C][C]0.0741[/C][C]0.16[/C][/ROW]
[ROW][C]72[/C][C]65[/C][C]55.5812[/C][C]38.2269[/C][C]72.9354[/C][C]0.1437[/C][C]0.5709[/C][C]0.3924[/C][C]0.3924[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=151617&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151617&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.390236.036970.74340.0520.30130.22770.3013
624952.689135.334870.04330.33850.9390.35420.2743
635865.3447.985882.69430.20360.96750.79640.7964
644750.829933.475668.18410.33270.2090.53730.209
654251.233733.879468.58790.14850.68370.51050.2224
666258.861541.507376.21580.36150.97160.7460.5388
673938.671821.317656.0260.48520.00420.57490.0145
684028.035610.681445.38980.08830.10780.75234e-04
697254.827237.472972.18140.02620.9530.49220.36
707063.094945.740780.44920.21770.15730.21770.7175
715449.195331.84166.54960.29370.00940.07410.16
726555.581238.226972.93540.14370.57090.39240.3924







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.1658-0.26950207.076400
620.168-0.070.169813.6092110.342810.5044
630.1355-0.11230.150653.876291.52069.5666
640.1742-0.07530.131814.667972.30748.5034
650.1728-0.18020.141585.260474.8988.6544
660.15040.05330.12689.849964.05678.0035
670.2290.00850.10990.107754.92117.4109
680.31580.42680.1495143.147465.94948.1209
690.16150.31320.1677294.905591.3899.5598
700.14030.10940.161947.679887.0189.3283
710.180.09770.15623.085181.2069.0114
720.15930.16950.157288.714581.83179.0461

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.1658 & -0.2695 & 0 & 207.0764 & 0 & 0 \tabularnewline
62 & 0.168 & -0.07 & 0.1698 & 13.6092 & 110.3428 & 10.5044 \tabularnewline
63 & 0.1355 & -0.1123 & 0.1506 & 53.8762 & 91.5206 & 9.5666 \tabularnewline
64 & 0.1742 & -0.0753 & 0.1318 & 14.6679 & 72.3074 & 8.5034 \tabularnewline
65 & 0.1728 & -0.1802 & 0.1415 & 85.2604 & 74.898 & 8.6544 \tabularnewline
66 & 0.1504 & 0.0533 & 0.1268 & 9.8499 & 64.0567 & 8.0035 \tabularnewline
67 & 0.229 & 0.0085 & 0.1099 & 0.1077 & 54.9211 & 7.4109 \tabularnewline
68 & 0.3158 & 0.4268 & 0.1495 & 143.1474 & 65.9494 & 8.1209 \tabularnewline
69 & 0.1615 & 0.3132 & 0.1677 & 294.9055 & 91.389 & 9.5598 \tabularnewline
70 & 0.1403 & 0.1094 & 0.1619 & 47.6798 & 87.018 & 9.3283 \tabularnewline
71 & 0.18 & 0.0977 & 0.156 & 23.0851 & 81.206 & 9.0114 \tabularnewline
72 & 0.1593 & 0.1695 & 0.1572 & 88.7145 & 81.8317 & 9.0461 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=151617&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.1658[/C][C]-0.2695[/C][C]0[/C][C]207.0764[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.168[/C][C]-0.07[/C][C]0.1698[/C][C]13.6092[/C][C]110.3428[/C][C]10.5044[/C][/ROW]
[ROW][C]63[/C][C]0.1355[/C][C]-0.1123[/C][C]0.1506[/C][C]53.8762[/C][C]91.5206[/C][C]9.5666[/C][/ROW]
[ROW][C]64[/C][C]0.1742[/C][C]-0.0753[/C][C]0.1318[/C][C]14.6679[/C][C]72.3074[/C][C]8.5034[/C][/ROW]
[ROW][C]65[/C][C]0.1728[/C][C]-0.1802[/C][C]0.1415[/C][C]85.2604[/C][C]74.898[/C][C]8.6544[/C][/ROW]
[ROW][C]66[/C][C]0.1504[/C][C]0.0533[/C][C]0.1268[/C][C]9.8499[/C][C]64.0567[/C][C]8.0035[/C][/ROW]
[ROW][C]67[/C][C]0.229[/C][C]0.0085[/C][C]0.1099[/C][C]0.1077[/C][C]54.9211[/C][C]7.4109[/C][/ROW]
[ROW][C]68[/C][C]0.3158[/C][C]0.4268[/C][C]0.1495[/C][C]143.1474[/C][C]65.9494[/C][C]8.1209[/C][/ROW]
[ROW][C]69[/C][C]0.1615[/C][C]0.3132[/C][C]0.1677[/C][C]294.9055[/C][C]91.389[/C][C]9.5598[/C][/ROW]
[ROW][C]70[/C][C]0.1403[/C][C]0.1094[/C][C]0.1619[/C][C]47.6798[/C][C]87.018[/C][C]9.3283[/C][/ROW]
[ROW][C]71[/C][C]0.18[/C][C]0.0977[/C][C]0.156[/C][C]23.0851[/C][C]81.206[/C][C]9.0114[/C][/ROW]
[ROW][C]72[/C][C]0.1593[/C][C]0.1695[/C][C]0.1572[/C][C]88.7145[/C][C]81.8317[/C][C]9.0461[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=151617&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151617&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.1658-0.26950207.076400
620.168-0.070.169813.6092110.342810.5044
630.1355-0.11230.150653.876291.52069.5666
640.1742-0.07530.131814.667972.30748.5034
650.1728-0.18020.141585.260474.8988.6544
660.15040.05330.12689.849964.05678.0035
670.2290.00850.10990.107754.92117.4109
680.31580.42680.1495143.147465.94948.1209
690.16150.31320.1677294.905591.3899.5598
700.14030.10940.161947.679887.0189.3283
710.180.09770.15623.085181.2069.0114
720.15930.16950.157288.714581.83179.0461



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')