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 10:05:00 -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/t1323183923mqzazrp4wdhbqjp.htm/, Retrieved Sun, 28 Apr 2024 19:07:49 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=151658, Retrieved Sun, 28 Apr 2024 19:07:49 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact113
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]
F    D      [ARIMA Forecasting] [Workshop 9 ARIMA ...] [2010-12-07 17:47:18] [a9e130f95bad0a0597234e75c6380c5a]
- R P           [ARIMA Forecasting] [] [2011-12-06 15:05:00] [3b32143baae8ca4a077b118800e50af3] [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 time3 seconds
R Server'George Udny Yule' @ yule.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 & 3 seconds \tabularnewline
R Server & 'George Udny Yule' @ yule.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=151658&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]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'George Udny Yule' @ yule.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=151658&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151658&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 time3 seconds
R Server'George Udny Yule' @ yule.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-------
613952.736436.494271.960.08070.29570.22950.2957
624951.84835.755870.92160.38490.90660.33480.2636
635865.637747.34586.91180.24080.93730.75920.7592
644750.651234.763169.52060.35230.22260.5270.2226
654250.998135.050669.9270.17570.66060.49990.2342
666259.101741.819879.3650.38960.9510.72250.5424
673938.346124.715754.9580.46930.00260.56310.0102
684028.241516.755442.7090.05560.07250.80110
697254.661238.098374.20550.0410.92930.48640.3689
707062.391544.594283.17020.23650.18240.23650.6606
715448.116132.668566.5450.26570.010.06990.1466
726554.96638.352874.56060.15780.53850.38080.3808

\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 & 52.7364 & 36.4942 & 71.96 & 0.0807 & 0.2957 & 0.2295 & 0.2957 \tabularnewline
62 & 49 & 51.848 & 35.7558 & 70.9216 & 0.3849 & 0.9066 & 0.3348 & 0.2636 \tabularnewline
63 & 58 & 65.6377 & 47.345 & 86.9118 & 0.2408 & 0.9373 & 0.7592 & 0.7592 \tabularnewline
64 & 47 & 50.6512 & 34.7631 & 69.5206 & 0.3523 & 0.2226 & 0.527 & 0.2226 \tabularnewline
65 & 42 & 50.9981 & 35.0506 & 69.927 & 0.1757 & 0.6606 & 0.4999 & 0.2342 \tabularnewline
66 & 62 & 59.1017 & 41.8198 & 79.365 & 0.3896 & 0.951 & 0.7225 & 0.5424 \tabularnewline
67 & 39 & 38.3461 & 24.7157 & 54.958 & 0.4693 & 0.0026 & 0.5631 & 0.0102 \tabularnewline
68 & 40 & 28.2415 & 16.7554 & 42.709 & 0.0556 & 0.0725 & 0.8011 & 0 \tabularnewline
69 & 72 & 54.6612 & 38.0983 & 74.2055 & 0.041 & 0.9293 & 0.4864 & 0.3689 \tabularnewline
70 & 70 & 62.3915 & 44.5942 & 83.1702 & 0.2365 & 0.1824 & 0.2365 & 0.6606 \tabularnewline
71 & 54 & 48.1161 & 32.6685 & 66.545 & 0.2657 & 0.01 & 0.0699 & 0.1466 \tabularnewline
72 & 65 & 54.966 & 38.3528 & 74.5606 & 0.1578 & 0.5385 & 0.3808 & 0.3808 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=151658&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]52.7364[/C][C]36.4942[/C][C]71.96[/C][C]0.0807[/C][C]0.2957[/C][C]0.2295[/C][C]0.2957[/C][/ROW]
[ROW][C]62[/C][C]49[/C][C]51.848[/C][C]35.7558[/C][C]70.9216[/C][C]0.3849[/C][C]0.9066[/C][C]0.3348[/C][C]0.2636[/C][/ROW]
[ROW][C]63[/C][C]58[/C][C]65.6377[/C][C]47.345[/C][C]86.9118[/C][C]0.2408[/C][C]0.9373[/C][C]0.7592[/C][C]0.7592[/C][/ROW]
[ROW][C]64[/C][C]47[/C][C]50.6512[/C][C]34.7631[/C][C]69.5206[/C][C]0.3523[/C][C]0.2226[/C][C]0.527[/C][C]0.2226[/C][/ROW]
[ROW][C]65[/C][C]42[/C][C]50.9981[/C][C]35.0506[/C][C]69.927[/C][C]0.1757[/C][C]0.6606[/C][C]0.4999[/C][C]0.2342[/C][/ROW]
[ROW][C]66[/C][C]62[/C][C]59.1017[/C][C]41.8198[/C][C]79.365[/C][C]0.3896[/C][C]0.951[/C][C]0.7225[/C][C]0.5424[/C][/ROW]
[ROW][C]67[/C][C]39[/C][C]38.3461[/C][C]24.7157[/C][C]54.958[/C][C]0.4693[/C][C]0.0026[/C][C]0.5631[/C][C]0.0102[/C][/ROW]
[ROW][C]68[/C][C]40[/C][C]28.2415[/C][C]16.7554[/C][C]42.709[/C][C]0.0556[/C][C]0.0725[/C][C]0.8011[/C][C]0[/C][/ROW]
[ROW][C]69[/C][C]72[/C][C]54.6612[/C][C]38.0983[/C][C]74.2055[/C][C]0.041[/C][C]0.9293[/C][C]0.4864[/C][C]0.3689[/C][/ROW]
[ROW][C]70[/C][C]70[/C][C]62.3915[/C][C]44.5942[/C][C]83.1702[/C][C]0.2365[/C][C]0.1824[/C][C]0.2365[/C][C]0.6606[/C][/ROW]
[ROW][C]71[/C][C]54[/C][C]48.1161[/C][C]32.6685[/C][C]66.545[/C][C]0.2657[/C][C]0.01[/C][C]0.0699[/C][C]0.1466[/C][/ROW]
[ROW][C]72[/C][C]65[/C][C]54.966[/C][C]38.3528[/C][C]74.5606[/C][C]0.1578[/C][C]0.5385[/C][C]0.3808[/C][C]0.3808[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=151658&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151658&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-------
613952.736436.494271.960.08070.29570.22950.2957
624951.84835.755870.92160.38490.90660.33480.2636
635865.637747.34586.91180.24080.93730.75920.7592
644750.651234.763169.52060.35230.22260.5270.2226
654250.998135.050669.9270.17570.66060.49990.2342
666259.101741.819879.3650.38960.9510.72250.5424
673938.346124.715754.9580.46930.00260.56310.0102
684028.241516.755442.7090.05560.07250.80110
697254.661238.098374.20550.0410.92930.48640.3689
707062.391544.594283.17020.23650.18240.23650.6606
715448.116132.668566.5450.26570.010.06990.1466
726554.96638.352874.56060.15780.53850.38080.3808







Univariate ARIMA Extrapolation Forecast Performance
time% S.E.PEMAPESq.EMSERMSE
610.186-0.26050188.688200
620.1877-0.05490.15778.111198.39969.9197
630.1654-0.11640.143958.334385.04459.222
640.1901-0.07210.12613.330967.11618.1924
650.1894-0.17640.136180.966269.88618.3598
660.17490.0490.12168.400159.63857.7226
670.2210.01710.10660.427551.17987.154
680.26140.41640.1453138.262662.06517.8781
690.18240.31720.1644300.633688.57279.4113
700.16990.12190.160257.889885.50449.2469
710.19540.12230.156734.620880.87878.9933
720.18190.18250.1589100.681482.52899.0845

\begin{tabular}{lllllllll}
\hline
Univariate ARIMA Extrapolation Forecast Performance \tabularnewline
time & % S.E. & PE & MAPE & Sq.E & MSE & RMSE \tabularnewline
61 & 0.186 & -0.2605 & 0 & 188.6882 & 0 & 0 \tabularnewline
62 & 0.1877 & -0.0549 & 0.1577 & 8.1111 & 98.3996 & 9.9197 \tabularnewline
63 & 0.1654 & -0.1164 & 0.1439 & 58.3343 & 85.0445 & 9.222 \tabularnewline
64 & 0.1901 & -0.0721 & 0.126 & 13.3309 & 67.1161 & 8.1924 \tabularnewline
65 & 0.1894 & -0.1764 & 0.1361 & 80.9662 & 69.8861 & 8.3598 \tabularnewline
66 & 0.1749 & 0.049 & 0.1216 & 8.4001 & 59.6385 & 7.7226 \tabularnewline
67 & 0.221 & 0.0171 & 0.1066 & 0.4275 & 51.1798 & 7.154 \tabularnewline
68 & 0.2614 & 0.4164 & 0.1453 & 138.2626 & 62.0651 & 7.8781 \tabularnewline
69 & 0.1824 & 0.3172 & 0.1644 & 300.6336 & 88.5727 & 9.4113 \tabularnewline
70 & 0.1699 & 0.1219 & 0.1602 & 57.8898 & 85.5044 & 9.2469 \tabularnewline
71 & 0.1954 & 0.1223 & 0.1567 & 34.6208 & 80.8787 & 8.9933 \tabularnewline
72 & 0.1819 & 0.1825 & 0.1589 & 100.6814 & 82.5289 & 9.0845 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=151658&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.186[/C][C]-0.2605[/C][C]0[/C][C]188.6882[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]62[/C][C]0.1877[/C][C]-0.0549[/C][C]0.1577[/C][C]8.1111[/C][C]98.3996[/C][C]9.9197[/C][/ROW]
[ROW][C]63[/C][C]0.1654[/C][C]-0.1164[/C][C]0.1439[/C][C]58.3343[/C][C]85.0445[/C][C]9.222[/C][/ROW]
[ROW][C]64[/C][C]0.1901[/C][C]-0.0721[/C][C]0.126[/C][C]13.3309[/C][C]67.1161[/C][C]8.1924[/C][/ROW]
[ROW][C]65[/C][C]0.1894[/C][C]-0.1764[/C][C]0.1361[/C][C]80.9662[/C][C]69.8861[/C][C]8.3598[/C][/ROW]
[ROW][C]66[/C][C]0.1749[/C][C]0.049[/C][C]0.1216[/C][C]8.4001[/C][C]59.6385[/C][C]7.7226[/C][/ROW]
[ROW][C]67[/C][C]0.221[/C][C]0.0171[/C][C]0.1066[/C][C]0.4275[/C][C]51.1798[/C][C]7.154[/C][/ROW]
[ROW][C]68[/C][C]0.2614[/C][C]0.4164[/C][C]0.1453[/C][C]138.2626[/C][C]62.0651[/C][C]7.8781[/C][/ROW]
[ROW][C]69[/C][C]0.1824[/C][C]0.3172[/C][C]0.1644[/C][C]300.6336[/C][C]88.5727[/C][C]9.4113[/C][/ROW]
[ROW][C]70[/C][C]0.1699[/C][C]0.1219[/C][C]0.1602[/C][C]57.8898[/C][C]85.5044[/C][C]9.2469[/C][/ROW]
[ROW][C]71[/C][C]0.1954[/C][C]0.1223[/C][C]0.1567[/C][C]34.6208[/C][C]80.8787[/C][C]8.9933[/C][/ROW]
[ROW][C]72[/C][C]0.1819[/C][C]0.1825[/C][C]0.1589[/C][C]100.6814[/C][C]82.5289[/C][C]9.0845[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=151658&T=2

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=151658&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.186-0.26050188.688200
620.1877-0.05490.15778.111198.39969.9197
630.1654-0.11640.143958.334385.04459.222
640.1901-0.07210.12613.330967.11618.1924
650.1894-0.17640.136180.966269.88618.3598
660.17490.0490.12168.400159.63857.7226
670.2210.01710.10660.427551.17987.154
680.26140.41640.1453138.262662.06517.8781
690.18240.31720.1644300.633688.57279.4113
700.16990.12190.160257.889885.50449.2469
710.19540.12230.156734.620880.87878.9933
720.18190.18250.1589100.681482.52899.0845



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