Professional Documents
Culture Documents
Applied Modeling of Hydrologic Time Series PDF
Applied Modeling of Hydrologic Time Series PDF
t7t-k =0 k>q For k=0, the variance is: (5.12)The autocorrelation function (ACF) is obtained by taking the ratio of the Eqs. (5.11) and (5.12) as (with the convention orate) » Kq It is seen from Eq. (5.13) that the autocorrelation is trun- cated or cut off at lag q, with a "memory" limited to q lags. Elementary Properties of the MA(1) Model The MA(1) process is defined by 81 ey: (8.14) Its autocovariance function at lag 1 is obtained from Eq. (5.11) as Y= - 61 of : (5.15) Its variance is obtained from Eq. (5.12) as Yo = (1 + 0,7) of (5.16) and its lag-1 autocorrelation coefficient is given in terms of the model parameters by Ya 8) ery Tre ° (8.17) The memory is seen to be only one step long as y, = 0 for K>1. The MA(1) model may also be written as +6 ee) Successive application of this equation yields &_) = 2,1 + 1- - 2 i fr.g thus, £, = 2 + 61 2%) + 0:7 & 9, and in general 2 2 ep = Mt 01 yt O12 ot A gt ... which converges for |@;| <1 and =~ ~ 6,2 - 2 = 01 2p > O12 ig ee +e 188Conditions to be Met by the Parameters (Invertibility Conditions). The previous equations show that the first order moving average process is inverted into an autoregres- sive process of infinite order, provided that |@,| < I or equivalently the root of r- 8, = 0 be inside the unit circle. This is the invertibility condition. There is no stationary condition on the MA process, as the weighted sum of indepen- dent variables in Eq. (5.3) is finite. The invertibility condi- tion shown for the MA(1) process may be generalized to a moving average process of any order q: the roots of the polynomial rd - aysT! - grt? - 9 = 0 (5.18) must lie inside the unit circle. For example, for the MA(2) model with ©, = 0.6 and & = 0.2, Eq. (5.18) becomes r? - 0.6r- 0.2 = 0. The roots of this equation are rj = 0.839 and rp -263 and they fall inside the unit circle. Partial Autocorrelation. As an MA model is equivalent to an AR process of infinite order, these autoregressive coefficients will decrease rather than cut off, so the partial autocorrela- tions are of infinite extent and tail off. It is important to note the correspondence between the autoregressive and moving average processes. The autocorrelation and partial autocorrelation of the former, behaves like the partial auto- correlation and autocorrelation of the latter, and vice versa. Figures 5.1 and 5.2 show the partial autocorrelation function (PACF) for several MA(1) and MA(2) models. (Note that the values of $,(k) exist only for integer values of k. The lines plotted in the figures are to enhance the appearance only.) No plots of the autocorrelations are given since only 63, given by Eq. (5.17), exists for the MA(1) model; for the MA(2) model only p, and 2 given by Eq. (5.13) exist. General Properties for the ARMA (p, q) Model The general properties of the ARMA (p,q) process are given in terms of the cross covariance between 2 and & Yyg(k) = Covl ay yey] which is nonzero for k < 0 and zero otherwise, as 2 de- pends only on previous values fe With the convention 6 -1, forming the product 2,2, and taking the expectation term by term, the autocovariances of the ARMA(p,q) process are found to be 189PHI KCK) ‘.b00 ne ‘SYMBOL THETA ® 6 a 78 70 ae on le 1.000 2.000 3.000 SMD gg 8-000 8.000 7.000 8.000 Figure 5.1. Theoretical partial autocorrelation for MA(1) 26 model. ‘SYNBOL —TRETAT THETAG © Pears) A oe 2 8-8 a Se a es Figure 5.2. Theoretical partial autocorrelation for MA(2) model. 1904 2 Oy, (ki) ,} kq+l For k = 0, the variance is 2.2 q . Var[z,] = of + z - 2 ey. (-i) (5.20) iL il and the autocorrelation function is id Pegs Kat (5.21) The autocorrelations for the first q lags, 1, ...) Pq are seen to depend on the autoregressive and moving average co- efficients, whereas for higher lags, Pq41+ Pqsg» Pept depend only on the autoregressive parameters. Thus, the p values Pgs Pays Pqept1 Provide the initial values to construct the p, in Eq. (5.21), and when q-p 20, the initial q-p+1 values of the autocorrelation function are ir- regular, but the following ones form damped waves or expo- nential decaying functions. When q-p <0 it forms damped waves or decays exponentially. The partial autocorrelation ,(k) is obtained by fitting to the given series AR processeX of orders k = 1, 2, = Org, + O22 g Fo + OCD H+ 002 a. where ,(k) denotes the jt coefficient of an AR process of order k) The plot of $C) vs k is the sample partial autocorrelation function. The partial autocorrelation arises from the Yule-Walker equation (see Appendix A4.2) Thus, for an autoregressive process of order p, the partial autocorrelation $,(k) cuts off at lag p. A moving average process being euivalent to an autoregressive model of infinite order, has a partial autocorrelation which is in- finite in extent and attenuates with a mixture of damped waves and/or exponential decay, For a mixed process both the ACF and the PACF attenuate as damped waves or expo- nential decay 191Conditions to be Met by the Parameters (Stationarity and Invertibility Conditions). ' For stationarity the parameters 1, $2, s-+1 %p must satisfy the stationarity condition. The roots of the characteristic equation (4.21) must lie inside the unit circle, Likewise for invertibility the parameters 6;, 62, “+1 0g must satisfy the invertibility condition: the roots of the characteristic equation (5.18) must lie inside the unit circle. Elementary Properties of the ARMA(I,1) Model. Because of its simplicity and of its importance in hydrology, the applica~ tion of the ARMA(1,1) model is discussed more specifically. The process is 2, = 124.1 + ey > Ore, It may be written as = O22, + Bp + COr-O1 0844 - 182% = 18243 te, + COr-Ordepy + O1CO1-Or Deg ~ 170184. + @r-O De, + Or10Or-O epg + O17COr-BEy_g + which is an infinite order moving average process. The coef- ficients of the ¢,'s are the weights of Eq. (5.2). The convergence of thé process requires the stationarity condition [ox] <1. For example, let us use the values of $; and 6; of an ARMA(1,1) model fitted to the annual flows of the Niger River (see Sec. 5.2.7). The values of the parameters are $1 = 0.79 and 8, = 0.35, from which the 4 = ot (1-01) be- comes, = 0.44, Wp = 0.35, Js = 0.27, 4 = 0.22, Us = 0.17, Ye = 0.14, ..., thus showing the parsimony of using an ARMA process as compared to an MA process. In a similar fashion the ARMA(1,1) process may be rewritten as an autoregressive process of infinite order as ~ 012401 F Ore 4.4 and fey 17 M22 + 81642 from which = 1-81)2p_1 + O12, 9 - O17e4_9 + ey 192and 2 = (G1-81)24_4 + O1CG1-81 2-9 + O17(G1-81)4,_g +... He, = M241 + Maz yt M2 yg + - t (5.22) Again with the values of ¢ and 6 for the Niger River the i 0.02, ms = 0.01, ete. of the process requires fod t. =1< $1 <1 and -1 <6, <1. 0 6, that this n, = 6 1(9,-0;) becomes my = 0.44, my = 0.15, mg = 0.05, m4 = It is seen that the invertibility sum converge or that The admissible region of the parameters is thus In typical hydrologic models The variance of the process is obtained by evaluating first y,,(-D Ete = OZ gery teeta > Ore p 1” and El2.e,_)] = O:E[2,_,64.4] + Elee, 4] - ®iElef 1] thus Yog!) = $10% ~ 8108 thus Eq. (5.20) yields Yo = ¢1¥1 * 02 - 8;(6:-8)o2 (5.23) Similarly, ¥,,) from Eq. (5.19) as (0) = o2 and the autocovariance is obtained ¥1 = O1¥0 ~ 0102 (5.24) For higher lags Ye Foye 22 (5.25) Solving Eqs. (5.24) and (5.25) for yo and y: gives yo and y, in terms of the model parameters: _ L+ 0% - 2630) -2 vo = 14 HE phat 2 (6.26) ~a 2 ne o (6.27) 193and the autocorrelation coefficients become = a = CL = 0301); = 64) os Se eee Pye = Oey = KD. (8.29) Thus decays exponentially from p, at a rate controlled Py y by ;. If 9; is negative it will have alternating positive and negative values. Figures 5.3 and 5.4 show plots of the ACF for several values of 9, and 6; including those of the AR(1) model (0; = 0) and of the MA(1) model (o, = 0) Note that for $, 7 0, @; >0 and @, > @, the autocorrela- tion decays exponentially from po =1 and for $, <0, it decays exponentially from p,. Figures 5.5 and 5.6 show plots of the partial autocorrelation for several values of 61 and 6;. (Note that the values of 9, and 9,(k) exist only for integer values of k. The lines plotted in the figures are used to enhance the visual presentation only). SYROL PAT Ore py The parameters of the ARMA(p,q) model for y, (n, 63, 62, vin Op G1» 82s sey Og, OF) are estimated front anfual’ hy- drologic data. The principal methods of estimating such pa- rameters are given in the next section, and a detailed ex- ample is given in Sec. 5.2.7. 5.2.2 PARAMETER ESTIMATION FOR ANNUAL ARMA MODELS Box and Jenkins (1976) proposed an iterative approach to model building which consists of three stages: (1) identification or use of the data and some of their properties to suggest a tentative type of model, i.e, autore- gressive, moving average or mixed autoregressive-moving average and eventually, the order of the model, e.g ARMA(1,1). (2) estimation (evaluation) or inference about the parameters using the data, conditional on the adequacy of model being considered. (3) diagnostic checking or verification of the validity of the chosen model. The diagnostic checking involves an examination of the residuals from the fitted model. The lack of independence in residuals indicates the need for modifica- tion of the model. The modified model should then be subject to the diagnostic checking procedure. Model Identification The principal tools for model identification are the visual display of the original series, the behavior of the autocorrela- tion function coupled with that of the partial autocorrelation function. Hipel et al., (1977) have recently demonstrated that the inverse autocorrelation function and the partial inverse autocorrelation function also are useful identification tools A visual inspection of a display of the original series may reveal the presence of a trend, persistence, long term cycles or outliers. The ability of the ARMA model to simulate persistence and very low frequencies will be discussed in a subsequent section. 197The measure of linear dependence between observations separated by a lag k is given by the estimate ry of the autocorrelation function p,. To utilize the autocorrelation function (ACF) for model identification, plot ry, vs k up to N/4 approximately, where N_ is the length of the series. It is useful to show the probability limits on the plot. As ry ;. approximately normal with zero mean and variance _1/N, the approximate 95 percent probability limits are +2//N. Thus, if all the r, values beyond lag q lie inside the limits it may be concluded that the process may be a moving average of order q. If the ACF attenuates, then it may be conclud- ed that the process is autoregressive. When it is not clear whether the ACF truncates or attenuates then the partial autocorrelation is useful. The characteristic behavior of the autocorrelation and of the partial autocorrelation is summa- rized for the AR, MA and ARMA processes in Table 5.1. Table 5.1. Identification Properties for AR, MA and ARMA Processes Process Autocorrelation Partial Autocorrelations AR(p) Infinite in extent, con- Finite in extent, peaks sists of damped expo- at lags 1 through p nentials and/or damped __ then cuts off. waves. Attenuates as P Me 2 Oy MACa) Finite in extent, peaks Infinite in extent, con- at lags 1 through q sists of damped expo- then cuts off. nentials and/or damped waves. ARMA(p,q) Infinite in extent, first Infinite in extent, q-p lags: irregular first p-q lags irregu- then damped exponen- _lar, then damped ex- tials and/or damped ponentials and/or waves. Attenuates as damped waves _P Citar eet akc 2 + (k > 198Parameter Estimation The parameters are, in general, estimated at three levels of increasing accuracy: a preliminary estimate, a likelihood method and optionally a nonlinear estimation Preliminary Estimates. It was shown in the previous chapter that the Yule-Walker equations provided simple preliminary estimates for the parameters of the autoregressive processes. For the MA process the equivalent of the Yule-Walker equa- tions is Eq. (5.11). Except for the case of q=1, these equa- tions are nonlinear. Equations (5.11) and (5.12) may be solved iteratively for the 6 parameters; however, their statistical efficiency is less than that of the Yule-Walker equations for the autoregressive models. Equations (5.12) and (5.11) respectively, are rewritten in the form © 62 a SEE aI (5.30) 1+ 6R +... + 62 y and n © an nn - * a, =- (a = By 7 BByg oo Bigg) 31) where c, and ¢; are the estimators of the variance and autocovariance respectively, and the ~ indicates estimate: The unknown 6's are assumed to be zero in the first iteration, and improved values of 62 and 8 are obtained successively. For the MA(1) process these equations become aS a= & 1 + e a 1 Os Similarly, for the MA(2) process Eqs. (5.30) and (5.31) give 199Ae 1 —— a we For the ARMA process the p autoregressive parameters $1, Oa) ++) Gp are estimated first. As seen from Eq. (5.19) for k > q + 1 the autocovariances are independent of the MA parameters. Rewritten in terms of the autocovariance estimates, cj, these equations become wir K2atl (5.32) which can be solved for the estimates 61, 62, ..., a: A new series is now constructed which is the difference between the original series and the one formed by the AR model con- structed with the parameters $1, 2, ..., 4,» namely 27 baz oe Ape + (5.33) This series presumably contains only the MA portion of the Process. Its autocovariance estimates ch, cl, ... cy are calculated and the parameters 01, @2, ..., 84 are estimated by means of Eqs. (5.30) and (5.31) applied iteratively. Parameter Estimates from the Sum of Squares. Having obtained preliminary estimates of parameters of the tentative model, efficient estimates of the parameters are needed that take into account all the information contained in the data. The maximum likelihood estimates satisfy this requirement It can be shown that (Box and Jenkins, 1976, Chapter 7) the maximum likelihood estimates are essentially the same as the least squares estimates if the e's given by Oreo Oey Ore tos t Ogg (5.84) are normally distributed. We are therefore concerned with the evaluation of the sum of the squares of the residuals Nea? S(o.a) = 2 Ce)". (5.35) t=1 200The sum of the squares of the residuals is understood to depend on the parameters ¢ and @, the 2, series and the starting values of the e's. We therefore seek the set of pa- rameters $ and 8 which minimizes the sum-of-squares function. The variance of the residuals is then estimated by ap - 1 A a = y 86.8) (5.36) For a small number of parameters it is usually convenient to calculate S($,8) for a range of values of the parameters, and to plot the function or contour lines of equal values of S This makes it possible to examine the behavior of the sum~of- squares surface and to observe the values of the parameters for which the surface reaches a minimum value. Alternative- ly, a steepest descent algorithm may be used to obtain the maximum likelihood estimate of the parameters and the residuals. For example, for the MA(1) model t 7 OE the residuals are given by 2 + 816, Coat tL and the sum of the squares of the residuals is thus, N N S(@) = % (ea)? = & (2, + 84641)? a t t-1 1 To calculate the sum we need a starting value of 9 which may be taken as zero, its mean value. Thus 321 &2 = 22 + 04£1 = 22 + O42, fg = 23 + O1e2 = 23 + 8129 + 01221 etc... The residuals are seen to be nonlinear. functions of the parameters. Since the MA model was constrained to be in- vertible, namely |6,{ < 1, the above series converges and @epends on the past observations and on 4. In general, the choice of the starting value only affects the first few 201residuals and does not significantly affect the parameter estimates. As S(8) theoretically depends on the initial value chosen (€9=0) it is called the conditional sum of squares. McLeod (1976) has proposed a modified sum of squares method which provides refined estimates of the parameters The modified sum of squares is an exact maximum likelihood estimate procedure for the AR processes. The modified sum of squares function is minimized in order to obtain the im- proved parameter estimates. Reliability of Estimated Parameters. To simplify the writing let B denote the vector of the pq parameters $1, ..., 055 81, .++5 8g. In statistical estimation theory it is shown that in large samples the maximum likelihood estimates (MLE) of the parameters are normally distributed with the mean equal to the true value of the parameter. Furthermore, the variance- covariance matrix of the parameter estimates is related to de- rivatives of the sum of squares of residuals First the variance-covariance matrix of the parameters is defined by Var(Bi) — Cov(Br Ba) «+ COVEB1y Byg) Cov(Ba,B:) Var (Ba)... COvCBa Byyq) V(B) = — oo toe s eee COvCB, 4 q Ba) ve Var(Ba yg) so that the standard error of estimates of the parameters are obtained by taking the square roots of the diagonal terms of the matrix V(B). It can be shown that the variance-covariance matrix of the MLE of the parameters is given by (see Box and Jenkins, 1976, p. 227) ase) _ 388) ]7 ap? Boog vip) vz]... 2 (5.38) a — . a28(6) 2 Bota 202For the ARMA(1,1} model the above relationship reduces to 2?3($1,03) 92S(44,8 Pp _ [Var@s)— Cov($18) ab 391081 V(B) = m2) - ~ #8(41.01) 828 8y) Cov($101) Var(o;) oon a | (5.39) The second derivatives of the sum of squares are usually approximated numerically by the sum of the squares of the residuals evaluated for different values of the parameters However, for the ARMA(1,1) model a simple expression may be obtained (see Box and Jenkins, 1976, p. 246) . © [C-812)C-8181)— (1-9,2)C1-042) (1-912)(1-62)—(1-0;2)(1-9101 (5.40) and the standard errors are 5 a 1/2 8) = [a G-$101°-04°) | (5.41) (1-61)? and - ee even 2 a(@,) = [4 Gedx0,)°C-84*) | (5.42) (41-01) Thus for any parameter 8; the (1-a) confidence interval is given by a tp.) : B 8B.) 5.43 [B; - Ugyy OB) 5 BE + Yyyp OCB) (5.43) where Ujyp is the deviate which excludes a fraction a/2 in the upper tail of the normal distribution. The approximate 1-0 confidence region of the sum of squares is bounded by - Xy?(pta) 8(B) = S(B) (1 + 4} (8.44) 203where y,2(pta) is the deviate which excludes a fraction a in the upper tail of the chi-square distribution with ptq de- grees of freedom. Nonlinear Estimation of Parameters. It may occur that the sum-of-squares surface does not exhibit a sharp minimum or that more accurate estimates of the model parameters are required. It it therefore desired to evaluate the value of the o's and 8's for which 38(;, 6) as(>. —, 0 and —3— (5.45) However, as previously noted, the moving average process is responsible for the nonlinearity in S(9,8), and 28(g;, 6,)/28, = 0 is nonlinear in the 6,'s. To obtain the parameters, a linear approximation of the Taylor series ex- pansion of ee is therefore used. Fora detailed discussion of the nonlinear estimation of parameters the reader is refer- red to the text of Box and Jenkins (1976, Sec. 7.2) 5.2.3 GOODNESS-OF-FIT FOR ANNUAL ARMA MODELS Once the parameters of the identified model have been estimated, the next phase is to verify the validity of the model. One approach consists in overfitting, that is adding parameters and showing that the added parameters are not significantly different from zero. A second approach consists in considering the modeling of time series as a procedure to transform the observed data into a series of purely indepen- dent residuals. Finally, the parsimony of the model param- eters is tested Overfitting The procedure of overfitting consists of adding a parameter and testing the hypothesis that the added param- eter is equal to zero, provided that the new parameter is not redundant. or example, if the proposed model is an ARMA(1,1) 1 Oy tym Cree y (5.46) one could test the ARMA(2,2) = O1Zp21 + O22 9 + &, > Ore; 1 - Ore, 9 - (5.47) 204However from Eq. (5.46) one can write Zar = O22 F Spey > Og which, upon subtraction from Eq. (5.46) gives 2p = 1+ 0122.4 = O12 p09 + hp = (1+ ODEEy + BLE,» (5.48) which is an ARMA(2,2) model, however, not independent of the model of Eq. (5.48). To test that model of Eq. (5.47) is not the same as model Eq. (5.46), one may calculate the resi- dual variance given by Eq. (5.36) corrected for the addition- al degrees of freedom due to the additional parameters. The corrected residual variance is ,?), lc = Neon 5(4,9) (5.49) where N_ is the number of observations and n number of parameters (g's and 6's). A decrease in the corrected residual variance provides a measure of the improvement due to the added parameters. Testing of the Residuals for Independence Several tests of independence are discussed in Chapter 3. Two tests commonly applied for the diagnostic checking of the fitted ARMA models are the Porte Manteau lack of fit test and the Cumulative Periodogram test applied to the residuals The Porte Manteau lack of fit test considers the autocorrelation function of the residuals 6, (€) of the fitted ARMA model such that the statistic (see Eq’ 3.46a) L Q=N X 6,26) (5.50) Kl is approximately distributed as ?(L-p-q). The adequacy of the model may be checked by comparing Q with the theo- retical chi-square value for (L-p-q) degrees of freedom. The Cumulative Periodogram test can be used by determining from Eq. (3.47) the periodogram of the residuals series © and the normalized cumulative periodogram P, of Eq. (3.48). Then the Kolmogorov-Smirnov statistic would be used for testing whether the plot of P; vs. h; is a straight line joining the points (0,0) and (0.5,1). Refer to Sec. 3.5.1 for more details about this test. 205Tests for the Parsimony of Parameters For most hydrologic time series, for example for flow series, the underlying physics involves many phenomena and their interactions, such as rainfall, interception, detention, infiltration, snowmelt, groundwater flow, evapotranspiration, etc. Most of these phenomena have variations in time and space, and as a result the physics of the phenomena to be represented by stochastic processes is too complex to be ex- pressed in simple lumped models, or it is not well understood. Some physical explanations have been given to some models. For example, the MA process may be considered as a model to relate mean annual runoff to mean annual rainfall (see Sec 5.2.7) and a rainfall-runoff transformation has been suggested for the simulation of annual flows by an ARMA(1,1) model (see Sec. 5.2.7). In general, however, these explanations are given a posteriori, and seldom the structure of the sto- chastic model can be justified by an appeal to thé physics of the process (see Sec. 1.4). Instead we try to gain an understanding of the process through these models. As a result there is a need of nonsubjective criteria for the selec- tion between competing models for the same phenomena. A common rule for choosing between models is the principle of parsimony of parameters, which requires a model with the smallest number of parameters. One criteria for selecting among competing ARMA(p,q) models is the information criteria proposed by Akaike (1974). He used the equation (see Sec 3.6.2) AIC(p,q) = N gn (MLE of residual variance) + 2(ptq) (5.51) where N is the sample size. The preferred ARMA(p,q) en is that which yields the minimum value of AIC of Eq (5.51 5.2.4 GENERATION USING ANNUAL ARMA MODELS, Once the ARMA model is fitted it may be used either for generation of synthetic series or for forecasting future events. For generation purposes the ARMA(p,q) model q- e,- 2 Ge, i=l tei (5.52) may be used recursively to generate synthetic values. It is necessary to give p initial z values. By generating a sufficiently long series, and neglecting the first 50 or 100 terms, the transient effect of the initial values is generally negligible. An example of synthetic generation of annual flows is given in Sec. 5.2.7. 206The synthetically generated series is expected to conserve some of the statistical properties of the historical data. These are the mean, the variance and the autocorrela- tion structure. The ability of the ARMA processes to model the iong term dependence is discussed in Sec.'5.2.8. 5.2.5 FORECASTING USING ANNUAL ARMA MODELS. One of the important applications of ARMA processes in hydrology is to forecast hydrologic variables one or several times steps ahead. Referring to an origin at time "t", it is desired to use the ARMA models to make a minimum mean square error forecast of 2,,; for L>1 where Lis described as the “lead time." The forecasted values for 2, for an origin at t with lead time L will be written ‘A! 2,(L). Box and Jenkins (1976) show that the minimum mean square error forecast 2,(L) is the conditional expectation of 2yyz, at time t; when regarded as a function of L for fixed t, 2,(L) may be termed the forecast function, or 2e(L) = Elgay [p> pyr od t#L can be expressed as an infinite weighted sum of previous random values as in Eq. (5.2). Separating the future values up to lead L from the past values up to the present time t, 24, may be written as An observation 2,,;, at time L-l & 2 Wee 2 Wear : (5.53) The second summation on the right-hand cD is seen to depend on present and previous values cy) _;, j= L, L+1, and is the minimum mean square error forecast of 2,;, at the time origin t for lead time L. Thus, 2,(L) = We teLj (5.54) iL The first term on the right-hand side of Eq. (5.53) depends on future random values 141) &t49) ---> t4y, Which are unknown at time t and is the forecast error for lead time L L-1 eh) = 5 cE jo tLe} + (5.55) 207Since Efe,,] = 0 for j < L, Efe,(L)] = 0 and the forecast tt is unbiased The forecast may also be written in terms of the difference equation + +e, Zot > %teL-1 * Oo2ten-p * Sten 7 O18ten-1 7 7 feta g (5.56) by taking the conditional expectations, designated here by a square bracket: 2h) = Peg) = altaya) + + + tylterp] + fpr] - Siler - --- > egfe (5.57) ttL-q] The forecasting function is then obtained by noting that the present and past values (with a subscript equal to or less than t) have occurred and are no longer random. Thus, for past values the conditional expectation is the value itself, ice. (2,1 ale j=0, 1, 2, .... For the future values the conditional expectation is the forecast, i.e (2.;] a 2d), i=, 2. random terms [e,.,] = €_; and the conditional expectation 0, for and likewise for the past values of the of their future values is zero, i.e. [ey4; j=1,2,.. The one-step-ahead forecast at time t is (with L=1) 2) = diay t os + Oye iE, 1 (6.58) tpt ~ 8p 7 CGF tage which is given in terms of the present and past random terms. At time tl the observation 2,,, is available and Fee = O12 tt eZee t Epey 7 One - - Sota (5.59) Subtracting Eq. (5.59) from Eq. (5.58) we have Ze 7 2401) e te tel or in general 2081. (5-60) Thus Eq. (5.60) provides a way of calculating the past e's For example, for the ARMA(1,1) model the one-step-ahead forecasts can be written as Zo(1) * 120 - 8180 21(1) = 6323 - 6181 = 121 - 61[21 - 20(1)] = @121 - 8121 + 036120 ~ 017€0 22(1) = ize - O1€2 = Oize - Oilz2 - 21(D)] = O12 - 0122 + Oyb121 - 81721 + 6179120 - O1%eo etc. It is seen that the effect of the unobserved values 29 and eo gradually diminishes, as [| <1 and [e| <1. It is desirable to take zo =z and € = 0, their expected values Therefore by building up the one-step-ahead forecasts from the beginning of the series it is possible to obtain the values of the q past e's necessary to calculate the forecasts z,(1), 22), ry BCL), 5 24), Where L q_ the forecasts depend on the e's only through the previous forecasts: 2,(L) = o12,(L-1) +... + o,2(L-p> , L>q. (5.62) Obviously, if there is no moving average component, the past e's do not intervene into the forecast calculations. Thus for 0<6,<1 an ARC) model will give 2,(1) <2, but an t ARMA(1,1) model will give 2,(1) $ er 209To estimate the forecast errors it is necessary to evaluate the coefficients in Eq. (5.55). For this pur- pose, 2, is written as in Eq. (5.2) as an infinite series of weighed random values sta meine) (5.63) Inserting Eq. (5.63) into the general ARMA model 2 2 6 - 2 pr 2 Bey HO, C=O = 1 (5.64) Fo iro yields rp ¢: 2 2M Sti eLj = 0 (5.65) j-o iFo The Y coefficients are obtained by solving Eq. (5.65) for equal values of the index k in &, of Eq. (5.65). For example for the ARMA (1.1) proceSs Eq. (5.65) becomes 2 wet EW ea tee EO (5.66) Applying Eq. (5.66) recursively we obtain for £7 Me SE te 0 for Sea, 7 Ya Spy tO Uy pi y78r Spy =O Ya = Ore Bs for 9, ~ ¥2 S.9 + 1 Ur ep = 0 Ye = (r-O1)01 for ty, - Ve e.g + $1 U2 epg = 0 Ys = (1-01)? Thus in general (o1-81)o:"72 The variance of the forecast error is (with wo = 1): L-1 varfe,(L)] = Efe,?(L)] = 7 i-0 (5.67) 210The (1-w) confidence limits for the minimum mean square error forecast 2,(L) of the actual value 2,7 are L-1 ayk Zr (4) = 2(L) tuyye + 2 wFVF 3, (5.68) Fl where Ug,o is the deviate exceeded by 4/2 of the standard normal distribution, namely ugj9 = 1.96 for a = 0.95 5.2.6 SUMMARIZED ARMA MODELING PROCEDURE FOR ANNUAL SERIES, The fitting of ARMA(p,q) models to annual hydrologic series 2, of length N comprises the following steps: STEP (1). Calculate the sample mean 2 and variance s* of the series. STEP (2). Calculate and plot the autocovariance function ¢,, the autocorrelation coefficients, ry, = c/s", and the partial autocorrelation coefficients @,(k) for lags k going from 1 to at least N/4 but less than N. The methods of estima- tion of c, and ry, are given in Sec. 2.2.2, and the esti- mation of $,(k) is given in Appendix A4.2 of Chapter 4 As indicated in that chapter the partial autocorrelation func- tion may be obtained recursively from rp-ry? ry(1-rg) 810) = ri 6202) = page} be) = ae k k wi” 2 Ore/[! a a0] (8.69) BaD = OG - O70) O,GejH1) Be RD Steps (1) and (2) can be performed by the IMSL computer program FTAUTO*. STEP (3) Identification. From the behavior of the autocorrelation and partial autocorrelation functions and mak- ing use of Table 5.1 infer the order of the model, namely, the values of p and q which are likely to fit the series. ¥See Appendix of Chapter V on computer programs. 211STEP (4). Obtain the initial estimates of the p autoregressive parameters $1, $2, .-., 8, solving the p Yule-Walker equations eget = bog * bag te t Ape gstep Cgen = Srcgy t Hey to +4 (5.70) q poat2-p Cgep = MSqep-1 * B2%q-p-2 * ++ * Ophq If the series 2, does not have zero mean there is an overall constant @,, oh the right hand side of Eq. (5.8): - P 845 = 2C1- a oD. (8.71) This step may be performed by means of the IMSL computer program FTARPS (see Appendix A5.1). STEP (5). Obtain the initial estimates of the q moving average parameters. Form the series Bt = B21 7 amg 7 Op G72) and calculate the autocovariance function c,' of the 2,' series. Jt can be calculated as usual. Alternatively, Box and Jenkins (1976, p. 202) give the following formula for the in terms of the c, of the 2, series and the $ already +o p-i*p 4 where (8.73) With the cys the @-parameters and the residual variance o2 are obtained by solving Eqs. (5.30) and (5.31) iteratively if’ which the initial values of the unknown parameters are assumed zero. These equations are 212This completes the initial estimation of the parameters 64, ee p> 01, 2, ..., 8 »o and 6,,. The first esti- a mate of the model is thus +2 bate, F Oe, G75) The IMSL subroutine FTMPS* evaluates the c's by Eq. (5.73) and calculates the roots of the nonlinear system (5-74) which with the notation x9? = o2, 4; = -8j0, becomes qr Z XX, j i=0,1,...4 (5.76) iro itj 7 The program outputs are the moving average coefficients and the residual variance. STEP (6). Obtain the maximum likelihood estimate of the parameters. Calculate the residuals e .-> max(p,q) io p> aq, & = Ve Fprj = 8007 2 pani * 2) Ppt 6.7) i » N-p t=1 for several values of and 6 around the initial estimates and obtain the values of the 9's and 6's for which S$ is ¥5ee Appendix of Chapter V on computer programs. 213minimum. ‘his may be done graphically. For the ARMA(1,1) model one may plot the values of S ona 9-@ plane. Con- tours of equal values of S may be traced, and the minimum sum of squares is located, and the corresponding values of 6 and @ are obtained. The variance of the residuals ¢, is o2 = (1/N S). This graphical procedure has the advarftage that it exhibits any peculiarity that the sum of squares sur- face may have. After verification. that the surface is free of anomalies, this procedure may be extended by means of IMSL program FTMXL* which minimizes § by a modified steepest descent algorithm and gives the maximum likelihood estimate of the parameters and the residuals. The standard error of estimate of the parameters is obtained by taking the square root of the diagonal terms of the variance-covariance matrix (Eq. 5.38), and the (1-a) confidence intervals for the param- eters are obtained from Eq. (5.43). STEP (7). Perform the Porte Manteau test to check that the &, is a normal independent variable. Calculate the autocor- rbiation function r,(e) of the residual series, for the lags k going fro 1toL=N/10+p+q. (Thé e, may be obtained from IMSL program FTMXL¥.) Calculate the statistic QeNn (r,(2)] x a K=1 and determine if @Q is less than the theoretical chi-square value with L-p-q degrees of freedom. If this test is not passed the model is rejected. This step may be performed using the IMSL program FTAUTO* applied to the residuals obtained in program FTMXL*. All the procedures outlined in steps (1) through (7) may be performed by means of the IMSL computer program FTCMP*. STEP (8). Perform the Akaike test to select the final model among competing models. The previous procedure, steps (1) through (7), may be performed for several models, for ex- ample AR(2), ARMA(1,1), ARMA(2,1), etc., for which the maximum likelihood estimation of the parameters is found to converge. The best model is found by calculating the Akaike information criterion AIC(p,q) = N 2n (02) + 2(p+q) See Appendix of Chapter V on computer programs 214where o2 is maximum likelihood estimate of the residual variance obtained in step (6). The model having the minimum value of the AIC(p,q) is selected. STEP (9). Generation of synthetic series. Once the ARMA model has been selected it may be used for generation of syn- thetic data. The series is generated by the formula P.. ~ a> Ee Oye ee B Coe 4 It is necessary to give p initial values to start the algorithm. Generation of normal random numbers usually yields variates with zero mean and unit variance. These are multiplied by ¢, to obtain random numbers with zero mean and variance o2. If the series has zero mean, the term €,, is zero. This step may be implemented by means of the IMSL program FTGEN*, The program FTCMP* estimates the parameters (steps (1) through (7)) and generates synthetic series (step (9)). STEP (10). Inverse transformation to obtain the synthetically generated hydrologic variable. If the 2, values generated in the previous step are centered so that Fy, Y where y, is the original hydrologic variable, then after generating the 2, series the y, is obtained from t IF at FT If the 2, is standardized such that where y, is the original hydrologic variable, then after generating the 2, series, y, is obtained from *See Appendix of Chapter V on computer programs. 215STEP (11). Forecasting. Obtain the forecasting function for the lead time L from Eq. (5.57). Specifically for L q 24(L) = r2y(Lel) +... + O,%(L-p) « To apply the above equations it is necessary to obtain the q previous random values. This is done by calculating succes- sively 2:(1), &2, 22(1), €3, 23(1), &4, > &, 2C1) by means of Eqs. (5.59) and (5.60). The initial values of £4, +) &q may be taken as zero. If the series is sufficiently Jong, it is not necessary to reconstruct the ¢,'s from the beginning of the observations, but one may start at an arbi- trary point in the series at least q+10 terms back. Next the y-weights are obtained from Eq. (5.66), and the sum of the first L-1 squares of the y-weights are calculated to ob- tain the variance of the forecast error given by Eq. (5.67) Finally the (1-a/2)100% confidence interval is obtained from Eq. (5.68). The IMSL Program FTCAST* computes the time series forecasts and associated limits as described in this step 5.2.7: EXAMPLES OF ARMA MODELING FOR GENERATION AND FORECASTING ANNUAL TIMES SERIES Annual hydrologic series are, in general, stationary, and the ARMA(p,q) model given by Eq. (5.9) may be applied Two extreme cases are the autoregressive model or ARMA(p,0) and moving average model ARMA(0,q). The autoregressive models AR(p) or ARMA(p,0) are discussed in Chapter 4 The moving average model MA(q) or ARMA(O,q) has been applied to annual series. Matalas (1963) used the MA model to relate effective annual precipitation to annual runoff. In particular, Yevjevich (1963, a,b) used the moving average model to relate the mean annual runoff 2, and the annual effective precipitation e, ; , assumed to be' an independent white noise. The moving average coefficients 0; were shown to be the fraction of the annual precipitation flowing out in the (t-i)'t year, thus obtaining a physical interpretation of See Appendix of Chapter V on computer programs. 216the MA model. Operating recursively on this model with the e,'8 considered as mutually independent random variables, Yevjevich (1964) obtained an autoregressive model with fewer terms. In fact, a moving average model, under suitable con- ditions of invertibility, (see Sec. 5.1.2), may be transformed into an autoregressive model of infinite order and vice versa. It is intuitively reasonable then to expect that there exists a mixed ARMA model with the least number of parameters to model time series parsimoniously (see Sec. 1.4) The ARMA model has been applied to annual streamflow series, among others, by Carlson et al., (1970) to the St. Lawrence, the Missouri, the Neva and the Niger rivers. Hipel (1977) also fitted ARMA models to the St. Lawrence River yearly flow series. O'Connell (1977) studied the ARMA(1,1) model to generate synthetic annual flow series, although the main thrust of his work was the investigation of the ARMA(1,1) model to preserve the persistence character- istics of streamflow series. In this section the calculations for the Niger River are done in detail. The annual modular coefficients (annual flows divided by the mean flow) and the mean flow for the Niger River at Koulicoro, Africa, for the years 1906 to 1957 are taken from Yevjevich (1963). The standardized flows are obtained from a7 4 a2 ts where q, are the annual flows, q is the mean flow and s is the standard deviation of the flows.. The data are given in Table 5.2. The analysis of the modular coefficient series u, and of the standardized series are done to exhibit the differ- ence between series with or without zero mean, The former series has a mean of unity and the latter a mean of zero STEP (1). The mean and variance of the series are gel. 2 = -0.0001 ~ 0 a s,? = 0.0575 2 = 0.9804 ~ 1. 2, es STEP (2). The autocovariance, autocorrelation coefficient and partial autocorrelation coefficient are calculated for lags 0 through 29. The autocorrelation and partial autocorrelation are the same for both series. The results for the 2, series up to lag 29 are shown in Table 5.3. The autocorrelation and partial autocorrelation are plotted in Figs. 5.7 and 5.8. Note 217Table 5.2. Niger River at Koulicoro, Africa. Modular Coefficients (Annual flow/mean), Annual Flows (CFS) and Standardized Flows, 1906-1957 (after Yevjevich, 1963) oDULAR EN 397s2-88 -1.106432 42081182 ‘er1108 69038: 74 1114888 $3852.68 =le13310 Se6s9.57 tizrses 4390.25 ~les7es 2ers7is0 <1 19aa5i2 32s8:01 “1630748 49825-80, 1412048, 49480.50, 1445875, 32034143, sizs24 Se264.57 194487 4903452 409881 43652.65, =1813310 3680307 © -1Laazag8 5204188 lisioil $4796.80 ‘os3028 27574.57 alpe2ass 3118.50 21183964 5308.34 1375881 5365.81 10138458 ilesssis ilaoraio riess.58 i ze99s6 1537.78 1344958 2570.55, ‘e23400 $7480.89, [easae3 51588-54 1210552 ~legaaee ‘as541? nles3584 =rietes3 2001.85, 493032 41989148 1386706 43707:05 08181 35089143, 468608 41967 .48, 941293 Ssui7ies = -1461481 43596:33 817438 Sa144.88. ‘16514 4413.75. 755811 sesee.7? ‘ss0s20 9871.44 ‘316376 2274-76 ‘oges70 7529137 Tisss463 7623.72 1247703 9583.35 a iss973 73487 .48 iassaes 73464155 ‘374763 49001.85, 483032 St 138800 73860:51 1465808 Mean 1.0000 Su ~0.0001 Std. Dev. 0.2378 © 1SIb7-569,— 0-901 218Table 5.3. Autocovariance, Autocorrelation and Partial Autocorrelation of Standardized Annual Flows, Niger River. 9 4.00000 1.00000 1 153478 133478 2 4s292 t2a7a0 3 39980 112086 a teoi1e 15830 5 fsa? oie a lige7s t0g7a1 7 tossaa ‘07003, a 10335 26015, 3 20063 20307 10: 34919 7119383 1 11954 12 03932 13. 102018 1a. 5115, 1s: 13012 1B. 100465 1 12678 1B. 108038 13. loaaei 20: siieies a1 108260 B 11353 23. 111483 24. ~iog87i 23. 14795 2. 102967 a 102550 28. 108234 23. loteoi 5 “—— Pp £ 38 er, ~ hay a mwa ave YRS) Figure 5.7. Autocorrelation function of standardized annual flows, Niger River. 219ORRELATION PARTIAL AUTEC Fhe oR elie Figure 5.8. Partial autocorrelation function of standardized annual flows, Niger River that these functions are defined for integer values of the lags but the values are connected by lines to give a better pictor- ial visualization of their behavior. The partial autocorrelations were calculated by Durbin's formula (5.69) for ry = 0.53478, rz = 0.46292, rz = 0.39980: bu 11 = 0.53478 ‘ : 2 oes 0.534787 _ 9 oa7gq deg = aye Boras eon =i 78" 0.53478(1-0.46292) _ 9 , T = 0.53a782 = 9-40226 $21 = $33 0..39980-0 .40226x0 , 46292-0. 24780x0. 53478 _ 9 19996 1-0. 40226x0 .53478-0- 24780x0.46292 ete. 220STEP (3). Identification. Take the 95% confidence interval given approximately by +#2//N = +2//51 = +40. The auto- correlation coefficient is seen to be positive significant up to Jag 3, it continues to decrease and becomes negative significant from lag 10 through lag 17, then oscillates within the confidence band and again reaches a significant value at lag 27. The partial autocorrelation coefficient is significant at lag 1 then oscillates within the confidence band. This re- sult indicates the presence of a first order autoregressive component. The autocorrelation coefficients seem to decay more slowly than for an autoregressive model, indicating the possibility of a moving average component. It appears reasonable to try the AR(1), AR(2) and ARMA(1,1) models. The detailed procedure is shown for the ARMA(1,1) model, and the results are compared to those of the AR(1) and AR(2) models. STEP (4). Initial estimate of the autoregressive parameters For the ARMA(1,1) model the Yule-Walker equations (5.70) reduce to = 0.8656 STEP (5). Initial estimate of the moving average parameter. The autocoveriance, c,' , of the series of Eq. (5.72) are calculated by Eq. (5.73), which reduces to (since =e) co! = Co + 6129 - 26:c, = (1 + 0.86562) x 0.9804 - 2 x 0.8656 x 0.52429 = 0.8074 and cy! = Cy + o12c, = o1(cetco) = (1 + 0.8656?) x 0.52429 - 0.8656(0.45385 + 0.9804) = -0.3244 Equations (5.74) reduce to 5 gz = 0-8074 @ = or @ = Se i & 1+ 6)? and 5. = 763! 0.3244 1278 oor = %E o 2217 é 2 mus 5, = amb and 0.3244 @,2 - 0.8074 6; +°0.3244 = 0 Only the negative root gives a value of |6,|< 1, thus 6; = 0.5037 and = 0.6440 The constant 6,, given by Eq. (5.71) is (1 - $1) = -0.0001 (1 ~ 0.8658) = -0.000013 ~ 0 ® 0 The preliminary model for the 2, series is 2, = 0.8656%,_, + &, - 0.5037, 1 and for the u, series, from Eq. (5.71) 6,, = 1(1-0.8656) = 0.1344 and u, 0.1344 + 0.8656u,_, + ©, - 0.50376,_ 1 1 The values of the parameters obtained by the computer programs FTARPS* and FTMPS* for the z, standardized series are $1 = 0.865634, 6; = 0.503631, 0, = -0.000011, and 62 = 0.643987 STEP (6). Maximum likelihood estimates. For judiciously selected values of § and © in the neighborhood of the initial estimates calculate the residuals and the sum of the squares of the residuals. The maximum likelihood estimate corresponds to the minimum of the sum of squares surface. The residuals for $, = 0.8 and 6; = 0.4 are calculated as follows e,=0 2 = zg ~ $12, = - 0.871109 + 0.8 x 1.106482 = 0.0140 25 ~ $122 + O1e2 = 1.114639 + 0.8 x 0.871109 + &3 0.4 x 0.0140 = 1.8172 ¥See Appendix of Chapter V on computer programs. 222£4 = 24 - $123 + O1e3 = -0.813310 - 0.8 x 1.114639 + 0.4 x 1.8172 = -0.9782 ep = 2 by t+ Ore) Thus —e$ = 0.0002; ef = 3.3022; ©% = 0.9568 ete Table 5.4 shows the residuals, their squares and sums of squares for = 0.80 and 06; = 0.40. The sum of squares of the residuals is 32.09. A more elaborate approach consists of using a computer program to develop the sum of squares surface. The detail of the sum of squares surface may be gradually increased to obtain refined estimates of $1 and... Table 5.5 shows the sum of squares of residuals multiplied by 100 on a 6-6 plane for 0.050 < 6, < 1.000 and 0.050 < 6; < 1.000. The minimum value of S$” is 32.01 corresponding to 0, = 0.80 and 6; = 0.35. Further accuracy may be gained by reducing the range of variables in the neighborhood of the minimum value of S. We choose 0.750 < $; < 0.850 and 0.305 < 8; < 0.400. This is exhibited in Table 5.6 where the quantities Shown are (S-32) x 10°. The minimum value is 1119 which corresponds to 4, = 0.790, 6; = 0.345 and S = 32.01119 Further detail may be obtained by further reducing the ranges of 4, and 6,. We choose 0.7855 < $ < 0.7950 and 0.3405 < 6, < 0.3500, as shown in Table 5.7 where the quantities tabulated are (S - 32.011) x 107, The minimum value is -812 which corresponds to 4, = 0.7905, 8, = 0.348 and § = 32.011 - 0.000812 = 32.010992 ~ 32.011. The standard errors of the parameters are obtained from Eqs. (5.41) and (5.42) which give _ {1 = 0.7905 x 0.348)2¢1 - 0.79052) | 1/7 _ 061) = lb ~~. 7055 = 0.348)" = 0-140 7 2 _ | G@= 0.7905 x 0.348)2(1 - 0.3482) | 1/2 _ (8) = {& “(7805 = 0.348) | 0-215 - Alternatively, the first and second differences of the sum of squares way be calculated from the values shown in Table 5.7. The first and second differences of the entries of Table 5.7, AS and A*S respectively, are shown below. 223Table 5.4. Residuals (first line of each entry), Squares of residuals (second line of each entry) and sum of squares of residual for $; = 0.8 and 6; = 0.4. These results were obtained with the TI-59 cal- culator program shown in Appendix A5.3. RESIDUALS: 1. 8861 SQUARES 3. 557: Lgeat ns 2351 0.0450 o:0020 0. 4665, S 0.6854 1ses 012177 ess 3443 itge 70, 3448 ois? 6, 0496 8.0025 35 0.9943 0, 1217 ~0. 4362 ao eras 012462 9. 2279 -0. 9466 051s Or i2ot Petes 0.8192 1826 alerio -0. 3681 ise 0958 ~0. 6378 0, 8546 01 4061 01 Sore =1. 3610 ieee 1.3076 17038 3741 sum saul odeaan UM SQURRES 32.0323pai beGs SG0E EGY GGIH vee Gele GesE BOGE 90SE Tere eGrE vest Z9Se Z25e TOLe zee 2682 STOP BSTp OG 21SG SGP COM) GRD ELBE ALIE OSE GIPEC TLE TSEC ESEC PEC ATE SBE ECE oLSE ORLE ScRE LSEE W218 G2PG OLS LSP) BTID BEE LIE OLE ELEC BOLE ELA ASC Adee OEE HHEE SOME OsrE eUSE ALBE tose ov2 295 GEIS ESLP GPE GOO pOLE GPSE IDE STEE SGEE peze Lee GEC ORC ADEE ALES ESPE |HSE OS9E Jag 9622 2025 C925 ISI) He IEEE IBLE OESE EGCE GEL ore GOZE TOLE vIgE sve SHE EBLE SHE SHSE E92 2212 0999 SESE SES SAP LECH ZEEE CELE PSE SOE GEE GHEE SHEE Loze EIze eSeE ZOE OLEE SoHE 658 269 2622 OSES STIS EGES ZIP 22 GiOv AOE IzSe ACE SEEE Be Lcee Lace GEE Wee ees TELE OT0T 22001 GOS B2Ia C90L SHIS OPS OESr GBEP eGOY GHLE EIDE SSPE OLEE SORE GAZE LSC BSCE TOLE esCe QT2T BPGIT TOOT Ocs6 21S pbOL GITS GSES Ther PIP) LEO CHE OSC IISE TIPE SHEE GOEL Eze L0EC GEE tebT o12pt 298eT vst lat s08st Borst To0e: 9112 GELET ELST TZOST Ssgzt ESOT GLEB 269L L689 2S T2ES GraP AL) SBI BSCE ABLE GSE ESSE Gere TSE 12092 900E2 ETO HSELT HOSPT pEOeT SBTOT SSE9 ZerZ SSSS SES EGS Va aErh LIz) LSSE SEC LSE 2OSE GESE 00S6 BB0B 2565 PSDS LES SPeP Loby eth BLBE HOSE OSCE Scbe OSEE zGCE oPcE IsEE G9G0T 2226 bOGL G259 SESS OSES HRP BrP GSTP GIGE BCLE OSE pOSE BEE Gove arte ISG0€ 60982 L2HE2 OLSET TESST ORLET HLPIT BTLG OSCR Heee GPO BLS e925 BP pISr ser Soy OLE HrLE ESSE JAE9E BVSOE G18S2 TSE VELAT LYST ZoseT S/80T TOES Teed SOIL 1+ TELS eres ser Iesr QL EL EIGE eELE -2E2r 22GHE G2POE T8SS2 S22 OTHzT ErPET 268» TEVEE JTEVE 99H2 ESVEZ CLPET OTIST cGvET ZEPIT L696 Toss E0SL E089 LSI9 ZESS E0eS ESP BSG EEh SHIP OSG SLEDb ELOAE YLIZE GEPSZ ZEST ZO6LT OSSPT ZEBT SSEOT OPPS SICE CThe BL99 T8OS I6SS eats asa» Posh T9EP 0L€9 959Gb STGP SOBSE 99EGZ LEVHZ LOBSI SOGST ESET SZETT THEOT 6206 $903 Th2 £959 C109 S633 SIS TaB» 20S STL 22256 Bey BSVGE ELveC LEZ TeATe ESTBT 20ST LSVET EOETT 963s 9348 SPL 2602 OLr9 SSS rESS BIS BBeb 21 SEEOT 9263 LLL SPS9 HHZD GLIS TZ2S OSH BPS GOEr OITh esse ‘T0008 “00008 "00088-00008"0002"00004"000S3"00005 00088-00008" 000Sr 0000» -O00SE 001 “90002"000sT-0000 00050" VLFAL OL X § Jo sonpea ‘uNY Issty - PoVJINg saxenbg Jo umg “g's TqRLTIE ERS GeTET SzEET GECT GOTT Babee sSOve Erase HSLL2 GLEE BBTAE ELBE SELLE 1BIOY OULEr vers» TSLEH ODEES otOLE poset pIPbT Zeabr THEST 2S29T GE2ZT OBPST ESOGT SC>Ta voce ESISE SEALE OEIGE CTE Sore PUBLE ODLOY TIGEY 962L> HSBO: O9ZtT 22etT TGSTT TET SCOET LSEET HUET SBOST abt Teost Zoxve oLEZe eeEre QTELe CLAE GSC COPSC ¥GhEC TeaTH 2e0s! 2BL6 ESE 2196 bss OLzOT GoGOT GELTT HGLeT ELGET SUEST GassT GzL9T SSLOZ GIGZe S9eS2 CELLe TOSOC BAECE ESbSE HESS 0628 Teas SUZ G2LL USGL OCH S205 GSEE OGSOT STIZT ScseT SHIST byEGT TeKBt ZoTTE esrez SEES OTZEz HIBIE Tesh vaze 2999 SS29 0209 $509 9269 COLD Tobe GE2B H126 SOsOT ‘OvSET ISEST pvELT besGT geste Scbbe esTLe 22001 2129 088s 2925 G9RP pear GOLr ede BLES GIOd GSBd BEEZ ossor ogter téser ossst szter zbsoz rote Bc8s E99 95S Ihab Seth Sade BESE 29SC PELE Tezb Tdeb e1es BEEZ GIME ZHOTT LSet OSabT TS0LT ZebEr BST 8202 GELS L9P BEAL {ee piAZ vase SPoz Huse OTEE GhEE 6285 9902 5hB beTOT IvGTT ZbeeT thTsT ease voor Gis ese9 IeZe ZI>G SEATT ser tHYs! 2522 BOSE sesh GSES Ieee LIEa seLOT SHE Eeet ashe SBE eucy ossS o6cs Iga zcrO e682 G99 SLOS LOOP I9TE geSe Ie CesT oseI SLI2 GOs PERG LOpZ SECS EEO LSSE HOLE 2402 LEST éShT SPI o6oT ShOTT ECOG G5Ze 9TZS POY GTEC ase OTe ScET BBTT HErt OFEET S90TT Zp06 Ssz2 ZOLs OsEr SOLE Sth 9B/T SECT oztt 90ST 99SE1 BGZTT 1525 25r2 GOBS Posh BPrE BSSe GOET GabT O2EGI HESOT 9SGET HOLTT ¥595 2rBL y9Z9 GIGH rose Gose ovee S20E2 ESET ZOTLI PIOPT ZOEZT BOI Std S299 LOPS LEEW ECVE e522 262 oSdZ zee Lore Ose g0eE SIO ACIS e2et bet 692 sete seeb SoPS 2BEs SosB SE2t aevT GHET 29-2 GeRE CIEh rss 1363 asst GEST CeLT Ze12 zy2 Ease 2ESh 2008 e022 228E2 66102 OBELT ITYST GBOET GOOTT B3TG HOS: TGID GHOS ELTH opvE GaGe gtZe BL9z HSSZ thee gCHE BESP 29aTe eveae Ceab2 EORTZ ASGAT ZAEST PrOrT APSTI Z500T Elva L802 TEES 20S LG2> HISE OSSE Z0SE aS3E soy ecsh S25SE GLOEE OsbEe C9092 SLGZ2 ZeTOR GIGLI POTST ESOET TETTT zvGS STE g1G9 EOS LIES T28» SHSP Zor» Eos» TOs ia JTasT Spbst ZIEPE oEveT OBLOT PIE OBI Fees YEPS SAEs SESE GeIS pws TF }002E-OOSTE"OOOTE"DOEGE” THA + 2us@> pecee sabre c2a0e pcb2 s0ct: ‘90009 00c6E“000sEooseE coDeE“0OEzE *0S3¢"000SE" 0USSE000SE“oUSPEodUrE “oOSEE-oDDEE“~OOSeE wisi s0IX(ZE-S) JO sonfea ‘uny puosag - sdeJang sesenbg Jo wns “9°g AIq2L 226F evbG 09901 280zT C2ZET GISST veaZT BART Tae ZpOSe TESLE GZOIE ECCPE OPALE ESTP CGPS GZ2Gh OoES CISeS 9oBCa PezeD : 2b vezeS Sel9S 22019 9089 9082 9106 ZEPOT z902T GoGET SGEST eteet aso Sacre erase OEESZ ErSZE SEISE ogee TLLEY T6Sb CS 299 TéSL SEED GODOT ZrHet SOPPT SCOT ZEIGT G5oTe Ereve EzaLe ZeTTE CAPE TEESE Sve GOSH BGSOS HsesS ISLT p4S02 Svbc2 pessz Z1E82 LOECE GOOLE ETEOP Scosp GEESh 8622 SCE OvIy LEIS P2Cs TELE ghES SLIT Tree 2sH: Zavl S£L1 ECER COTE EGO HLS be99 Gaza SOTOT SETI HécbT AxG3T BLMET Eveee etvce esseZ LBIEE EBISE LELEE Sozcr lb 809 BPG OUST E92 ELE OY HIBS BIbL EZ’ SSZIT ZOPET GEST GISGT EEPTE SOSre OAc? CUTE ESGvE TS9D fe GPIS 2bz9 SSB osSOT eset TeesT Szazy Lazo2 CELE sS0L2 EESOE Stee ap 9ET- pt- Te €88 GIST sasz Ost GSr- S8S- Ip GIT- Teh OLTT G2Te GSE OBB OL29 OL03 O90OT EGET BRLMT SBELT THeGe SeeTe eesse eEESe B91 0SE- e/9- T8L- b49- SGE- PLT SIG @98T TEOE pode GOES TELL vOLS LETT GTbT GrOLT GBEST ocEze esI9z 60S 091 9LE- OOL- ZIG 212 TOh- T2T S58 ToBT ssGz Ezeh Goes saz za95 BEET EoEDT SeEST ESET oR? E402 EOTT SPE BGI- OES- GPS- 2G5- ES2- 292 Ges SEET SLE Eh PODS cBLe 2Ld6 TZEIT GLEDT S669T ZUE6T SSE L9h2 GOT aL 241 LST- H~ GOZ- 18 SES PICT Sree SAC eer OED 2408 SEI0T Sheet sPaPT BseLT 2985 p52" HS0E B902 SGT Sez GsE E52 OC GID oeIT eceT sole GEBC EES eBLs ESS9 e2SOT ETLat LOTST 2608 2999 Thos EEBE GEA aS02 OGPI SETI 266 2901 CHET CBI OPS SSPE zed» GIGS she Gees EOTIT oLcET oscer 2605 Gbbz GIO9 CoBr Tose Z10e Seve CLOe ze6T YET see Eble GEYE Ler S3>S 9549 SEB L000T zvOeT S22bI YPTZI BLOT 929B TL HES PSG ISTH ELSE 2OZE CvOE SoDE ZOCE GESE seSr Ges OrS9 e992 SEES SCTIT 22621 BISST GZSET HSSTT YESS LSB SIEZ 9529 ISPS GEL GIS> ESEr Scr 9S9 SIS JOBS E593 EORL LTTE EHOOT aroze bIScI T0ZLT COST oBZET ISSIT B600T SSeB 82AL HIOL HIPS 3209 IS25 GeBS SETI 0093 Eves BTA pSeE vess2 2c8e2 Sczt2 ELEAT 999B1 FAEPI SGZCT CEAIT vasor ers sea LTTE T2ee ESL G9GL GOEL E92a B2EB SOB SCOT EGYSTE 12502 OTOS2 POZE CEEOL LTEBT TET OCZST OSLET OOSZT GPT 9290T BOOT poss ETE Hers 2496 ETTOT oLoT SEIT ‘G00se Os6He "o0Gve"OG8HE"cOaPE“05ZHE"D0ZvE"OSAPE"OOBHE OSHC” DOSPE"OSHEE"OOPHE.OSCvE”OOErC”OSEPE"ODeHE OSTHE“DOTHE"OSOHE: *OIX(TT0'ZE-S) Jo sanqeA ‘adeJAng sesenbg Jo ung “1 °¢ aTIGeL 227For the second derivative with respect to $1: 8, = 0.3480 1 s' vs! vs! 0.7895 172 702 0.7900 ~530 440 282 0.7905 -812 420 -138 0.7910 -674 421 -559 0.7915 -115 S' = (S - 32.011) x 107 “ The value of the second difference at $, = 0.7905 and 6, = 0.3480 is 420 and the second derivative is 9*S/2a$? ~ 420/{107 x (0.005)?] = 168. For the second derivative with respect to @;: $1 = 0.7905 e s' vs' ves! 9.3470 -401 311 0.3475 -112 21 100 0.3480 -812 212 : -112 0.3485 -700 212 -324 0.349 -376 S' = (S - 32.001) x 10? The value of the second difference at $, = 0.7905 and 6; = 0.3480 is 212 and 9*S8/a6,? ~ 212/[107(0.0005)2} = 84.8. For the mixed derivative the first differences of the values shown in Table 5.7 are first taken with réspect to 4; and the second differences are taken with respect to 6: and are shown in Table 5.8. The average value of the second difference at §, = 0.7905 and 6; = 0.348 is -219.25 and 87S/8p130; ~ -219.25/[107 x 0.0005 x 0.0005] = -87.7. 228Table 5.8. Calculation of Second Differences of Sums of Squares with Respect to 6 and 6. 0.3880 0.3485 0.3870 iF ae eS er (ces | = ee 0 pee 22-219 tea -220 102 | o.700 | -357 9 sm “196-29 ae | ons { ant -ne eu [4 sos ate 8s a (29) a oma | 4 88 an “1 | 996-220 +718 207 559-219 240 ons | 1179 as #6 Note: The values in parentheses are averaged to obtain the second derivation at (0.7905, 0.3480). Also note that S' = (S = 32.011) x 10’. From Eq. (5.36) 62 = 32.0109/51 = 0.6277. The variance-covariance matrix of Eq. (5.39) is thus 7 168 -37.7 | + V(B) ~ 2 x 0.6277 x “81.7 84.8 The matrix above is inverted using the TI-59 calculator master library program ML-02 with the following result e 0.01294 0.0134 V(B) ~ 2 x 0.6277 x 0.0134 0.0256 Thus o($,) = J2 x 0.6277 x 1294 = 0.127 (81) = \2X 0.6277 x 0.0256 = 0.179 These values are close to those found above by the theoretical formula. The 95% confidence intervals of the parameters are obtained from Eq. (5.43) using the theoretical values of o(6;) and o(8;) 0.7905 - 1.96 x 0.14 < 4; < 0.7905 + 1.96 x 0.14 or 0.5161 < @; < (1.0649) 229Observe that the upper limit must be restricted to 9, < 1.0 due to the stationarity condition, and 0.348 - 1.96 x 0.215 < 6; < 0.348 + 1.96 x 0.215 or -0.0734 < 6; < 0.7694 The parameter values obtained by the IMSL program FTMXL* after 9 iterations are $, = 0.791457; 6; = 0.348672; 59 = 0.000017; 62 = 0.627668. The parameter values obtained by the IMSL program FTCMP* after 50 iterations are $, = 0.790691; 6, = 0.248173; 8,9 = 0.000017; o? = 0.627668. The residuals and their sums of squares obtained from the IMSL program FTMXL* are shown in Table 5.9 STEP (7). Goodness of fit tests. The autocorrelation of the residuals r,(z,) is calculated and plotted at least for lags up to L=N/l0+p+q=51/l0+1+1+7.1=~8. The residuals statistics are listed in Table 5.10. Figure 5.9 shows the autocorrelation of the residuals up to lag 29. It is seen to remain well within the 95% confidence interval indicating that there is no significant correlation structure in the residuals The Q-statistic, calculated from the sum of the squares of the autocorrelations, is: L Q=N £ [r,(e)]? = 51 x 0.33966 = 17.3227 x * Comparing this Q-statistic with the chi-square value with L-p-q = 29-I-1 = 27 degrees of freedom, which at the 0.05 significance level is 40.113, shows that the ARMA(1,1) model passes the Porte Manteau test. Both tests indicate that the residuals appear to be independent. STEP (8). Akaike test. The Akaike test is used to select the best among competing models. The following models were fitted to the standardized 2, series with the following results *See Appendix of Chapter 5 on computer programs 230Model 8 by be 8, a 00. a AR(1) -0.000036 0.5588 - - 0.663424 AR(2) -0.000028 0.4036 0.2534 0.622512 ARMA(1,1) -0.000017 0.7907 a 0.3482 0.627668 ARMA(2,1) -0.000017 0.7351 0.0586 ~=—-0.3171-:0.625062 Table 5.9. Residuals, Squares of Residuals and Sums of Squares Obtained from IMSL Program FTMAXL. RANK RESIDUALS —S.RESIDUALS _S.S-RESIDUALS 0 ° 9 +004602 +po0021 000021 11805755 3.260753 3.260774 “11065905 1135153 4.396927 1448590 +202131 4.598058 1333785 4.382853 e.74ges0 7.729513 iaqeaag 8.177862 1213 8.593075 1105587 11144 teizise 145025 1359002 28883 ~1383763 1155043 8.933176 ~1630371 1397367 91330544 ~1309574 1827324 10.157868 1577270 1333241 10431108 1361758 1130867 10.621976 ilesee70 «31470286 «14. 082262 11438284 = «2.068561 16. 160823, ~1851317 1724740 18. 885863 1545302 1297354 17.183017 1343834 va9082318.073840 1428643 iige024 —18,255865 1318510 i101448—18,357313 ~+360165 ies71918:487032 ‘0sss25 1004426 = 18.491458 234859 1055158 18,546615 ara673 teste? = 18.775744 264462 1068940 18..845684 1612344 1374985 19.220650 ~a7aie1 1760685 18.981315 +063208 1003885 19885310 317208 1100619 20. 085928 Piassi tsil2i2 —20:597141 1227826 o77oal —-20.874152 s2ise5 Ba934e 21524108 102758 1010553 21534667 752300 1365855 22. 100622 076872 005825 22. 106547 657303, 432055, 528602 -1513233 1263414 2.802016 {769946 tsseg08 23, 394824 ~1426241 Tigiesi 231576505, 1038848 1009771 23. 586276 lleas2g6 = 2.853721 28.439997 =1421255 1177457 28.6 17454 1813053 {661065 27.278513 1821828 1675401 27.953920 1511183 1261303 28.215229 -11392861 11940063 30. 185292 1362273 L.ess787 —32.011078 231Table 5.10. Statistics of the Residuals MEAN = (+0533 VAR = 6248 ~ LAG _AUTOCOUAR AUTO CORR. SSG AUTOCORR PART AUTOCORR . 02256 90130 Toatis, looses loroas lo1s1s 103035 203273 Ms 12. 13: is. 104139, i +15880 igs 100182 is. 122121 104408 20. 123789 116143 au 127638 110352 22, 127701 109844 23. 128399 104288 24: 28872 102014 25. vas032 217118 26. s0Bi24 29882 105581 er. 114303 131733 103417 2 100850 £31246 112393 28: 114883 133866 103097 The Akaike information criterion AIC = N 2n(MLE of residual variance) + 2(ptq) applied to the above models gives AIC(1,0) = 51 £n(0.663424) + 2(1) = -18.9274 AIC(2,0) = 51 £n(0.622512) + 2(2) = -20.1736 AIC(1,1) = 51 2n(0.627668) + 2(2) = -19.7529 AIC(2,1) = 51 £n(0.625062) + 2(3) = -17.9651 . The AR(2) model has the minimum AIC value and is the theoretical choice. However, the AIC and the variance of the residuals of the ARMA(1,1) model are so close to those of the AR(2) model that both models are essentially equivalent STEP (9). Generation. The 2, series may be generated by the formula 232rie 'PHRS) Figure 5.9. Autocorrelation function of residuals 2, LP tet be tl The last value of the observed series is taken as initial value. The initial value of the residual ¢,., is taken as the last entry in Table 5.9. A random number generator is used to produce the ¢, values which are normally distributed with zero mean and Variance 62. The results are shown in Table 5.11 and in Fig. 5.10 The synthetic flows are obtained by the transformation 4, = 3s + q= 2, x 13167.569 + 54362.00 The results are shown in Fig. 5.11 STEP (10). Forecasting. From the model Ore Fee Oey the following forecasting function is obtained (including 6,, if non zero) 2,(1) = $12, - O16 + 8, 24(2) = 12,1) + 8, 233Table 5.11. Generation, Forecasting Weights, Forecasts and 95% Forecast Confidence Intervals Calculated for $1 = 0.790691, 8, = 0.384173, B99 = -0.000017, and 62 = 0.627668 LeaD SIMULATION _HIEGHTS FORCAST DEVIATIONS 1 442518 2 348695 3 276658 4 1218751 ‘33821? teisiis 5 Ti7eses izs74o8 11850055 8 1138762 ‘2l1420 1.889140 7 1108136 Tie7is1 1180973 8 vogsso2 tig2i4s 1388333 3 ‘067606 hiogéz1 1882820 10 147856 1053455, tosase7 1 95762 i aseaas loazes7 loss2aa 1 1aa7sea 2 -1lo10478 ‘033420 S0si603 «1.38686 3 laeazee soae425 ‘ogo7es 1 138369 14 Togoado ‘oaogs4 Tog2e31 1 Lgss818 15 328495 voissat toas46s «1.300082 18 11288060 1013063, ‘ogoizo «100262 1? 1ss5938 Touoaas Toisese 1100368 18 Si0012 ‘oosis7 to12543 «1300435 1s 11017158 loosa57 Tooss0s «1300477 20 =los94g2 1005108 loozais 1800503 a1 339637 ‘004037 ‘oosis2 1.300518 2 262400 ‘oosise Toosess 11300830 23 593587 looase4 Tooss22 «1300536 24 1133808 ‘001895 ‘ooz005 1.300540 5 711737364 001578 Tooaass 11300842 26 941333 so01248 too1e4s 1.300544 2? -11830718 ‘0008e7 Soo1445 © 1.800545 28 =1750438 ‘000780 Too1128 11800546 23 -1.44s572 000817 too0a73 «1300546 30 -2!061807 Toooas 000673 t.800546 31 71016151 ooo3es 00515 1.800548 2 835590 000305 000381 1: 300548, 3 880336 ooo2st ooozs2 11300546 34 007728 oooist oooala 00546 35 348258 ooo1st 00152 00546 38 541g26 ‘000113 ‘000103 300547 37 sisaae 000084 ‘ooooss 1.300847 38 895720 ‘000075, 000034 11800547 33 581482 ‘oo00ss 000010 1.800847 40 o79si7 ‘000047 ooo00s 11300847 41 1287387 ‘000037 ‘90024 «11800547 42 11050847 ‘ooo023 oo003s «1.300547 3 ‘es3aes ‘000023 000045 11300547 44 -11813883 ‘000018 oo00s3 «1.800547 45 134653 Soooo1s o000ss 11800547 46 s0sea2 ‘oooo11 000063 «1.300547 a 842695 ‘oooo0s 0000s? «1.800547 48 #1713880 ‘000007 900070 «1.800547 48 1035865 ‘ooo00s ooov7e «1.800847 50 T1z6156 ‘000004 oo0074 = 1.800847 = -1) + > 2y(L) = $42,(L-1) + 0,,,L22. With the parameters ; = 0.790691, 0, = 0.348173, @. = -0.000017, zs; = 1.465609, and €s, = 1.362273, we Rave 234ame FETAL CATA SYNTHETIC DATA ' 20 a" é 5 am i 2.01 \ i 3.000 + z Fi eo Se oo Ge gpe 2a fa 8o tho Figure 5.10. Generation of 2, series, Niger River. 10 ‘ACTUAL DATA ‘SYNTHETIC DATR 00 2 com Steed So A & ono oo aa o 120 Ba 8.0 ve WO 5.0 308.0 TERR cveneSi® Figure 5.1]. Actual and synthetic annual flows, Niger River 253(1) = 0.790691 x 1.465609 - 0.348173 x 1.362273 - 0.000017 = 0.6845 235251(2) = 0.790691 x 0.6845 - 0.000017 = 0.5412 251(3) = 0.790691 x 0.5412 - 0.000017 = 0.4279, etc. The small but nonzero value of 8, produces a small drift in the forecasts. The forecasts af@ listed in Table 5.11 as calculated by the program FTCMP* and are plotted in Fig. 5.12. The flow forecasts are obtained by the transformation aL) = 2,(L)s + q = 2,(L) x 13167.569 + 54362.00 and they are plotted in Fig. 5.13. a peas| FORECAST oF Figure 5.12. Forecast of 2, series, Niger River The 4-weights are calculated from Eq. (5.66), namely Wye w= rede? i=, 2, and the 95% half confidence interval is calculated from Eq (5.68) with Eyjg = 1-96 and 42 = 0.62768 a/2 We have thus ¥See Appendix Shapter V on computer programs 236Figure 5.13. Forecasts of annual flows, Niger River | i] ye Uhye Ue werk BLP y= Grade) OF t+ 2 we Jugal + 2 wel", 1 0.4425 0.1958 1 1.5528 2 0.3499 0.1224 1.1958 1.6981 3 0.2767 0.0765 1.3183 1.7829 etc. The forecast weights and the 95% confidence intervals (deviations) calculated by the IMSL program FTCMP* are list- ed in Table 5.11 and plotted in Fig. 5.12 for the 2,'s and in Fig. 5.13 for the flows It may be more interesting to do "real-time forecasting." For this purpose the first 30 terms of the series are used to evaluate the initial model parameters. With this model the Jead-1 term is forecast. When the 3ist term becomes available the 3l-term series is used to re-evaluate the parameters and the lead-1 forecast is estimated. When the 32nd term becomes available the 32-term series is used to re-evaluate the param- eters and the lead-1 forecast is estimated. This procedure is repeated up to the Sist term. The calculations are performed 237by repetitive use of the IMSL program FTCMP*. Figure 5.14 shows the "real-time" forecasts and the historical data. ‘Table 5.12 shows the evolution of the parameters and the forecasts. The last values of $1, 61, 8 and 6 correspond to those previously found ‘00 LINE -- EXPLANATIGN [ACTUAL DATA @ FORECAST oATa dn su Me yg (wee Figure 5.14. Real time forecas Niger River. Table 5.12. Real Time Forecasting, Standardized Flows. Niger River starting at time t = 30 yr YenR) ARPS RCPS FReCaSi(H) ACTUAL 1 som .gissa : iNa003leesay 5 "igen Telos 2 ‘sg “Sess 3 ngs Ses é igs eres > ; Nese Sases = 8 Ness lsiy = 3 "ges ‘grog 8 ‘ges (Stes it igves leeae fa iiss lass = 5 ‘Boss Sete i res lsaara iB ‘How ‘ss00 6 ‘Hels Seas ¢ Bases [Sr7eg Fa 2rs20 Soar is ‘zrigs “Sat00 2 gross erase 2 eos legos? reeset 2 ‘hole leave? 238It is also interesting to generate several series. One hundred synthetic series of 51 yearly flows were generated. A sample autocorrelation function, the average autocorrelation function and the theoretical autocorrelation function are shown in Fig. 5.15 AUTOCORRELATION ¢ & \ a wn wt Figure 5.15. Sample ACF of series, average ACF of 100 series, and theoretical ACF. 5.2.8 LIMITATIONS TO BE CONSIDERED IN APPLICATIONS OF ARMA MODELING OF ANNUAL SERIES. A controversy exists regarding the adequacy of the ARMA models for reproducing the persistence encountered in hydrologic time series. The long-range dependence in hydro- logic time series is manifested by the fact that extreme events may persist for a long time. In the design of water re- sources systems through simulation methods, the hydrologic sequence is generated for a very long time, usually extending 500 to 1000 years. In such long records, it is reasonable to expect extreme precipitation and extraordinarily high river Jevels. It is evident that the occurrence of a very long drought period or a very long period of wet years would necessitate enormous reservoir capacities. Therefore, the generation of the long-range dependence effect is of vital importance to the water resources system planner Hurst (1951, 1956) was the first to do a detailed analysis of the long-term capacities of reservoirs making use of the 239departures from the mean draft. He analyzed a large number of time series of annual flows, precipitation, temperature, tree rings, and mud varves ranging from 40 to 2000 years, and found that the rescaled range (see Sec. 2.2.5) obeys the relationships Ry ~ N" with h, now called the Hurst coeffi- cient or Hurst slope, having an average value of 0.73 and a standard deviation of 0.08. On the other hand Hurst (1951) and Feller (1951) showed that for an independent normal process h = 0.5. The Hurst coefficient h is a measure of the persistence or the dependence structure of a time series and so it is re~ lated to the correlation function of the series. Studies have demonstrated that h = 0.5 is valid not only for independent, normal variables but also for some dependent variables such as AR variables. AR models have been labeled short-memory models or of short-term dependence since their correlation functions decay rapidly as the number of lags increases. On the other hand, the opposite occurs for long memory models or long-term dependence. The consideration of short-term and/or long-term dependence has led hydrologists and statis- titians to propose various alternative models for the stochastic modeling of hydrologic time series. ‘The fractional Gaussian noise model (Mandelbrot and Wallis, 1969) was designed to model long-term dependence. Two basic characteristics of this model are that its autocorrelation function is not sum- mable and h > 0.5_ in contrast to AR models for which h = 0.5. The broken line model (Mejia et al., 1972) exhibits characteristics similar to the FGN model. Another alternative is provided by certain ARMA models which possess long-term dependence characteristics even though h = 0.5 assymptotically, O'Connell (1971, 1977) has studied in particular the persistence characteristics of the ARMA(1,1) model and found that the parameter region’ 0<@<1 and’ 0<@<1, $>@ is of particular interest in modeling long- term persistence. Simulations, carried out by Hipel and McLeod (1978) and Salas et al. (1979), show that with ac- curately fitted parameters, the ARMA models possess an auto- correlation which decays exponentially, but sufficiently slowly to approximately preserve the rescaled adjusted range and the Hurst coefficient. In summary, the ARMA model could be used for modeling time series with long-term dependence. However, one must consider the fact that in trying to preserve the long-term de- pendence structure, the short-term dependence may be often distorted or may not be preserved. Thus, depending on each particular case the analyst must decide which properties of the time series are required to be preserved and face the possible consequences of not preserving some others. In 240general, several synthetic annual time series may be generated to obtain an estimate of the various statistics such as the mean, variance, skewness, correlogram, rescaled ad- justed range and the mean drought length. ‘Then the com- parison of the historical and generated statistics can be made to ascertain whether the fitted ARMA model is able to pre- serve the major historical statistics intended by the modeler. 5,3 ARMA MODELING OF PERIODIC TIME SERIES As indicated in Chapter 2, periodic hydrologic time series are those for which the time intervals are less than one year. For instance, seasonal series, monthly series, weekly series or daily series are periodic with either some or all their statitical characteristics varying with time in a periodic manner. The correlation structure of the periodic series may be the result of an ARMA process with either constant or periodic coefficients. . In either case the model representing the original time series will be called periodic ARMA model. 5.3.1 PERIODIC ARMA MODELS. Let us consider the original periodic series x, y Where v_ denotes the year, t=1, ..., w and w is the number of time intervals in the year. Assuming that the distribution of the series is skewed, an appropriate transformation can be used (Chapter 3) to transform xy to the normal series Vy,z- Then the periodic ARMA’ hodel for Vy, can be written as Hy + Oy Ay. (5.78) where , and a, are the periodic mean and periodic standard deviation and 2, may be represented by an ARMA model with either constant or time varying (periodic) coefficients. The ARMA(p,q) model with constant coefficients is ? 5.79 - 2 Oe. 5 +, (5.79) P =k oz itt a t t jel Pt-j where t= (v-l)wtt, @ and @ are the coefficients of the model and &, is the independent normal variable. This model is the same as the one used in Sec. .5.2.1 241Tao and Delleur (1976) used the ARMA(p,q) model with time-varying coefficients as PB q Zt a 9 r By te” a 8 or Put t eye 80) where 6; , and 6, , are time varying autoregressive and moving average coefficients, respectively, and &, | is an vit independent and identically distributed normal | random variable. 5.3.2. PARAMETER ESTIMATION FOR PERIODIC ARMA (ODELS Assume as in Sec. 4.3.2 that there is an available sample of periodic hydrologic series denoted by x, , V=1,..., N and t= 1, ..., w where N is the total number of years of data and w is the number of time intervals within the year. As said before, prior to estimating the parameters of the models given by Eqs. (5.78) and (5.79) or (5.80), the transformation to normality should be made following the pro- cedure indicated in Chapter 3. The parameter estimation for periodic ARMA models is similar to that given for periodic AR models in Sec. 4.3.2 Removal of Within-the-year Periodicity For monthly series the monthly average jy, and standard deviations s_ are obtained month by mofth, or quarter by quarter for’ quarterly series, and are introduced in Eq. (5.78) as estimates of H, and oO respectively. For daily or weekly series the Fourier coefficients for the periodic mean and periodic standard deviation are calculated and the Fourier series fit of vy, and 8, are determined foliowing the procedure indicated in Secs. 3.3 and 4.3.2. The series Yy,r i8 then standardized by (5.81) where fi, and @, are either , and s, or their Fourier series fit. By removing the periodicity in the mean and in the standard deviation the series 2, of Eq. (5.81) be~ comes second-order stationary provided the autocorrelation function is approximately stationary. 242Fitting Constant Coefficient ARMA Models The technique of fitting the ARMA(p,q) model to the 2, _ Series is the same as that explained in Sec. 5.2.2 with t + (v-l)wt. It must be remembered, however, that the synthetic series generated are z, | series, and that an in- verse standardization is needed to produce the y,, | series of Eq. (5.78). Likewise, if a transformation such’ ds a log- arithmic transformation has been used to obtain the y., series, an inverse transformation, i.e. exponentiation, is necessary to obtain the desired series x, ,. These models are, in general, satisfactory when the correlation function is approximately stationary. If the correlation function is periodic it may be desirable to consider an ARMA imodel with periodic coefficients. A Models Fitting Periodic Coefficients ARI The periodic correlation ry , of the series 2, may be computed from Eq. (2.10). ‘Thus, approximate estimates of ; and 8, , may be obtained from generalizations of the Yule-Walker Equations (Salas, 1972). For example: ARMA(L,O) 8). = Ty 5 (5.82) rot r. ltl 2,1 ARMA(2,0) 9,» = Eh et 1, Itt (5.83) by = et Mag Tet 2,1 ar ARMA(1,1) Eta res bt (5.84) a-6 hye Lt. . (6.85) 7 oe et Equation (5.84) is seen to be analogous to Eq. (5.29) and Eq. (5.85) is analogous to Eq. (5.28). Exact moment estimates are given by Salas et al. (1980). 243The final estimates of the 9's and 6's can be obtained Gf desired) by fitting a harmonic function to their initial estimates 5.3.3 GOODNESS OF FIT FOR PERIODIC ARMA MODELS The tests for the goodness of fit for periodic ARMA models with constant coefficients are the same as those cited for the annual series in Sec. 5.2.3 Regarding the time varying ARMA models, there is no theoretical or empirical test available for testing the periodic correlation in the residual of stochastic models. For the ARMA(1,1) model the approximate variance of the residuals is (5.86) Equation (5.86) is similar to (5.26) with Y= 1. Tao and Delleur (1976) have proposed to replace the \fonperiodic Porte Manteau statistics Q by (see Eq. 3.46b) Low . Q@eNE =F (ry) (6.81) , wel ter) Kt in which N is the number of years of observations, w is the number of observations per year, L is the number of lags taken into account and r, | is the periodic correlation coefficient of the residuals at time « with lag k. The Q; statistic is similar to the Q_ statistic of Eq, (5.50), there- fore, it is called the modified Porte Manteau statistic. ' Smaller Q; | statistics indicate a lesser periodic correlation in the series. 5.3.4 SUMMARIZED ARMA MODELING PROCEDURE FOR PERIODIC SERIES STEP (1). Do the appropriate transformation so that the series is approximately normal. This may be a logarithmic transformation, a power transformation, a Box-Cox transfor- mation, etc. (see Sec. 3.2) STEP (2). Make the series stationary by Eq. (5.81). Typically yj, and o, are estimated by Y, and s, respec- tively for ‘quarterly' or monthly series.‘ For sebies with shorter time intervals the parametric standardization using Fourier series fit is more parsimonious requiring fewer param- eters. The Aj and Bj coefficients of the Fourier series 244are obtained by Eqs. (3.32) and (3.33) for the mean and standard deviations. The number of harmonics are determined by the criteria suggested in Sec. 3.2.3. The fi, and 6, values are calculated applying Eqs. (3.30) and (3.31) in each case and the standardized series is formed by Eq. (5.81). A. Constant Coefficient Model The fitting of the ARMA(p,q) model to the 2, = 2, 5 series (t = (v-l)wtt) is the same as in Sec. 5.2.6, including the steps (2) through (11). Such steps are renumbered and summarized as: STEP (3). Calculation of autocorrelation and __ partial autocorrelation functions STEP (4). Identification. STEP (5). Initial estimate of the autoregressive parameters. STEP (6). Initial estimate of the moving average parameters. STEP (7). Maximum likelihood estimate of the parameters. STEP (8). Test of goodness of fit - Porte Manteau test. STEP (9). Akaike information criterion test STEP (10). Synthetic generation (if desired) STEP (11) Inverse transformation. Once the generated or forecasted z, , values are obtained, apply the inverse of the standardization transformation: If an initial transformation was used, such as a logarithmic transformation, an inverse transformation such as exponentia- tion is needed to obtain the series in the original form. STEP (12). Forecasting (if desired), followed by the above inverse transformations as needed B. Periodic Coefficient Model If there is reason to believe that the standardized series 2, _ is not stationary, the ARMA model with periodic coeffi- cients may be considered. After the standardization the following steps are used: 245STEP (3') Compute the periodic correlation coefficients by Eq. (2.10). Step (4'). Obtain the periodic coefficients of the ARMA model from Eq. (5.82) through (5.86) depending on the case. STEP (5') Optional fit of the periodic function to the estimates of the coefficients (six harmonics are usually sufficient) STEP (6'), Test the goodne: Q-statistie Eq. (5.87). of-fit using the modified EP (7'). Use Eq. (5.80) for generation of synthetic data Gf desired). STEP (8'). Take conditional expectation of Eq. (5.80) to obtain the forecasting function (if desired) 5.3.5 EXAMPLES OF ARMA MODELING OF PERIODIC SERIES Example of Modeling with Constant Coefficients Model Delleur and Kavvas (1978) applied ARMA models to the average monthly rainfall series over 15 basins located in Indiana, Illinois and Kentucky. The basin areas varied be- tween 240 and 4000 square miles, approximately. The average rainfall was obtained by the Thiessen polygon method. The record lengths varied between 468 and 684 months. The monthly rainfall at Salamonia, Indiana, are used in this example, The data, x, |, are given in Table 5.13. For example X, 1 = 3.920, X 1 = 3.900, Xgg ) = 1.340. a STEP (1). Transformation, The square root transformation of the monthly rainfall was used in order to obtain a series which is approximately normally distributed. The last two lines of Table 5.14 show the monthly mean and the monthly standard deviations of the monthly rainfall square roots. For example, vie ie (3-920 + J5900 + ... + J1.340] = 1.5145, and co _ 2] Vv/2 81 =| 37 ae Oy - Fp = 0.5660 where Vy, = 43-920, yp , = 73-900, ete 246“euerpuy ‘eruowepeg oT ob "8 e 4 4 “9 "e qe (seysut) uopendioorg “e1'S Ode o2e"1 aus 809-2 Neat 247p9gb" bess: ose? cogs" eaee"t 2are"T Sbrs vors gsee'2 SE00"— 7 6200" nr E0Sh* dbTOrT 2eeB s ’ & 2 1 “eueypuy ‘eruouepeg ye (seysUT) UONeNdIOAIg Jo sjooy aseNbg Jo saicog psepuEg pais 1 Nea & PI'S LGR 248STEP (2). Stationarization. The square root transformed series was stationarized by means of Eq. (5.81) where {i and 6, were equal to y, and s, respectively, as showh in Table 5.14. For example z. = (/37920 - 1.5145)/0.5660 = 0.8222. 1a STEP (3). Autocorrelation and partial autocorrelation. The autocorrelation and partial autocorrelation functions were cal- culated and are given in Table 5.15. STEP (4). Identification, The autocorrelation and the partial autocorrelation functions were used in the identification of the time series which indicated the possibility of an ARMA(1,1) model. STEP (5). Initial estimate of the autoregressive parameter. The initial estimate of the parameter ; was obtained from Eq. (5.29): 1 = re/ry = 0.0179/0.0288 = 0.62. STEP (6). Initial estimate of moving average coefficient 0). It was obtained as in the example 5.2.6 step (5), which also yields the value of a. The values of the preliminary esti- mates obtained by thé IMSL subroutine FTARPS and FTMPS are given in Table 5.15. STEP (7). Maximum likelihood estimates. Refined estimates of the ARMA(1,1) parameters which maximize the Log Likeli- hood function were obtained by minimizing the sum of squares of the residuals. The values of S($,8) = 2 c? (9,8) obtained as in step (6) of the example of Sec. 5.2.7 are listed in Table 5.16. It is seen that the sum of squares surface exhibits a diagonal valley going from (9,6) = (0,0) to (1,1). In this particular case the lower portion of the valley is very flat and in this region there is a large number of combinations of possible @ and ® values. The approximate parameter values which minimize the sum of squares of residuals are $, = 0.9 and 8, = 0.9. The estimated parameters obtained from the sum of squares of residuals were used as initial values in the IMSL program FTMXL which seeks the minimum of the sum of squares of the residuals. The final estimates of the parameters are shown in Table 5.15. STEP (8). Test of goodness of fit. The Porte Manteau lack of fit test was applied. The Q-statistic is given in Table 5.15. The complete program listing for this example is given in Appendix A5.4. The ARMA(1,1) model passed the first test in all 15 cases studied by Delleur and Kavvas, and the second test in 14 cases. 249Table 5.15 Autocorrelation and Partial Autocorrelation Functions, and Partial and Final Parameter Esti- mates for the Standard Scores of Square Roots of Precipitation (in) at Salamonia, Indiana. Les AUTOCORRELATION PART. AUTOCORRELATION Parameter Estimates ARMA(1.1) 4 & 7 s(.8) Preliminary 0.62 0.59 0,974 - - Sum of Squares Surface 0.9 0.9 439.0 - FTMXL 0.914 9.961 0.961 28,60 wigp (908) = 30.8, n= 28 STEP ($). The forecasting function takes the form Gegp] = 2G) = Order a) + lepep] ~ Orl re a] where the square brackets indicate conditional expectations as in Eq. (5.56). Thus, 2,(1) = O12, - Bie, 2,(2).= 912,(2) 250EprverT 29roszt perose2 vy-eeee 18: ‘aoptt c£r000»T 007 * So-tee” ve-ees oe sTsee' Ee'epee Og O2"80s S9-¥es 83. oe Ge Sen te oe Estep 2 03° E-ebe Fs os SeSby a op easy be-ope oe bo-eb Bebb oe Go-ssb fonsby or 0S'S2b _26°SSP 0 a wa THs euETpUy ‘eTUOUETeS 1B SeLIeg TTeyurey ATqWwOHL pazrpaepuerg Joy (I‘L)VWUY JO sfenprsey Jo sosenbg jo ung -gt"s aTqeL 25124(3) = 6124(2) in general 2b) = 12, (L-1), L> 2 The $-weights obtained from Eq. (5.66) are: Yo ve " = ve “ & 2 = @y- 01) oft and the standard error of the forecasts is L-1 OL) = 1+ (61-81)? 6 ir0 .1) 2 2¢j-1) 0, Examples of Modeling with Periodic Coefficients Model Tao and Delleur (1976) have fitted conventional AR and ARMA models to daily and weekly flows of 20 watersheds located in Indiana, ‘ilinois and Kentucky, The watersheds have drainage areas varying from 234 square miles to 11,800 square miles and with a length of record varying from 26 years to 63 years. The daily flow series of the Salamonie River at Dora, Indiana (USGS station 33245) is examined in ‘the following example. STEP (1). Transformation. A logarithmic transformation of the daily flows is performed. STEP (2). Fitting a harmonic function to the daily means and standard deviations. Figure 5.16 shows the fits obtained by using 6 harmonics to fit the means and standard deviations of the daily flow logarithms STEP (3). Estimate the seasonal serial correlation coefficients. These are estimated by Eq. (2.10) and a 6-harmonic fit is shown for the first three lags in Fig. 5.17. STEP (4) and (5). Estimate of the periodic autoregressive and moving average coefficient. These are obtained from 2528 10.00 MEAN 3.00 20.0 0. DOO Soo | oD 200.0 DAYS Figure 5.16. Means and standard deviations of logarithms of daily flows (Station 33245). Eqs. (5.84) and (5.85). These values and a 6-harmonic fit are shown in Fig. 5.18. STEP (6). Goodness of fit test. The seasonal serial correlation coefficients of the residuals, the Qy-statistic and the cumulative periodograms of the residuals are examined. Figure 5.19 shows the cumulative periodogram of the residuals of the ARMA(1,1). It may be seen that the residuals do not exhibit any dominant frequency and may therefore be considered ‘as white noise. It is interesting to notice, how- ever, that the residuals were not normally distributed, and their distribution was closely approximated by a bi-gamma distribution as shown in Fig. 5.20. 253Figure 5.17. Seasonal serial correlation coefficients of lags 1, 2, and 8 for daily flows (USGS Station 3-3245) (logarithms). 2541.000 “B00 ‘00 ‘t " 0 00 LUD HNO Days Figure 5.18. Seasonal AR and MA coefficients for time varying ARMA model applied to the cyclicly standardized daily runoff logarithms. ARMA (1,)) WITH SEASONAL COEFFICIENTS 0.000 206, ‘vo. a6. 20 1086. Figure 5.19. Cumulative periodogram of residuals in time varying ARMA(1,1) model 255,Ba PROB. DENS, aS BI-GAMMA DALY RESIOUALS 2 Figure 5.20. Probability distribution of residuals. 5.3.6 LIMITATIONS TO BE CONSIDERED IN APPLICATIONS OF ARMA MODELING OF PERIODIC SERIES For time steps less than a year, but not smaller than a month the nonparametric standardization may give adequate results. For monthly series there are 12 monthly means and 12 monthly standard deviations to evaluate, there are there- fore 24+ptqtl parameters to be estimated from the data. For time steps smaller than a month, the parametric periodic standardization usually requires less than 12 parameters for the mean and less than 12 for the standard deviation, and the total number of parameters is less than 24+p+qtl. If a substantial cyclicity remains in the autocorrelation function, the time varying ARMA Model may be called for. It should be remembered, however, that for the Porte, Manteau test no distribution has as yet been found for the Q-statistic of this model, and the suggested Q,-statistic is heuristic. The probability distribution of the residuals may not be normal, which may create some difficulty in the generation of synthetic series using this model 256APPENDIX A5.1. COMPUTER PROGRAMS The International Mathematical and Statistical Libraries, Inc. (IMSL) GNB Building 7500 Bellaire Boulevard Houston, Texas 77036 have a collection of computer programs which include sub- routines on time series analysis. The following subroutines are pertinent to the material of Chapter 5. FTAUTO FTARPS FTMPS FTMXL FTGEN FTCAST FTCMP: Estimates the mean, variance, autocovariances, autocorrelations and partial autocorrelations for stationary time series. Preliminary estimation of _ autoregressive parameters in an ARIMA stochastic model Preliminary estimation of moving average parameters in an ARIMA stochastic model Maximum likelihood estimation of autoregressive and moving average parameters in an ARIMA stochastic model and calculation of residuals Generation of a time series from a given ARIMA Time series forecasts and probability limits using an ARIMA model. ARIMA stochastic model analysis with full parameter iteration and maximum likelihood estimation, generation of a time series, and time series forecasts 2571 SUBROUTINE FTAUTO (ls Lil Key ESHs ANEAN, UAR, ACU, ACs PACUs HKARER) copurer LaTest REVISION Pura: usace PROWMENTS. ean uae °c Pec KARE PRECISION “HARBUARE NaTeTION Ee-GINGLE SANUARY 1» 1978 MEAN, UARTANCEs AUTOCOUARIANCES, NS AND PARTIAL. NS FOR @ STATIONARY TIME SERIES, CALL FTAUTO (eLHeKeLs TSH» ANEAN, UA, ACULAC PACU, HKAREAD INEUT VECTOR OF LENGTH Li CONTAINING THE TIME u F AUTOCOUReTANCES AND AUTCCORRELATIONS 70. BE COMPUTED. INGUT NUMBER OF PARTIAL aUTOGORRELATIONS TO BE COWUTED. MUST Be LESS THAN OF EQUAL To ke inpur ConTgoL raganer 0 86 PESFORED. IF FOR DETERMINING TASK ISH = 1 FIND EAN eND VARIANCE. ISN = 2 FIND AUTOCOURRIANCE. ISU = 3 FIND Means UaRIANCE, AND ‘RUTOCOUARIANCE: ISH = 4 FIND AUTOCOUARIANCES AnD RUTCCORRELATIONS. ISH = FIND HEANs URRIANCE, AUT COURRTARCES> AND. AUTOCORRELE Tons. TSH = & FIND AUTOCOUARIANCES, AUTOCORREL~ ATLONS, MM PARTIAL AUTOCO™ RELATIONS. TSH = 7 FIND EAN, UERIANCE, @UTOCUUAR— TANCES, AUTOCORRELATIONS, AND PARTIAL AUTOCORRELATIONS. 13eS0 AND 7. Bide AND 6. NEAW UALUE OF OUTPUT FOR Iu INEUT FOR Ii THE TINE SERIES Hi. OUTPUT FOR Tsu = 1.3,5+ AND 7. INPUT FOR ISH = 2,4) AND 6. UARIANCE OF TIME SERIES 1. UECToR OF LENGTH K. QUTPUT FoR Tsu ="2,9,4)546 AND 7. SUTOCOUARIeNCES FOR TINE SeRTES L. Acucty CORRESPONDS TO A TIME LAG OF I TIME UNITS. UECTOR OF LENGTH f. OUTPUT FOR ISH = 4555) anD 7. AUTOCORRELATIONS FOR TIME SERIES uU. eccl> Corresponds To\A TINE LAG OF I TIME UNITS. VECTOR OF LENGTH . OUTPUT FOR ISH ='5 AND 7. ERRTEAL' AUTOCOSRELATIONS' OF TINE SERIES H. PACUCLY = ACTL WOR AREA UEETOR GF LENGTH L. SINGLE any pousLe/Hs > SINGLE 36,448, HEO REGD. IMSL ROUTINES ~ ~ DOUBLE uxqoD, UXHUL, VAST SINGLE /NONE REQUIRED INFORMATION ON SPECIAL NOTATION AND 258CONENTIONS 1S AUATLABLE IN THE naval INTRODUCTION O8 THROUGH IMSL ROUTINE UHELP REMARKS 1. IN SOME ROUTINES OF THIS CHAPTER ACUCI) CORRESPONDS TO @ TINE LAG OF C11) TENE UNITS RATHER THAN T TIME UNITS. THUS, IW THESE SUBROUTINES, ACUCL) TS THE Same AS THE UaeraNce YAR. INt THE CALLING PROGRAY TO FTAUTO. THE USER WISHES THE UARTANCE 1D BE THE FIRST ENTRY N TS AUTOCOURRIANCE aeRAY THE FOLLOMING CALL CAN BE aL FTAUTOCHs Lis pL ISH» AMEAN, ACUCL + ACUC)4AC+ PACU RARER), THE USER SHOULD ROTE THAT IN THIS CASE, ACU MUST BE H's CONSTANT, THEN Aly OF aCUr Ate DIMENSIONED Kei TH Tee PAIN PROGRAM. Tp THE TIRE SERIC AND! PACU THAT ARE OUTPUT, ACCORDING TO THE TSW SETTING ARE SET TO 2ER0. coPvercut = 1878 BY ISL, INC. ALL RIGHTS ESERUED, NeRReNTY IMSL WARRANTS ONLY THAT IMSL TESTING Has APPLIED TO THIS CODE. NO OTHER KnaRRANTY, EAPRESSED O8 THPLIED, 1S APPLICABLE. 1 SUBROUTINE FTARPS (ACU. HBARs IP 10, ARPS: PHACs Hay TER) COMPUTER = cOr/SINGLE LATEST REVISION —- UANUARY 1, 1972 PURPOSE, ~ PRELIMINARY ESTIMATION OF THE AUTOREGRESSTUE, PARAMETERS IN AN ARIMA STOCHASTIC MODEL. usace ~ oF LL FTARPS (AEULMBAR, IP, 10+ARPS+ PHAC Ky ARGUMENTS ACU ~ INPUT UECTOR OF LENGTH IP+T0+1 CONTAINING THE ‘OF THE TIME SERIES BEING MODELED. qCUCI) 15 THE AUTOCOUARIANC: CORRESPONDING TOA TIME LAG OF I-1 UNITS OF Tine. UBAR = INPUT HEaN OF THE TIME SERIES. Te” > INPUT NUNDER OF AUTOREGRESSIUE PARAMETERS IN "THE MODEL. TP MUST Be GREATER THAN C8 Equal TO i. 10 = INPUT NUMBER’ OF MOUING AVERAGE PARAMETERS IN 10 MUST GE GREATER THAN OR EOUAL fees ~ ISTH IP. ARPS CONTAINS IPA TES OF THE SIUE PARAMETERS OF THE MODEL Pyac = OUTPUT OUERALL ROVING AUERAGE CONSTANT. La” > HORE ARER VECTOR OF LENGTH IPe=2e52IP. ee = TERMINAL ERROR Rn 189 INDICATES ATED © SINGULAR SYSTER. TIS USUALLY Gapreares TuacID-Gneues IN THE ACU UeCTOR oR A TINE SERIES WHICH TS honsrarionaey. PRECTSION/HARDUARE - SINGLE AND DOUBLE /H32 = SINGLE ABS, Haas H30 REOD. IMSL ROUTINES ~ LEOTIF +LUDATH + LUELMF UERTST-UGETID, UREANoTaTION coPyercHT neRAntTY SUBROUTINE FINES: COMPUTER LATEST REVISION PURPOSE usace ARGUMENTS ACU PRPS P pres ayy 1 TER PRECTSION/HARDNARE, Reon. IMSL ROUTINES noTaTrON = INEDRNATION QN SPECIAL NOTATION AND CONUENTIONS TS AVAILABLE IN THE MANUAL INTRODUCTION OR THROUGH THSL ROUTINE UHELP ~ 1878 BY IMSL. INC. ALL RIGHTS RESERVED, = SSL HeQRANTS ONLY THAT INSL TESTING HAS BEEN APPLIED TO THIS CODE. NO OTHER WARRANTY, EXPRESSED Of IMPLIED, TS APPLICABLE. (ACUs ARPS) IPs 10)PHAS. WNUs HAs TER) > enc/SINGLE upUARY Le 1978 = PRELIMINARY ESTIMATION OF THE NOUING AVERAGE. PARAPETERS IN AN ARIMA STOCHASTIC MODEL = CALL FTMPS (AOU, ARPS, IPs TO+PHAS;HNUs Ay TER? INPUT VECTOR OF LENGTH IP+To+1 CONTAINENG THE AUTOCOUASTANCES OF THE TINE SERIES BEING MODELED. “ACU(T) TS THE AUTOCOUARTANCE CORRESPONDING TOA TIME’ LAG OF I=L UNITS. OF THE. INPUT GecToR OF LENGTH IP. THIS VECTOR CONTAINS THE PRELIMINARY ESTINATES OF THE AUTOREGRESSIUE PARAMETERS OF THE MODEL. THESE ESTIMATES CAN BE COMPUTED BY CALLING SUBROUTINE FTAgeS PRTG? TO CALLING FIMBS. ~ INPUT NUMBER OF AUTOREGRESSIVE PaRareTeRS IN THE HOUEL. TP MUST BE GREATER THAY OR FOURL INPUT NUMBER OF MOUING AVERAGE PARAMETERS IN THE MOREL. TO HUST SE GREATER THAN O EQUAL 101. ~ OUTPUT VECTOR OF LENSTH Ta. PHAS CONTAINS ‘THE MOVING AVERAGE PARAMETERS. = OUTPUT UNITE NOISE UARTANCE. = MORK Agen VECTOR OF LENGTH t3ecta+1)9#¢¢(1049)=10) 72) . = ERROR PARAMETER. (OUTPUT) TERHTNAL. ERROR ER = 139 INDICATES FATLURE OF THE ALGORITHM TO CONVERGE TO ACCEPTABLE ESTIMATES FOR THE MCUING AUERAGE PaRAETERS. 3eR = 130 INDICATES & SINGULARITY INTHE NONLINEA@ COUATIONS HICH HUST BE SOLVED IN THE ITERATION PROCEDURE. THIS CONDITION Hay BE CAUSED BY EXTREMELY SMALL UALUES IN THe UecToR acu. 1eg = 131 INDICATES ACUCL) IS LESS THAN OR Eoual To Zend, JER = 32 INDICATES @ COMPUTED HITE NOISE UsPrANCE IS LESS THaN OR EGUAL TO ZERO. THIS INPLIES THAT 10 1S LESS THAN OF EQUAL TO ZERO. = SINGLE ann nouLe a2 = SINGLE HSS, Hag, HEC ~ FTVQS,UERTST.UCETIO,Z5¥STH INFORNGTION ON SPECTAL NOTATION AND 260CONVENTIONS TS AVAILABLE IN THE NaNUAL. INTRODUCTION O@ THROUGH IMSL ROUTINE UHELP coPyRIGHT = 1978 BY IMSL+ INC. ALL RIGHTS. RESERUED. ARRANTY: = ISL WARRANTS ONLY THAT INSL TESTING HAS BEEN D TO THIS CODE. NO OTHER Lak A SUBROUTINE FHL (Xs IND, ARPSsPTAS) PHAC, ANU, GR+AL TER) COMPUTER = cocrsincLe LATEST REVISION —~ JANUARY 1, 1878 PURPOSE, ~ MAXIM LIKELIHOOD ESTIMATION OF PUTOREGRESSIVE AND MOUING AVERAGE PARAMETERS IN AN ARTHA (BOX-JENKINS) STOCHASTIC MODEL usece = CALL FTMXL. (xy INDs ARPS: PHAS, PHAC. uN GRy TER) PRGUMENTS X= INPUT TINE SERIES OF LENGTH INDI), X15 DestRoveD DY OUTPUT. INPUT/OUTPLT VECTOR OF LENGTH @. INDI) Cone TAINS HHEN Tel, LENGTH OF TIME SERIES x. 382) THUEE® (NON-NEGATIVE) OF euToREGRES- SIUE PARAMETERS IN THE DIFFERENCED FORM OF THE ARIA MODEL. 183, NUNBER CHON-NECATIUED OF MOVING AUER AGE PARAMETERS. IND(S)+INQ(3) MUST BE POSITIUE. Ted, NUMBER (NON-NEGATIVE) OF DIFFERENCING mm OPERATIONS REQUIRED TO HeKE x STATION- ARV. IF IND(4)=0 THE MEAN TS REMGUED FROM x. 325) INCU MAKIMUM RUNBER OF ITERATIONS DESIRED. “OW OUTPUT. IND(S) CONTAINS THE NUMBER GF ITERATIONS PERFORMED. Isr NON-NEGATIVE CONUERGENCE PARAMETER. CONVERGENCE 15 ASSUMED IF INDCE) SIGHIF- ICANT DIGITS OF THE OBJECTIVE FUNCTION DO NOT CHaNBe AFTER IND(B) CONSECUTIVE ITERATIONS. IZ, INDC7) NONZERO IMPLIES INITIAL ESTI- SATES OF ARPS AND PHAS IN THE DIFFER ICED FORM OF THE MODEL ARE INPUT. IND(?)=0 IMPLIES FTMAL CALLS FTARPS AND FTHPS TO CALCULATE INITIAL ESTIMATES. T=, POSITIUE CONVERGENCE PARARIETER AHOSE FUNcTION 15 DESCRIBED UNDER IND(E). RPS — INPUT/OUTPUT UECTOR OF LENGTH IND(2)+INDC4) « (ON INPUT. IF IND(?) 15 NONZERO. THE FIRST TNp(2) LOCATIONS SHOULD CONTAIN INITIAL ES~ ‘TINATES OF THE AUTOREGRESSIUE PARAMETERS IN THE DIFFERENCED FORM OF THE MODEL. ON OUT= PUT, THE INDC2)+IND(4>. PARAMETER ESTIMATES ARE’ FOR THE UNDIFFERENCED FORM OF THE MODEL. PraS = INPUT/OUTPUT UECTOR OF LENGTH IND(S).. ON IN PUT, IF INC?) 1S NONZERO, Pras SHOULD CON TAL INITIAL ESTIMATES OF’ THE NOUING AUERAGE PARANETE?S. ON OUTPUT, THE PARAMETER ESTI~ HATES. ARE RETURNED. PHAC = OUTPUT ESTIMATE OF OUERALL MOVING AVERAGE CoN- STANT IN THE UNDIFFERENCED MODEL. 261WU = OUTPUT ESTIMATE OF THE HITE NOISE UARTANCE. GR = HORK AREA OF LENGTH 2¥CINDC@yIND(S))« A= HOR ARES OF LENGTH THE naxtiit OF Te CINDC2)+S)¥INDC2)+INDCSI HL BI CCINDC)*3)#IND(3))/2eSwINDC3I+INDCD+E 31 eeINDCD) TER ~ ERROR PARSMETER. COUTPUT) TESHTNAL ERROR TER=129. INDICATES AT LEAST ONE ELEMENT OF TND aS" OUT OF RANGE 126130 INDICATES AN ERROR OCCURRED IN THSL ROUTINE FTARPS. MORNING HITH FTX TERE? INDICATES AN ERROR OCCURRED IN rHsL ETHES, INITIAL PAS ESTIMATES 50. 26%0. ATES THAT ALL ND(S)_ ITEReT IONS UERE PERFORMED. CONVERGENCE <5 aSSUreD SND PROGRAM CONTINUES. CALCULATIONS. PRECISION/HARDUARE ~ SINGLE AND DOUBLESH3a REQD. IMSL ROUTINES - SINGL oTarion REHERKS copyaicHT uarRAnty usase ARGUNENTS: = SINGLE 136! 148-50 E/E TARPS, FTAUTO) FIPS: F TH0S. LEGTIEs CUBATE. LUELHF UERTST-UGETIO, UABriAr. 25¥sTh = DOUBLE/F TARPS; FTAUTO)FINPS»F THOS. LEOTIF, LUDATF LUELHF UERTST. USETIO. UABNXF . UXADD. UXMUL UXSTO, Z5¥STH INFORMATION ON SPECIAL NOTATION AND COWENTIONS 18 AUAILASLE TN THE MANUAL INTRODUCTION OR THROUGH IMSL ROUTINE UHELP ESTINATES OF THE RESIDUALS 08 ONE-STEP FORECASTING ERRORS ARE CONTAINED. IN THE FIRST INBC1)=2NEC4) LOCATIONS OF WORK UECTOR A. = 1978 BY IMSL, INC. ALL RIGHTS RESERVED. ~ IMSL _HARRANTS ONLY THAT IMSL TESTING Has BEEN APPLIED TO THIS CODE. NO OTHER WARRANTY, EXPRESSED OR IMPLIED, IS APPLICABLE. (ARPS, PHAS, PHAC, START, HAV» DSEED» 1Py 1GyLHs4 Ul) = coc/stnoLe = vanuary 1, 1978 ~ GENERATION OF § TIME SERIES FROM A GIUEN ARIMA CBO-JENKINS) STOCHASTIC MODEL = CALL FTGEN CARPS+PrAS PACH STAR 1) Tar Lies ka) sus DSEEDs ARPS - INPUT VECTOR OF LENGTH IP CONTAINING THE RUTOREGRESSTUE PARAMETERS OF THE MODEL. Pras - InpUT VECTOR OF LENGTH 10 CONTAINING "THE FOUING AVERAGE PARAMETERS OF THE MODEL. Prac - rNpuf CUERALL HOUING AUERAGE PARANETER. START ~ INPUT VECTOR OF LENGTH IP CONTAINING. STARTING \UALUES HITH WHICH TO GENERATE THE TENE SERIES. Uny_~ INPUT WiITE NOISE UaRTANCE. DSEED - INPUT. AN INTEGER UALUE IN THE EXCLUSIVE 262RANGE (1+2147493647). DSEED 15 USED TO INITIATE THE GERERATION, ANDO EXIT. 15 REPLACED BY 8 NEW DSEED 10 BE USED IN SUBSEQUENT CALLS, DEED UST BE TYPED DOUBLE PRECISION iN THE CALLING PROGRAM. IP = INPUT. NUMBER. OF AUTOREGRESSIUE PARAMETERS TN THE MODEL. 10 = INBUT MBER OF MOVING AUERAGE PARAMETERS IN THE MODEL. LH = eUT LENGTH oF THE TIME SERIES TO RE eneearen. = OUTPUT UECTOR OF LENGTH LH CONTAINING THE GENERATED TIME SERIES. WR = WORK AREA UECTOR OF LENGTH LideHARTHUMCIPY 10) PRECISION/HARDNARE - SINGLE AND OUBLEZHSE = SINGLE /Ha8-Ha8,HS0 REOD. INSL ROUTINES ~ GCNL. GGUBS: MINIS. HERFT.UERTST UGETIO. NOTATION ~ INFDRHATLON ON SPECIAL NOTATION AND CONVENTIONS 15 AVAILABLE IN THE NANUAL INTRODUCTION GR THROUGH ISL ROUTINE UHELP REMARKS 1. EITHER OF THE INPUT UALUES IP O8 TO Nay 2 TF MMU TS EDUALTO'ZERO, THE MODEL REDUC NCD» THE SUM FROM J = 1 TO IP OF ARPS( CIs) +PMAC FOR Tats... 9H AND THE UALUES STARTCK)+KeLs CORRESPONDING TO U(-IP+1)++0+0H(D). cOPyRIGHT = 1978 BY IMSL, INC. ALL RIGHTS RESERVED. WARRANTY = INSLWORRANTS ONLY THAT INSL TESTING HAS BEEN APPLIED TO. THIS CODE. NO OTHER WARRANTY. EXPRESSED OR IMPLIED, 1S APPLICABLE. SUBROUTINE FTCAST (2+ ARPS: PHAS. PHACy ALPHA LUs DARPS:FCST, ANUs TER) COMPUTER = cne/sINGLe LATEST REVISION JANUARY 1+ 1979 PURPOSE, TINE SERIES FORECASTS AND PROBABILITY LIMITS USING AN ARIMA (BOX-JENKINS) MODEL USAGE = CALL_FTCAST. (2, ARPS, PriaS, PAC. ALPHAsLU» DARPS, FEST Lin. TER) ARGUMENTS 2 © ~ INPUT _UECTOR OF LENGTH LU(1) CONTAINING THE TIME SERTES. ARPS INPUT VECTOR OF LencTH Luca) CONTAINING ESTIMATES OF THE AUTOREGRESSIUE PARANETERS. PHAS —- INSUT UECTOR OF LENGTH 2sLUC) CONTAINING ESTIMATES OF THE HOUING AVERAGE. PARAMETERS EN THE FIRST CU(Q) LOCATIONS. THE REMAINING LOcaTEONS ane WORK STORAGE. PHC = INPUT, ESTIMATE OF QUERALL OUING AVERAGE CONSTANT . ALPHA ~ ZNBUT. A UALUE TN THE EXCLUSIVE INTERUAL (0, i) USED FOR COMPUTING 100¢1-ALPHA) PER NT PROBABILITY LIMITS FOR THE FORECASTS. THE UALUE 0.05 18 A COMMON CHOICE. z 263= INPUT VECTOR OF LENGTHS. LUCID CONTAINS, HMEN iy LENGTH OF TIre Serres 2, 21 NUMBER OF AUTOREGRESSIUE PARAYETERS In THe moDeL. 12°) NUMBER GF MOVING AVERAGE PARAMETERS In THE 1/24) NUNBER GF DIFFERENCING OPERATIONS REQUIRED TO OBTAIN THE SERIES USED IN PETTING THE ARIMA MODEL. 1 2 5, MAATAUN LEAD TINE DESIRED FOR A Forecast. DARPS ~ QUIPUT USCTO? OF LENGTH Luca)sLuca) CONTAINING THE CONSTANTS, CORRESPONDING TO THOSE IN. 0RPS, FOR THE UNDIFF2RENCED FORM OF THe none. Fest - quTeur MATRIX OF DITENSION 3 By LUCS). FCST(trJ)s FOR LEAD TIMES U=1.2. 3. conTanh® inn 2 THE HEIGHTS FOR THE WEIGHTED Sut OF SHOCKS THAT GIVES THE FORECAST ERROR. a, THE FORECASTS. i. THE CORRESPONDING NEUTATIONS FROM Each FORECAST FoR THE PROBABILITY UIMiTs. uy = QuTPUT, ESTIMATE OF WHITE NOTSE UARIANCE. TER = ERROR PaAneTER. _(QUTPUT) TERMINAL. ERROR Tekalss IMIICATES PaRAHETER aarti Las NOT ZN THE EvCLUSIUE INTERUAL (0+), 30 FADTCATES CHE. O MOXE GF Lucey, Luc) O® LUG) HERE LESS THAN ZERO CR LUGS)" was LESS THAN One. 31 INDICATES LUC) TS Less THAN OR EQUAL TO LUC2)#LUCaHLUCA) Ig PRECISION /HARDHARE INGLE AND DOUBLES? = SINGLE 436,448,160 SINGLE /HONRTS, HERFT UERTST UGETIO [DOUBLE worge1S, NERF 1sUERTST; UGET IO» UKADD, UAMULs UxSTO REGD. IMSL ROUTINES NorATZoN = TFoRHATION ON SPECTAL NOTATION AND (CONJENTIONS 18 AUAILABLE TN THE Menuet, TNTROQUCTION 08 THROUGH TMS. ROUTINE UMEL REMARKS «THE ESTIMATES CONTAINED IN THE INPUT PARAMETERS aeps, PHACs AND PHAS, Hav DE COMPUTED BY USING IMSL ROUTINES FIAReS aD FTFPS. coPvRrcHT ~ 1978 BY IMSL, INC. ALL RIGHTS RESERUED. bagRANTY = TNSL_ORRANTS ONLY THAT IHSL BeeLIen 70 THIS CODE. NO TING Has BEEN HER WARRANTY. EXPRESSED OR THPLIED, IS APPLICABLE. 10 SUBROUTINE FTCHP Gp THD: DSEED, AL PHAL ARPS: PRAS. PAG) NWA FCST, SIM, ) computer = cnc/since LATEST REVISION ~ JANUARY 1 1978 PURPOSE, ~ NON-SEASONAL ARIMA (BOX-JENKCINED STOCHASTIC NOBEL ANALYSIS FORA SINGLE TINE SERIES 264vusese ARGUMENTS x mm HITH FULL PARAMETER ITERATION AND MAXIMUM CikeLTHogD ESrIHaTioN ~ CALL FTCHP (it INDY DSEED, ALPHA ARPS: PrAS. PHAC, Hiivs FESTs STs ike TER) = INPUT UECTOR OF LENGTH IND(1) CONTAINING THE ‘TIME SERIES. x IS TESTROVED ON QUTPUT. ~ INPUT AND OUTPUT VECTOR OF LENGTH 10. ND TS DESTROVED ON OUTPUT EXCEPT AS inaneates. INDUD) CONTAINS THE INEUT LENGTH OF TINE ‘SERIES. INDC1) MUST BE GREATER THAN ENDS s1Nacr)+INDCarsz0. IND(2) CONTAINS, ON INPUT, THE MENInUM NUMBER OF AUTOREGRESSIUE PARAUE TERS IN THE DIFFERENCED FORY OF THE MODEL. INDC2) MUST BE GREATER THAN OR EQUAL’TO ZERO, COMMON UALUES FOR IND(2) ARE Oy J+ oe 2 ON OUTPUT, THDC2) CONTAINS THE NUMBER OF PUTOREGRESSIVE PARAMETERS IN THE DIFFERENCED MODEL SELECTED FOR FITTING. IND(3). CONTAINS. ON INPUT, THE AININUM NUYBER OF MOVING AUERAGE PARANETERS IN THE MODEL. INDC3) MUST BE GREATER THAN ‘Og EDUIAL TO ZERO, COMMON UALUES FOR INDCS) OREO, Ty OR Er, ON OUTPUT, INDC3) CONTAINS THE NUMBER OF HOVING AUERAGE PARAMETERS IN THE COMPUTED 1D(3) MUST BE GREATER ‘Thal 220, IND(4) CONTAINS, OM INEUTs THE MINIMUM NUMBER OF DIFFERENCING OPERATIONS ON THE TIME SERIES. IND(4) MUST BE GREATER THAN 02 EOUAL TO'ZERO, COMMON UALUES FOR INDC4) RE Dy Ts OR 2. OW QUTPUT, INDi4) CONTAINS THE NUMBER OF DIFFERENCING OPERATIONS PERFORMED ON THE TiMe SERIES. IND(S) CONTAINS THE INPUT NeXIMUN NUMBER OF TTeReTIONS DESIRED TO CALCULATE MaxirUM LIKELIHOOD ESTIMATES IN INSL ROUTINE FTVRL. & COnHON UALUE FoR TND(S) 15 25. INCE). CONTAINS. THE INPUT N@XIMUR NUMBER OF ‘@UTOREGRESSIUE PARAMETERS DESIRED IN THE BIFFERENCED FORM OF THE MODEL. IND(B) MUST BE GREATER THAN OR EQUAL TO IND(2). A COPRION URLUE FoR INDCS) TS 9, 1, OR 2. INC?) CONTAINS THE. INPUT ARIMUM NUMBER OF MOVING AVERAGE PARAMETERS DESIRED TN THE MODEL. INDC7) MUST ZE GREATER THAN OF EQUAL “TO IND(S). A COMMON VALUE FOR IND(3) 15 Oy Jy 02 2 nba)" cONTAINS” 1H INPUT M@xIMUN NUMBER OF FERFORHED ON DE GREATER THAN DR EDUAL TO INDi4), A COMMON VALLE FOR THD(@) 15.0» Ty O22. CONTAINS THE INPUT POSITIVE FORECASTING PARANETER. FORECASTS UP TO IND(S) STEPS IN ADUANCE ARE CALCULATED. NDC) FUST BE GREATER THAN ZERO, & COMMON CHOICE FOR THE VALUE OF IND(S) 15 THE LENGTH OF INTEREST Iv THE FUTURE. INDC10) CONTAINS THE INPUT SIMULATION OPTION. IF INDCLO) 18 LESS THAN OR EQUAL TO ZERO» 265THEN SIMULATIONS @RE NOT DESTRED. I INBC1O) 18 GREATE® THAN ZERO» THEN IND(LO). SEMULATIONS OF THE FUTURE UP YG INN3) STEPS IN ADVANCE ARE DESIRED. DSEED = INPUT. AN INTEGER UALUE IN THE EXCLUSIVE RANGE (1y2147400547). DSEED 1S REPLACED BY AuNeW DSEED TO BE USED IN SUBSEQUENT CALLS, DSeED MUST HE TYSED DOUBLE PRECISION IN THe CALLING. PROGE: ALPHA - INPUT AND OUTPUT VECTOR OF LENGTH 2. ALPHACL) CONTAINS THE TnPuY TIENIMN SEGNIEI~ CANCE LEVEL, FOR FODEL SELECTION, IN THE EACLUSIUE RANGE (0.0+1.0). A COMON USLUE FOR ALPHACI) 1S .01 OR .05. Oy OUTPUT. THE ESTIMATED SicNIFicerce LEVEL Of THE PRELIMINARY MODEL 1S RETURNED. See! Thc ALGORTTH SECTION IN THE naNUaL DocunenT FOR FURTHER DETAILS. PLPHA(2) CONTAINS THE INPUT VALUE IN THE EXCLUSIVE RANGE (0.0+1.0) USED FOR COMPUTING To0(1,-ALPHAC2)) PERCENT PROBABILITY LIMITS FoR. THE FORECASTS. A COMMGN VALUE Foe aLpuaca) IS aN CHOICE IN THE INTERVAL ou.) = OUTEUT UectoR OF LENGTH INDCG>+TNDCS). THE FIRST. INDC2)*INGCA) LOCATIONS CONTAIN THE PUTOREGRESSIVE PRRAETER ESTIMATES OF THE UNDIFFERENCED FORN OF THE PODEL. PuaS ~ GUTPUT UECTOR OF LENGTH 24INDC7). “THE FIRST IND(3) COCATTONS CONTAIN THE MOUING AVERAGE PACARETER ESTIMATES OF THE MODEL. Prac - OUTPUT ESTiMAT= OF THE QUERALL MOVING AVERAGE PARAMETER. UU = OUTPUT ESTIMATE OF THE KNITE NOTSE UARTANCE. FCST = OUTPUT maTRIX OF DIMENSION 3 BY INDC3). FOR LEAD TIMES JoLs2er--INDCO)» FOSt(L+us ‘ConTalNs THE WEIGHTS FOR THE r ‘OF THE SHOCKS THAT GLUE THE ) CONTAINS THE FORECASTS, FCST(3)4) CONTAINS THE CORRESPONDING SEUEATIONS FROM EACH FORECAST FOR THE Limits, Sim = OUTPUT VECTOR OF LENGTH InDc9)=IND(10) DEFINED ONLY FOR INDCLO) GREATER THAN ZERO. CT-1) 41ND)» FOR LEAD THES, HIND(S)s CONTAINS THE RESULTS OF THE’ 54 SIMULATION, FOR T=1,3+.++e INDO). We = HOR eRES OF LENGTH THE naxTHUH GF fe THD )SCHNDCL)/10) #20 IND(G) 381M?) BL SeInng +3 1ND(7)+1NDCB) +199 HERE Ts THe naxtMUn OF CL) INOCG)*CINDCED+E)4+74DC7) +L (2) eenpca) (3) COND?) *CIND(?)+3) )2)+84INDT)+ Innce)+5 C. 2emnb(S)s2e1NDC7 +1NDCB)+INDCS)+15 TER ERROR FARAMETER. (OUTPUT) TERHINAL, ERROR TER=i29 INDICATES ONE OF THE INEUT EARAMETERS OF In) OR ALPHA HAS OUT OF TERS130" INDICATES NO MODEL WAS TESTED THAT Passen THE ALPHACI) SIGNIFICANCE LEVEL. WARNING CLITH FIX) TERSG? INDICATES THAT eLL INDCS) ITERATIONS NERE PERFORMED IN FTHRL. CONVERGENCE 1S 266ASSUMED AND THE PROGRAM CONTINUES CALCULATIONS. PRECISION/HARDARE - SINGLE AND DOUBLE/H32 BINGLE 138, naB,Hs0 SINGLECHO2) FTARPS:FTaUTO, FTCAST, FTGENy FINS, FT"OS, FTL .GGMLs GGUBS, LEGTIF 1 LUDATF sLUELHF, HOCHe HONOR, MDNR! NERRCSERFC, HGANAD=DOAAy Ut UGET IO, UaBHNF 25yST™ = SINGLE (HSB, Hs, NEO)/FTARPS F TRUTOFTCASTS FIGEN,FTHPS, FTNGS, FTHML, GONIL, COUDS, LEGTIFsLUDATF | LUELMF BCH, MDNOR.MONRTS» NERFI, PERRC-ERFC.HGArasGArIMAs UERSET.UERTSTs UGETIO.UaBHKF. 2svST™ DOUBLE/FTARPS, FTAUTO.FTCAST: FIGENSF TIPS, FTNOSsFTHXL + GONML» GGUBS, LEOTIF LUDATF, LUELI sMOCH, HONOR, ONRES, NERF. FERRCERFC, NGAMAD-DGANI"A UERSET. UERTST, UGETIO, UABINF UNADD-UNPUL, UXSTO, 25¥STH REGD. THSL ROUTINES NOTATION INFORNATION ON SPECIAL NOTATION aro CONVENTIONS TS AUATCABLE IN! THE MANUAL INTRODUCTION OR THROUGH IMSL ROUTINE UNELP REMARKS 1, VALUES OF INDC1), ON THE ORDER OF 100. 2. TO START FORECASTING AND SIMULATION PROCEDURES, THE LAST IND()*INOC4) AS ASSIGNED ON OUTPUT) POINTS OF X ARE USED BY FICHP, 3, IF TERSI30.18 OBSERVED, ALPHALL) CONTAINS THE SIGNIFICANCE LEUEL OF THE LAST HODEL TESTED. REDUCING OR INCREASING THe NUMBER OF PARANETERS Sk DIFFERENCING AND A REDUCED ALPHACL) ARE copyRicHT = 1978 BY IMSL» INC. ALL RIGHTS RESERLED. eRRANTY ~ INSL_WARRANTS ONLY THAT ISL TESTING HAS BEEN APPLIED TO THIS CODE. NO OTHER UNeRANTY, EXPRESSED OR IMPLIED, 15 APPLICABLE. 267APPENDIX A5.2. COMPUTER PROGRAM USED IN THE ANNUAL SERIES EXAMPLE, SEC. 5.2.7. PROGRA PROCL (INPUT: E2s NIGER, Es TAPESGINFUT, TAPEBSE2, TAPE=E, ATAPESSNIGER) A 100 COMFON 7A/" MEAN, OBA O1C100) »SC100)¥¢ 10094 SIGMA, SUM, ACUCEO>. ACC 160), PACUCEO) sNJHCG0) ARES. PRAC PASC) -MU-ALPHACa) FEST C3, 5), {NAACGOO) CRC)» iaREAC 100) CONCAE) s MECHA)» CONUTICA) ZEROCE AVE ‘REGO, HOLD): SEED, SEEDS, Me Ky SIMCESED IND OD4 8 140 REAL, NUH CON, MEAN, AMER COMM ZERO — READ DATA AND CALCULATE STANDERUIZED UARIBLES. nes BERD (36138) GBAR, (SCID, I=1409 Sineo.0 Bo 101 tt. afr) =08¢1)eonee 101 Suiesune (OTC) -GBAR #92 SlonassaeT SUM-CAI)) Bo 102 teLsN to2 YEcd)=cGIC1)-aBAR)/s76HR == PRINT OUT DATA LIST Do 103 Teien 103 RITE (Gs 120) To95¢r>,0r¢E>4¥IC1 IRIE (@s121) dae. stoma = AUTOCORRELATION AND PARTIAL AUTOCORRELATION FUNCTIONS CALL FTAUTO Cr1sN30+3067. APEAN URR, ACUC2) AC2)-PACUCA) HAD Pecuciyen,9 Pec sPAcuCL ROUCLI-URR WRITE CBrd22) AMEAN, URR HUN) $0.0 Bp toe Tet.a1 104 AOstren}=FLOATCED - PRELIHMWRY AUTOREGRESSIUE PARAMETER ESTIMATION (CALL. FTARPS_CACUsANEANs Ly 1+ ARPS PHAC LAs TER) Hetfe’ (eras) HRITE (Br128) anes. Pac ~~ PRELIMINARY MOUING AUERAGE PARAFETER ESTIMATION CALL FTMAPS (ACU, ARPS: 1 f+ PHRS.NU bits TERD FAITE (Be 127) BRAS) eA NexIHUM LIKELIMOOD PARAMETER ESTIMATION DATA IND/0e Le 160+30050 1427 IBC =a == COPY YI SERIES SINCE FTHAKL HILL DESTROY 17> 268CALL FTHAXL (OSs IND. ARPS. PHAS.PHAC. INUs Re Lis ERD HITE’ (8. 126) ARPS, PhAC HRITE (8: 137) PHASCL)sHNU HRITE (@, 128) IND(S) -— CALC AND OUTPUT RESIDUALS AND SUM OF RESTOUAL SQUARED URITE (741309 SSR=0.0 BO 107 1=1,N-INo¢4) SoeeSSRiiAcT) #92 HITE (7,131) T+HACT)s WACTI*26SSR 107 CONTINUE ~ AUTOCORRELATION OF RESIDUALS AND GOODNESS OF FIT CALL FTAUTO CHa, 51»:302:30, 74 MEAN, UAR, ACUC2)»AC(2)sPRCUC2) +LKAREA) HeiTe’ (7,122) MEAN, AR HRITE (71138) SSR BO 108 1=2.30 SSRSSSRACCT Den 108 HRITE (7+ 124) NUMCT)s ACUCT)+AC()/SSR/PACUCT HRITE (Bs 128) '~ FINAL PARAMETER ESTIMATION, GENERATION AND FORCASTING. PLPHAC2)=0.05 ALPHACL)=ALPHAC2) IND(7)=2 0 INDGQ=i Inpee: INDO: Iy(8)=50 BO 108 Tei. see OSCDe¥iCL) SEED=123457 CALL FICORP COs, IND, SEED: ALPHA, ARPS. PHAS: PHAC. NV+ FEST, SIM+MAvTER) HRITE’ (8, 133) HRITE (81126) aRPS,PraC HRITE (8+ 127) PAASCL) +MY HRITE (B29) INDCS) COPY 2ND ROW OF FCST FOR GRAPHING DO 110 11550 Q5(1)=FCSTC2, 1) MUNCI+1=FLOATCI? 110 CONTINUE NurC19=0.0 BO 111 f=1+30 GONCT)=O5C19+F CST C341) con 19=08¢5)-FESTC3. 19 NURCID=FLOATCDD LLL CONTINUE: INVERSE TRANSFORMATION OF GENERATED AND FORECASTED VALUES. WRITE (85194) (1+SIMCT» (FESTCIs Ds DO 112 11,30 Gr¢1) 051 *stonasoReR CONCI)=<(CONCT eSiGMA)-aBAR PICON(1)=HCONCI}*STGHAYGBAR 112 CONTINUE, Bo '113 1=1+50 113 GYCT)=SINCD )esIGMArOBAR BunCa1)=30 Nunc32)=31 +3)+T1/50) GENERATE 100 SERIES, CALC AVERAGE AND THEDRETICAL AUTOCORR 269 B10REAL TINE FORECASTING CALL TAUTO. (PIAS: ARPS» 50+ RHO) BO iss T=1,100 SEEDA=RANF CO.) CALL FTCENL CARPS, Pres, PHAC, AMEANSHNU, SEED2» Ly 1,60» STMo A) CALL FIAUTO CSIMs60, 48, 49, 7s MEAN, VAR, ACU® AC(2), PACU IKAREA acCI)=1.0 1g 115 CONTINUE RITE (8,135) DO 116. 1°1,80 URETE (+196) NUMCT)=1+ ACCT) +AVEACCT)»RHOCI) 116 CONTINUE c CALL TAUTO (0.3+0.5+30+RHOD STOP 118 FORMAT (FS.0/S104FS.49) 11s FORMAT Ciiiy/,5k. SH 14% 3X 10H MODULAR +4%+ 10H ANNUAL. 11 3%e L@HSTANDARDIZED, “420%, L2HCOEFFICIENTS, 3%, “7H” FLOWS: 2 StPUOUS, 7+ 4x BOCLH-)) 120° FORMAT CIH +X, 13,6X,F12,5,3X.F10,2)3%F12.5) 1BL FORMAT (1H-15x, -QH0-BAR’=F10.2,7r9% QHSIGHA =+F10.3) 122 FORMAT Cluis7y 12H” MEAN = +Fasdy LIN UR = F8.4) 123 FORMAT CH 7/1 TIM LAG ¢3Ky."SHALTOCOUAR. 3X." LOHAUTO CORR.» 13k ISHPART’AUTOCORR. «73H 1S0CIH=). 12 FORMAT (SXF. 048% 40 34sF10.5)), 15 FORnat Cinis/77) 35H -UALUES FROM FTHAPS ~ FTARPS #eee) IRB FORMAT (7+ 254” AUTO REGRESSIUE PARN.=,FL0.6/ 25H QUERALL MOUE ING Pee, =.F10.8) 127 FORMAT ( 25H MOUING AVE. PARH. =+F10.6,/, 18H LITE NOISE U 1a, SH =F10.5) 1gB FoRhAT (777+ 34H URLUES FROM FTMAKL 128 FORMAT (SK, 22HyUNBER OF ITERATIONS =,13) 130 FORMAT Ciniy/7+ax, SHRANK, 4x, LOHRESTDUALS +2X. L1HS.RESIDUALS. Ox 1 13H5.5, RESIDUALS, /+ aXe 48C1H~)) 131 FoRHat’ Ci +x 13, 3K, 3CaRF10.8)) 132 FORMAT CLH 1/713%, 10H. LAG.” «2X+_SHAUTOCOUAR, 3%, LOHAUTO CORR Lyeake 12HSSO AUTOCORR 2x, 13HPART AUTOCGRR,/s 4Xe67CIH-)) 133 FORMAT (iH +/7+ 35H UALUES FROM FTCORe sere) 136 FORMAT C1HL.SM, 10H LEAD 3X» 1OHSTMULATION. 3M, 10K EEGHTS » 13ky 10H FORCAST +xy LOHDEVIATIONS» “+ 5%, 83(1H-3> 74 S0CEXs 13,4, 403 BXF10.6))) 135 FORMAT CHL s//s4ils 4H LAGHBHs SHSAMPLE AC+3x+ LOHAUERAGE ACs 2Ks 115 THEORETCAL AC’ 744xsS°C1H-D > 136 FORMAT (1H ydXoP3. 093K 4CFL265¢ 3K) END. SUBROUTINE TAUTO CTHETA, PHI-LEN, RHO) REAL PHI. THETA, RHOCSOD CALCULATE RHO SERIES RHOCLY=L.0 RHOC2)=( (1. “PHIWTHETAD™ (PHI-THETAD)/((1.+THETAR#2)-2.4PHI*THETA) 50 101 K=3;LEN+! RHOCK SPT *RHOCK-1) 101 conTINUE: RETURN END aeneee) 270APPENDIX A5.3. CALCULATOR PROGRAM TI 59 Calculator Program to calculate residuals, squares of residuals and sum of squares of residuals for an ARMA(1,1) model - (Statements 14 through 68, 77, 80, 94 through 133, 136, 152, 154 and 155 are printer controls and may be deleted if the printer is not used) - The program assumes that the data are listed in reverse order from last to first. Enter 6, in A. Enter 0, in B. Enter N < 55 in C. The data used for the Niger River example of Sec. 5.2.7 are given in the table following the program. The program output is shown in Table 5.4 of the text 271888 03 be Bo 3 & 0 a a2 0 0 a 0 a 0 5 oC OG ; oo 3 ooo é oo 8 2 63 OF 4 04 o4 1 62 OF é f 05 oF 43: REL 02 5656 4 39 PRT 1 Bi R’S t o90 95 = 78 LBL 3 O91 97 Bz 14D 2 052 00 0 BS + 5 093 14 3D 72 Roe 3 034 69 OF oo 80 é 895 00 80 a5 + 6 036 03 3 43 RCL, a 037 06 & 57 57 oF 0g8 04 4 65 a 033 01 1 42 ROL oF 100 03 3 58 58 05 101 60 0 35 = 2 102 80 0 42 8TO 6 102 00 0 7 57 3 104 03° 3 a5 PRT 3 195 06 6 33 xe 4 108 69 OF 35 PRT 1 107 02 a2 38 AY 1 108 03 3 44 Sun 3 109 o4 4 56 56 3 110 OF 4 73 Ree 5 AM oi 4 60 090 oF M2 61 1 65 x a2 113 03 3 43 ROL : 11403 3 53 59 ; 1158 05 5 4 47 3 116 01 3 a5 = é 117 0? 7 é1 670 6 118 63 OP oo 00 a 118 02 3 31 St we 8ib asin ue re CPA A OG oe I ws Sn ae 273APPENDIX A5.4._ COMPUTER PROGRAM USED IN MONTHLY SERIES EXAMPLE, SEC. 5.3.5 PROGRAN MAIN CINPUT. OUTPUT, Te 1PEa) iL. MNEANC19) -MSTREUCAa) BINENSTON xitATCSS, 12), ¥TOTAL 18), PACUTSD). ACUCSO). ACCSO) ab CREATE DATA FOR LATER GENERAT: PES: (39) TEHPC8009+ XTEMP(1000)+_ HEADER FAC10009» XUCSO0)» KCONECA).. YC BONE), GRCL0O0)» C1000), INDCB), PALI). THETACLLD» + EKARE TON DATA PHI/0.0+0+110-2+0.3+ 044s 0+510+8+0-7+0-8+ 0.9» 1.07 Bath THETA/0.0s0,150-2,0-350-9+0.5/0.8,0.7,0-850.95 1.07 FIRST CARD OF DATA 1S @ HEADE READ (5.118) HEADER BRITE: (Gy 119) HEADER 2 CARD READ DATA FROM CARDS=~38 YRS-—12 MONTHS PER CARD NveaRs=38. READ (5,120) CCXMATCT De HRITE (6,120) COMHAT( Poy COMPUTE SQUARE ROOTS FOR THE DO 102 I=L-NYEARS DO 101 el, 12 SHAT D=xMAT CL Ie. 101 conTINUE: 102 coNTINUE COMPUTE YEARLY TOTALS DO 104 T=1.NvERRS yroraccl BO 103 Jetsiz TOTAL (ID =vroraL cL ext 103 CONTINUE 104 re} SERIES TLD 1.12) T=1 NVEARS) LA NVERRS) HSTDEUCI)=HSTDEUCJ)+xnIATCT, J) #28, 40s CONTINUE 106 CONTINUE Bo 10? T isroeuc A “1.3338.8 107 CONTINUE HMEAN(13)=0. HeTHeUCl3)=0. D0 108 T=1.NVEARS 212 HRGANCL3)SPMEBN(19>4VTOTALT)/FLOATCHYEARS) HSTDEUCIS)="STOEUC13)+YTOTAL(Z)8=2 108 CONTINUE, ‘SUMSOICLIsT (HSTDEUCT)-FEANCL) ##26FLORT (YEARS) )(FLOATCNVEARS) PSTDEUCLS)=( (MSTDEUC13) -PHEANG19)##26F LOATCNYEARS))/ (FLOAT (NVERRS) ri bse8 274 630c c c E c 103 10 an 42 413 NOW STANDARDIZE THE DATA DO 110 tJ=1+NvEARS: BO 108 1-112 SMATCT I, 131) =(xRAT Cds JL) -HMEAN( TID )/ASTDEU CTI) CONTINUE! CONTINUE URITE OUT THE STANDARDIZED VALUES ONTO TAPE 8 FOR TABLES WRITE (Bs 122) (1s (AMAT (Ts J» ets 12)+YTOTALCT» Tats YEARS) URETE (8,122) CHREANCTD» T=1, 13) URITE (84123) (HSTDEUCT), T=1.13) NOU CREATE A VECTOR FOR THE LHOLE SERIES FROM THE MATRIX Teo DO 112 tat nveeRs BOT Jee CONTINUE CONTINUE SUBROUTINE FTAUTO COMPUTES AUTOCORRELATIONS, PARTIAL AUTOCORRELATI ND AUTOCOUARIANCES FOR ANY TIME SERIES. TZALL, FTAUTO. (KTENPs NMONTHSs 30»:204 7» MEAN: ACUCL)» ACUC2)sACL2)» PACUC 1B) KAREAD SET AUTOCORRELATION AND PARTIAL CORRELATION OF LAG. ZERO To ONE. a1. LRITE (G,i124) ateaneacycr) HRITE (21125) CIS, ACCES),PACUCTS)+ 151/31) PRELIMINARY ESTINATION OF AUTOGRESSIVE PARAMETER CALL FTARES (ACUsGMEAN: 11+ ARPS»PHACY HKAREA) TRETE: (6, 126) saPS. Prac NOW ESTIMATE MOVING AVERAGE PARAMETER AND FIND HAITE NOISE UARTANC ESTINATE USING FINES. CALL FTHPS (ACU, ARPS, 1+1+PHAS, HNUs LKAREA, TER) FRITE: (6. 127) PHASS LIN STORE THE VECTOR XTEHP DO 113 IP=LeNMONTHS TeNPCIP)=XTEMP CIP) CONTINUE FUSE FTIAL MILL DESTROY IT UPON OUTPUT 590 700 79 720 730 72 250 780 770 780 730 00 B10 220, 830 B40 850, 350 870 380 280, 500 310 320 230 340 350 980 870 390 530 1000 43010 030 41030 1040 050 41080 oro 1080 080 too 110 1120 3130 1180 1150 1180 1170 1180 1180 ig00 10 i220 test 1240 43850 1280 1270 1280 1230 1300 3310 1320 i330 1340 1380, 136044 15 1g GENERATE SUM OF SQUARES SURFACE Ur SET THE ROH AND COLUMN COUNTERS TO or IneTet IPA DO 118 15ety11 DONS TS-Lyn1 ETASTENP(O)-PHIC T6)*TENPCL) SUNSGI (15, 15)=ETA==2 0 ita 1723-nnoNTHS ETALSTEHE (17) PHI (16) #TEHPC ETa=eraL, SUNSOI (15, 15)=SUNSOL( 15.16) conT INE LET ITHETS AND IPHI_GE THE ROW AND Ci TO 'THE ROW AND_COLUMN OF ARPS. AND Pl MINIMUM SUNS OF SOURRES OF RESTOUALS G PHI AND THETA VECTORS NE FOR LATER USE 17-1) +THETACTS)#ETA seTALee2 SOLU NUNBER_CORRESPING iA THAT CENERATE THE: TF (SUNSOLCIS, 16).GT.SUMSO1CITHETA, TPHED) GO TO 115 TiHeTa=is conTaNUE conTINuz, URITE THE SUN OF SQUARES SURFACE OUT URITE (3. > URITE (3,129) (PHICIT) TTI 1) URITE (3,130) CTHETACTHD» (SUPSQ CTs To TAPE 9 ITT LT USE SUBROUTINE FTHxL_TO ESTIMATE AR*S,PHAC/PHAS, AND COMPUTE UNO.” LEAUE RESTIUALS, IN THE FIRST INDCL) POSITIONS OF THE DATA IND/Oe 1414057514 1137 ENDCL)=AMONT LET FINAL ESTINATES OF a@Ps_aND Pras THAT LED TO THE MINIMUM SUMS OF SOUAk eBQvE. PraSeTHETACITHETAD ARPSHPHICIPHED HITE: (6, 131) ARPS, PHA CALL FTURL,_ CxTENEs IND, ARPS, PHAS, PHAC. HITE (Ss 132) ARS, PMAS. PACSUN FIND AUTOCORRELATION AND PARTIAL AC THE 262 USCTOR AS OUTPUT OF FTHNL. CALL FTAUTO (As NMCRTHS, 24,24) 74 ANEAN. ACUC?» ACUCE) +ACC2) #PACUCE) +h aKAREAD ACCD=L 276 vecror ane, R INPUT TO FIMYL BE THOSE RES OF RESIDUALS GENERATED +N, GR Ay TERD RESIDUALS THAT ARE INacyl c ¢ © URITE_OUT AUTOCORRELATION AND PARTIAL AC. COMPUTE © — SurmrTonccaurocoseetation)#+2). c Is alt URITE. CG, 193) THL ACGIH)» PRCUCTH? sso-ssaract In 117 CONTINUE. Sso-553-1. URITE (6-134) sso stor 11g ForNAT ¢gni9» 119 FORNAT (2X+8A10//10X+ SSHORIGINAL DATA FROM SALAMONIA SERIES)“ 120 Fosner (121%,FS.3)) ABE FORMAT (3x) 1215, 12(F6.3,3K),F7.3) 122 FORMAT (10K, 42(F8.3¢ 350 97703) 185 FORHAT (10x, 12 (FB. 3, 3K) F263777279 124 FORMAT (2x, 3SHNEAN AND UARTANCE OF 2T OF SORT SERIES. 2F1S.7) 125 FORMAT (3% 12+10X,F 10.4, 10K,F20.4) 18 FORHAT (/72X, 32KFTARPS ESTIMATE OF ARPS AND PHAC, 2F15.6) 127 FORMAT (7.2%. SOG THPS ESTIMATE OF PAS AND UU»2F15.8) 13 FORHAT (8x) 39%, LOHTABLE S-iG,725x, SIHSUM OF SQUARES OF RESIDUAL, 15 OF » 2SHARHACL.1) FOR STANDARDIZED» “+ 32%, 24HHONTHLY RAINFALL SE ARIES + LGHAT SALAMONTRy IND.»77/+52X) SHPHDD 129 FORKAT (5Xs_SHTHETA, 2x01) (369.26 1K)) 130 FORMAT (SKsFS.2,3%,11(F3.211X)) 131 FORKAT_ (7.x, 4BHURLUES OF “ARPS AND PNAS LEADING TO MINIMUM, 29H SUNS OF SOUazES OF RESTDUALS,5%,2F15.5) 132 FortaT (2x, 34H THX. OUTPUT OF ARES, PHAS, PHAC, HNU, 4F15.6) 133 Fornar (Bx, L1HLAG, AC, PACU,15, 2715.6) 134 FoRHaT (2x, 3SHSUMMATEON(ACe=2)-NOT INCLUDING LAG 0+F15.5) END REFERENCES Akaike, H., 1974. A new look at the statistical model identification. IEEE Transactions on Automatic Control, AS-19, 6, pp. 716-723. Box, G. E. P.and Jenkins, G. M., 1976. Time series analysis - forecasting and control. (Revised edition), Holden-Day, 575 pp. Carlson, R. F., MacCormick, A. J. A., and Watts, D. G., 1970. Application of ‘linear models to four annual streamflow series. Jour. Water Resour. Res., 6, 4, pp. 1070-1078. Delleur, J. W. and Kavvas, M. L., 1978. Stochastic models for monthly rainfall forecasting and synthetic generation. Jour. Appl. Meteor. 17, 10, pp. 1528-1536. Feller, W., 1951, The assymptotic distribution of the range of sums of independent variables. Ann. Math. Stat.22, pp. 427-432. Hipel, K. W., McLeod, A. I., and Lennox, W. L., 1977. Advances in Box-Jenkins modeling: 1-model construc- tion. Jour. Water Resour. Res. 13, 3, pp. 567-575 277Hipel, K. W. and McLeod, A. I., 1978. Preservation of the rescaled and adjusted range ~ Part 2. Simulation studies using Box-Jenkins models. Jour. Water Resour. Res. 14, 8, pp. 509-516. Hurst, H. E., 1951. Long term storage capacity of reservoirs. Trans. Am. Soc. Civil Engrs., 116, pp 770-808. Hurst, H. E., Black, R. P., and Simaika, Y. N., 1965. Long term storage, an experimental study. Constable, London. Mandelbrot, B. B., and Wallis, J. R., 1969. Computer experiments with ractional Gaussian’ noises - Part 1: Averages and variances. Jour. Water Resour. Res. 1, pp. 228-241 McLeod, A. I., 1976. Improved Box-Jenkins Estimators. Rept. Dept. of Statistics Univ. of Waterloo, Ontario, Canada Mejia, J. M., Rodriguez-Iturbe, I. R., and Dawdy, D. R., 1972. Streamflow simulation - 2 - The broken line process as a potential model for hydrologic simulation. Jour. Water Resour. Res. 8, pp. 931-941. O'Connell, P. E., 1971. A simple stochastic modeling of Hurst law. In Mathematica) Models in Hydrology, Warsaw Symposium, (IASH Pub. 100, 1974), 1, pp. 169-187 O'Connell, P. E., 1977. ARIMA models in synthetic hydrology. In Mathematical Models for Surface Hydrology, T. A. Ciriani, U. Maione and J. R. Wallis, Editors, Wiley, New York. Salas, J. D., 1972, Range analysis of periodic-stochastic processes. Hydrology Paper 57, Colorado State Univer- sity, Fort Collins, Colorado Salas, J. D., Boes, D. C., Yevjevich, V., and Pegram, G. G. 8., 1979.’ Hurst phenomenon as a pre-assymptotic behavior. Jour. of Hydrology, 44, pp. 1-15. Salas, J. D., Boes, D. C., and Smith, R. A., 1980. ARMA modeling of seasonal hydrologic series. Paper submitted for publication to the Jour. Hyd. Div., ASCE. Tao, P. C., and Delleur, J. W., 1976. Seasonal and nonseasonal ARIMA models in hydrology. Proc. Am. Soc-Civl Engrs., Jour. of Hydr. Div. 102, HY10, pp. 1541-1559 278Chapter 6 AUTOREGRESSIVE INTEGRATED MOVING AVERAGE MODELING 6.1 DESCRIPTION OF ARIMA MODELS It was shown in Chapter 5 that ARMA models can be fitted to stationary hydrologic series, such as the annual series. For nonstationary series such as monthly, weekly and daily series, the nonstationarity was removed by the periodic standardization. This procedure leads to useful models for the synthetic generation and forecasting of hydrologic series. However, the number of parameters required is generally large. For example, an ARMA(1,1) model applied to monthly series requires 27 parameters (12 monthly means, 12 monthly standard deviations, $1, 61, and 02). This chapter shows that there are alternate ways of transforming a time series into stationary series which lead to models requiring fewer parameters. If the series does not have a fixed mean but its successive changes or differences are stationary, then it is possible to extend the ARMA models to nonstationary series by working with their differences. It is possible to take the first, second, or in general, the d-th difference, which leads to simple nonperiodic ARIMA(p,d,q) models (also known as nonseasonal ARIMA models). It is also possible to take periodic .or seasonal differences at lag w such as the 12th difference of monthly series, which leads to periodic ARIMA(P,D,Q) models (also known as_ seasonal ARIMA models). The cébination of nonperiodic and periodic ARIMA models leads to the multiplicative ARIMA model. The acronym ARIMA stands for autoregressive integrated moving average process. The original discrete nonstationary series is differenced to obtain a stationary series. The con- tinuous time equivalent is to differentiate the process. To retrieve the original process, the differentiated process should be integrated, or equivalently for a discrete process, an infinite summation should be performed. Using the inte- gration analogy, a constant of integration is needed, but it has been "lost"’ in the process of differentiation or differenc- ing. Such an integrated series would lack a mean value and as a result the ARIMA models are nonstationary and cannot be used for the synthetic generation of stationary hydrologic time series. However, the ARIMA models are useful in fore- casting the deviations of a process. In the case that the series level changes, the forecasts with an ARIMA model would continue to track the process, whereas a stationary ARMA model would be tied to a mean level that may have become obsolete. Another application of ARIMA processes is 279in the evaluation of transfer functions of dynamic linear systems, which relate the deviations of an input to the devia- tions of an output. 6.1.1 THE DIFFERENCING OPERATION Differencing of the time series may be used to remove its nonstationarity. The first order differencing is defined by Deere Taking the first difference of a series removes or attenuates the low frequency components of the series. Thus, differ- encing once may be useful in removing the trend of a series, or in cases where the series is nonstationary, in the mean or in level. If the series is nonstationary both in level and in slope, then two consecutive differencing operations are needed. In this case, the second difference of the series is represented by (6.1) Wee Ue Ue = Oy Mey) > py o Mpg) = Xp - yt Xe - (6.2) In general, the differencing operation may be done several times but in practice only one or two differencing operations are used. If the series exhibits periodicity then seasonal differencing may be used Uy x > x where w is the period. Typically w is equal to 12 for monthly series. If necessary, to achieve stationarity the seasonal differencing could be repeated D times. For example for D=2 and w=12 (6.3) -w u, t 7 Meera = Oe” Xena) > Gere > te2a? Xe > 2X e+ Xie, - (6.4) Differencing alone may not be sufficient to achieve stationarity. The logarithmic transformation of the data may also be useful as changes in logarithms are essentially per- centage changes. Other transformations may also be used. 6.1.2 THE ARIMA MODEL The behavior of the differenced series w, or wu, may be represented by a stationary ARMA (p,q) protess 280Ge. (6.5) The model for x, is referred to as an ARIMA (p,d,q) where the parameters and q indicate the order of the auto- regressive and moving average components and d is the number of differencing operations necessary to obtain the stationary u, series. For d= 1, and replacing u, by Xt > Xp, wel obtain x, 1 Oy Rpg) HO Op > Xepey) Hep Oey Og eg (6.6) Although the u, series generated by Eq. (6.5) is stationary, the x, series kenerated by Eq. (6.6) is nonstationary. In fact Xe (Re Mey) + Oh 7 Xpeg) t Og 7 XLg) =utu Mt The xX, process is thus an infinite sum of u, tupgt (6.7) iS» referred to as the "integration" of the u, series. For this reason it is called an integrated autoregredsive - moving average process. The expectation of the right hand side of Eq. (6.7) does not converge and the process. x, is nonstationary. Likewise, it may also be shown that thé variance of the x, process tends to infinity. Thus, the differencing operatidn yields a stationary u, process but the “integrated” process x, is nonstationary’ with infinite variance. For this reason‘ the ARIMA process cannot be used to generate synthetic station- ary hydrologic sequences. However, it can be useful for forecasting hydrologic events. For example, the forecasting function of the ARIMA (p,i,q) is obtained by taking the conditional expectation of Eq. (6.6): Xe(L) = [Xyyp] = tO EX pgp ) #42) Eee] * # p-%-0Marapl t pay) = 8 lepepea] - + Oleg pegl > (6.8) indicates conditional expectations as in Eq. (5.57), = Xtgpj 8 an observed value; if = x,(L-i) is a forecast; likewise if i> L, is a past or current random value and if 281is a future random value whose isk, (yp yl = 0 expectation is zero 6.2 SIMPLE ARIMA MODELING OF TIME SERIES The ARIMA models are called nonperiodic or nonseasonal if the differencing is as in Eqs. (6.1) or (6.2), and they are called periodic or seasonal if the differencing is as in Eqs. (6.3) or (6.4). Kavvas and Delleur (1975) showed that simple first differencing significantly reduces the periodic component of monthly series, and have fitted ARIMA (1,1,1) models to monthly rainfall. Rao (1980) used the ARIMA (0,1,1) and (0,2,2) or integrated moving average IMA (1,1) and (2,2) models to evaluate the changes in annual precipitation which are attributable to effects of urbanization. The simple ARIMA models (nonseasonal differences) are discussed in this section. 6.2.1 THE SIMPLE ARIMA MODEL The general ARIMA (p,d,q) model can be written as E o 3 ® 1 (6.9) - U7 Fe, - z jaa J td jeg Uti where u, is the d-th difference of the x, example the ARIMA (1,1,1) is , Process. For Uy = 2 Uy tee - 8 ey (6.10a) where Ue > My (6.10b) The stationarity of the ARMA (1,1) model fitted tou requires |g,| <1. It is therefore seen that if 9, > 0, af is usually the case in hydrology, then the model X= Lt 01) Hy - Oa Keg t ey OE (6.11) teL does not satisfy the stationarity conditions (4.24) for the AR(2) component of this model, as (1 + $,) + (-0:) = 1 Figure 6.1 shows a plot of a nonstationarity series generated by Eq. (6.11) with 9, = 0.5, 0; = 0.3 and o2 = 0.6. The slow rate of decay of the autocorrelation func~ tion is exhibited in Figs. 6.2a and’6.2b which show the auto- correlation function of the series of Fig. 6.1 for 24 and 500 lags, respectively. This effect is translated into a concentra- tion of the spectral density (see Eq. 2.22) at the origin as 282xm ME Figure 6.1. Plot of generated ARIMA(1,1,1) series of Eq. (6.11) with parameters 9, = 0.5, 6; = 0.3 and 2 = 0.6. EXPLANATION wen © +95 PONT CONFI ny 95 PCNT CONFID SAMPLE AUTOCORR. Figure 6.2a. Autocorrelation function of generated ARIMA(1,1,1) series of Eq. (6.11) with parameters 9, = 0.5, 6; = 0.3 and of = 0.6. 283LINE -= EXPLANATION PONT CONFID PONT CONFID £ UTOCORR, or AUTOCORRELATION bo 887 ea gg wie 5 eet Figure 6.2b. Autocorrelation function of generated ARIMA(1,1,1) series of Eq. (6.11) with parameters) 6; = 0.5, 0; = 0.2 and 02 = 0.6 e Z call % aol \ rattency (FR Figure 6.3. Power spectrum/variance plot, of generated ARIMA(1,1,1) series of Eq. (6.11) with param- eters $; = 0.5, 0: = 0.3 and o? = 0.6. shown in Fig. 6.3. It can be shown that the theoretical value of the spectrum at the origin tends to infinity. 284It is seen that this type of model is not applicable for the generation of hydrologic variables which do not -exhibit this nonstationary behavior. However, this type of model may be useful for hydrologic forecasting. This is because the first difference lets the mean or level of the series go free, but upon forecasting the forecasted values are reattach- ed to the previous observations. Unlike ARMA models, the ARIMA model is thus capable of forecasting future values of a series even if its mean changes along time. 6.2.2. PARAMETER ESTIMATION FOR SIMPLE ARIMA MODELS The series x, is differenced as many times as necessary to obtain'a stationary series. In practice the number of differencing d is 0, 1, or 2. For example, the first difference of the nonstationary series of Fig. 6.1 is shown in Fig. 6.4. The nonstationarity of the x, series produces an autocorrelation function that decays very slowly as shown in Fig, 6.2, whereas the autocorrelation function (ACF) of the differenced series is shown in Fig. 6.5. Thus a slow decay of the ACF may be interpreted as an indicator of a nonstationarity in the x, series, suggesting the need for differencing. 1.00 N 5 oc. He Figure 6.4. First difference of generated ARIMA(1,1,1) X, series of Eq. (6.11) with parameters $1 = 0.5, 6 = 0.3 and of = 0.6. If the raw series is suspected to be nonstationary, the ACF of the differenced series is examined. If such ACF fails 285,LINE -- EXPLANATION +95 PONT CONFIO ‘CNT CONF IO PLE AUTOCORR . +P6 Figure 6.5. Autocorrelation function of first difference of generated ARIMA(I,1,1) x, series with pa- rameters $, = 0.5, 6; = 0.3 and of = 0.6. to damp out the sample autocorrelation, the second difference is examined. The lowest level of differencing to achieve sta~ tionarity is used Once the series has been stationarized by differencing, the estimation of the parameters of the stationary ARMA(p,q) model fitted to the u, series proceeds as in Sec. 5.2.2 6.2.3 GOODNESS OF FIT FOR SIMPLE ARIMA MODELS The procedure for testing the ARMA(p,q) model fitted to the differenced series are the same as those discussed in Sec. 5.2.3. Thus, the procedures for overfitting, the tests of the residuals such as the autocorrelation check, the Porte Manteau test and the cumulative periodogram test apply. The Akaike test is also useful to choose among competing models and to check the parsimony of the parameters 6.2.4 SUMMARIZED PROCEDURE FOR SIMPLE ARIMA MODELING The modeling procedure for the ARIMA(p,d,q) models are summarized in the following steps 286STEP (1). Transformation. Check the normality of the series and make the appropriate transformation to normality if necessary. STEP (2). Differencing (2a). From a plot of the normalized series observe whether there is any nonstationarity in the level or both in the level and slope. The first case may indicate the need for first differencing, the second for differencing twice. (2b). Check the autocorrelation function of the normalized series. An unusually slow decay may indicate the need for differencing. Use the lowest level of differencing necessary to achieve stationarity. STEP (3). Fitting the ARMA(p,q) Modei to the Differenced Series. This procedure follows exactly the steps of Sec. 5.2.6, with the exception of the generation procedure which does not apply. 6.2.5 EXAMPLE OF SIMPLE ARIMA MODELING Delleur and Kavvas (1978) fitted the ARIMA(1,1,1) models to the rainfall series described in Sec. 5.3.5. The results are given below for the monthly precipitation at Salamonia, Indiana (Station 12-7747). The data are listed in Table 5.13 The step by step procedure of the previous section is followed. STEP (1). The square root of the monthly precipitation is used to obtain a series which is approximately normal. STEP (2). The nonstationarity in the series is removed by taking the first difference. Table 6.1 shows the first differ- ence_of the precipitation square roots. For example, uz = 4,910 - 3.920 = 0.236. Steps (1) and (2) may be performed by the IMSL Program FTRDIF*. STEP (3). An ARMA(p,q) model is fitted to the differenced series following the steps of Sec. 5.2.6 (8a). The mean and variance of the differenced series are u, = -0.0011 ands? = 0.6065 See Appendices A6.1 and A6.2. 287UEIpUL ‘ETUOMETES ye uoTENdWerg ATYWUO_! Jo siooy ‘aun san ‘ogenbg Jo aouesayiq 4 TES yeydroorg ne ue Ss euerpuy T9 del 288(3b). The autocorrelation function of the differenced square roots of the rainfall is shown in Fig. 6.6. The 95% confidence interval is given approximately by £2/{N = £2/(55 = 0.094. The autocorrelation function is seen to have a domi- nant value at lag 1. The partial autocorrelation function is shown in Fig. 6.7 and exhibits significant values at lags 1 through 10. FUTOCORRELATION aad Teoma ‘oo a er os Figure 6.6. Autocorrelation function of the first differenced square roots of monthly precipitation at Salamonia, Indiana. (3c). Identification. The behavior of the ACF and PACF suggests an ARMA(1,1) model for the differenced series (3d). The initial estimate of the autoregressive parameter is obtained as indicated in Sec. 5.2.6, Eqs. (5.70) and (5.71) 036415 _ _ 9 9754 and 0, = -0.0011(1 + 0.0754) = -0.0012 (Se). The initial estimate of the moving average parameter is obtained as in Sec. 5.2.6, Eqs. (5.74) with’ the following result from the IMSL subroutine FTMPS: 6; = 0.5873, 62 = 0.4207. e 289CORR. Pant. UTE Ye Sm HP? Figure 6.7. Partial autocorrelation function of the first differenced square roots of monthly precipi- tation at Salamonia, Indiana. (3f), Maximum likelihood estimates. Table 6.2 shows the sum of squares surface of the residuals of the ARIMA(1,1,1) for the monthly rainfall square roots. The estimate of’ the parameters based on the sum of squares sur- face is: $=0.0, 6, =0.9 Using these estimates as initial values, the final estimates obtained by the IMSL program FTMXL are = = -l é = 62 = $= 0.0451; @,, = -0.0010; @, = 0.9593; 62 = 0.3382 (3g). Goodness of Fit test. The Q-statistic is found to be @ = 0.0448 x 455 = 20.06, and with 22 degrees of freedom, it is to be compared to $_(95%) = 33.9. The model is seen to pass the Porte Manteau test. The ACF of the residuals is shown in Fig. 6.8. It does not exhibit any significant value. Of the 15 series studied, 7 passed the test. In several cases, we found 6, = 0.999 which is essentially equal to 1. In that case the model may be written as Or Me teem ee orELtS22 Bb1022 EStBI2 BB'EI2 ysrbee OSTZE serere Erase Te-o/e ge'ZEe gBTee = 90"T 22-761 E2r22T 28-29T os"aST OS“SGT © GETHST Sev9ST e715] 22769" CE"OBT TS:r61 06" So-602 GT'EBI 28"OeT GI'IZS pOrsgT ET ‘291 | ShresT © 20°99T ERAT d8"eBT "SGT =O 08-922 Bprore sel sBteBT 69"SZT aGtOZT AStEST © e9TTZT GO"esT 2E"SeT Ze"86T =o gorse sg'6ee S6'TTe 287261 Geet SE°0BT bOvzzT BE*Z2T Oe"TeT © BS"SBT 2e7eGT 09 Es'cze de"ls2 ebivee BETET2 © ST-O0e © ELrOBT © aT“SeT BETERT CETSAT STI 827002 Og ce‘boe B6-S22 BbrIse TT"Tee 2é"ble © Bhre0e © Pe"PGT © pO'OBT S8°6BT 2e"EBT § Te"T08 Ob SE°2CE up'pOoe TG'Se2 © gtISe «SL*TE2 STSTe 28'hO2«TS*2B122"S6T SE"SGT "20 =O S0°S2e E0°REE PS'POE Te"Sle eBrISe Jerzees US'ZT2 ebsdoe TE'T0e b0'10e BB"hoe Oe BT'zep G0°BZE LE"BEE B'pOE —OB'SZ2ESTTSe GE'eee BO'BT2 22-012 Gerg02 08'202 oT ET'Blb Gors2> BS"OBE pe"OPE TE'SOE Ga'Sle 0022 © aa'EEe SL0ee ebeTe GES'TIe 0 oss ove ost oz or o or 2-0 * op'- —0s*~ LHL THd “eueIpuy ‘ertiowepeg ye sojeg yeyurey ATWIUOW Jo Jooy auenbg Jo souedejIG 4ST Jo spenprsey Jo sarenbg Jo ung -Z°9 eae, 291a Sea — ERAT 2 gee X — RatecBAEsarron UTOCORRELATION i 29,900} nn vo do em mee atm weno Figure 6.8. Autocorrelation function of residuals of Ist difference of square root of monthly rain, Salamonia, Indiana. which is seen to be the difference between X= 1X) te and x) = hy te te1 t-2 tol That is to say, the model degenerates into an AR(1) model. Thus, when 6, ~ 1 the ARIMA(1,1,1) model is not suitable for monthly rainfall series at the station considered. 6.2.6 LIMITATIONS TO BE CONSIDERED IN APPLICATIONS OF SIMPLE ARIMA MODELS It was indicated in Sec. 6.1.1 that taking the first difference of a series strongly attenuates the low frequencies. Kavvas and Delleur (1975) studied theoretically the effect of differencing, making use of the spectral representation of monthly time series. This spectral representation was com- posed of two parts: the continuous part, representing the stationary component of the series and the second part rep- resenting the periodic or seasonal component assumed to be circular stationary. Circular stationary means that the multi- variate probability distribution of Xo = (x1, X2, ..- X12) is the same as that of oetaK = Cia? <-> ¥p24¢12K? Analysis of the spectrum showed that while the first differ- encing significantly reduces the periodic component, the 292,continuous spectral part of the differenced series g,(f) is related to the continuous spectral part of the original series g(f) by gat) = gif) (2 sin anf)? = F< <5 Thus, differencing wipes out the value of the original spectral density g(f) at f=0 and dampens out the spectrum for 0Xtey (6.14) Or Uy tH Ug to Hop Up te re ee or Pp Q Me Mein fe 28 Sti For example, the seasonal integrated moving average model ARIMA(0,1,Q) or IMA(1,Q),, is 1 e482 Spay oo 7 (6.15) 1 Ft-Qu ° Referring to Eq. (5.13), the autocorrelation structure of this model is written as 7% * 1% 41 t+ + 9.4% ke TF Oe F Ont »k< Qu Q =0 k> Qu The seasonal _ integrated autoregressive —_ model ARIMA(P,1,0),, is written as (6.16) Uy, = Oty + Potent + UL py tee - (6.17) So from Eq. (4.13), the autocorrelation structure is given by Plow = Pci )w * P2PCc-ayw tot MpPG-Pw? K? 0. (6-18) Consider for example, an AR(1) model fitted to the 12-th difference of monthly observations FOr Uy te t or a 7 Xtene = Oey 7 Xpag) t ep or 294X= Oy * Mee 7 Xs tet It is seen to be a nonstationary AR process of the 13th order with 62 = 3 =... = 611 = 0, O12 = 1, O13 = ~Or If instead the MA(1) model is fitted to the 12-th difference of the monthly data, then - x, on (6.19) a tate12 or tle tb 7 . - (6.20) Suppose that x, is an observation in May of a particular year for a monthly flow time series. Equation (6.20) shows how this value might be expected to be related to the obser- vation made in May of the previous year, in the sense that both observations would be expected to diverge in the same direction from the long term trend. The same sort of rela- tionship might reasonably be expected to link the observations for other months. April data might be linked by t= = Ste ~ O13 or Xe = X13 * ter 7 O83 However, the o, residual for May might not be independent t of a.) for April. The ,'s might be represented, for ex- ample, ‘by an autoregressive process which would depict the underlying month to month carry-over. Thus Foro te (6.21) Combining Eqs. (6.19) and (6.21) gives = On apy # ey - Or Oa Mag > Or Sere = Or Cy 7 Or Mpg g) + Py Or Ebene Or Me te > Or See or Reo Meng = 01 Gey Xeeag) * St 7 Ot Sede 295.or = Or ey t Meg - 1 Xeeag t SET OL Spy (6-22) This sort of model is called a multiplicative model and is designated as an ARIMA(1,0,0) x (0,1,1)12 model, indicating that a seasonal MA(1) model is fitted to the 12th difference of the data and a AR(1) model is fitted to the residuals of the former model. More generally, for a monthly hydrologic series for example, the 12-lag differenced series could be fitted by an ARIMA (P,1,Q)12 model Q z : 6. isl i 't-12i (6.23) where v, is the first seasonal difference ~ ¥te12 This model explains the dependence of the observation x, of a particular month to the observations taken the same month during the previous years. Since there are 12 months, there would be 12 such models (one for each month) which are assumed to be similar Although the observations for a certain month, May for example, is related to the previous May observations, it is also related to the other monthly observations of the same year. It is therefore expected that the "error" components a, of Eq. (6.23) are serially correlated. To take care of this serial correlation between the months an ARMA (p,q) model is fitted to the a, series: tej (6.24) Fl Combining Eqs. (6.23) and (6.24) we obtain the ARIMA (p,q) x (P,1,Q)i2 multiplicative model P P po oP PB Meat EG Mea” 2, By 88 Veinai q Q + ee 8, 8 feagj-i 3 (6.25) 296or p P eat 2 MOLT Mea) * pain > Xe-12c14)) p P ~ EE 6% Gyan - Xara) + iso jao bj Mtri-12] ~ “t-i-12(14)) oe Aa Es 6; 8; ee yas (6.26) Box and Jenkins (1976) generalized this model and obtained the multiplicative ARIMA (p,d,q) x (P,D,Q), model which consists of a seasonal ARMA (P,Q) fitted to the D-th seasonal difference of the data coupled with an ARMA (p,q) model fitted to the d-th difference of the residuals of the former model. The following notation is used: BY ; B = backward operator (6.27) = Xten (6.28) Q-B)x, axe = Ist difference (6.29) (1-B)? x, =X > 2x +X, = And difference (6.30) (-B)? x, = d-th difference (6.31) (1-BY?) x, =X, > Xy-19 = Ist seasonal difference of period 12 (6.32) (1-B??)? x, =X, ~ 2X4 19 + Xp_9q = 2nd seasonal difference of period 12 (6.33) a-BY)Px, = Dth seasonal difference of period w (B) x, = Cri B-g2B* - ec (6.34) = autoregressive operator 297OB) x, = moving average operator (BY) = (1-0,B" - @B™ ~ ... - O,BP) xp == 2% xu #0 Gy =-1 = seasonal autoregressive operator Wy. GecpY 2w qu, .. 8 O(BY) = (4-0,B" - 7B ~ ... - EgB%) c= - 28 tui” % = seasonal moving average operator. With this notation the seasonal ARIMA (P,D,Q),, model, in which an ARMA (P,Q) model is fitted in the D*th seasonal difference of period w is written as (1-6,BY-6, BY — .. + % BPM) (1-BYP x (1-0, BY-6,B™ =... - & Be ya, (6.36) The residuals a, are in turn represented by an ARIMA (p,d,q) model (i.e. - an ARMA (p,q) model fitted to the d-th difference of the a, series) (1 ~ 6, B-o2B? - ... - BP ya-By4 (1-8, B-6,B? - ... - OB, : (6.37) where ¢, is an independent variable. The general multipli- cative ARIMA (p,d,q) x (P,D,Q),* model is obtained by solv- ing Eq. (6.37) for a, and repldting in Eq. (6.36) as "Note that upper case letters are used to designate the order of the autoregressive, differencing and moving average of the seasonal component and lower case letters are used to designate the respective operators of the nonseasonal com- ponent. The subscript w designates the period of the seasonal differencing 298(i=; BY-o, B™ - - BPY) (1-6) B-$B? - ... - * BP) c-BY)Pa-B)4 x, = C-0,B" - eB - og3™) (1-8; B-82 B? - ... - 6,B4) &, (6.38a) or in a more condensed form (BY) 9(B)-BY)? (1-B)4x, = (BY) 0B) &, - (6.38b) Box and Jenkins (1976, p. 305).used an ARIMA(0,1,1) x (0,1,1)12 model to represent the logarithms of the monthly passenger totals in international air travel. This series ex- hibits both periodicity and a trend which justifies the season- al and nonseasonal differencings. First order moving average models were fitted to the seasonal and nonseasonal components. In hydrologic applications, however, the seasonal effect is dominant, and seasonal differencing may suffice to obtain a stationary series in the mean. River flows, however, are known to possess strong autoregressive components. There- fore, multiplicative models applied to monthly river flows are likely to inchide a nonseasonal autoregressive component. It should be noted that this multiplicative model is not reducible to an additive model in which the series is the sum of a sea~ sonal component and a nonseasonal component, as was postu- lated in the parametric periodic standardization method studied in Sec. 5.3. 6.3.2 PARAMETER ESTIMATION FOR MULTIPLICATIVE ARIMA MODELS The form of the autocovariance structure is useful in the model identification. Box and Jenkins (1976, p. 329-333) give a table of several simple multiplicative models and their autocovariances. The knowledge of the physical source of nonstationarity is useful in identifying the required differenc- ing. Also, the knowledge of the physical process underlying the nonseasonal portion of the model is useful in the identifi- cation of the portion of the model representing the nonsea- sonal component 94. One approach to the estimation of the parameters would follow the heuristic justification of the multiplicative models An ARMA(P,Q) modei would be fitted to each season after D seasonal differencings. These models would be averaged across the seasons to obtain the ARIMA(P,D,Q), model. Finally, the residuals of this model would be fittéd by an ARIMA(p,d,q) model, The two combined would yield the multiplicative ARIMA(p,d,q) x (P,D,Q), model. This ap- proach is not practical, however, as thé optimization of the 299parameters would be done in the estimation of each model component, and this procedure would not guarantee a global optimization of the parameter choice. Instead, the sum of the squares of the residuals is calculated for a range of values of the parameters. A first estimate of the parameters corresponds to those values which minimize the sum-of-squares surface. The final estimate is obtained by the nonlinear estimation procedure. The principal hydrologic application of ARIMA models is in forecasting. The calculation of the variance of the fore- casts requires the calculation of the J-weights when the series is expressed as an infinite moving average. z Y &paj = MB) ep jzo Introducing this expression for x, into the general seasonal multiplicative ARIMA (p,d,q) x (P$D,Q),, model of Eq. (6.38) we have (8) 9(B")(1-B)* (1-BY)P CB) e, = 0(B) OCB) ey , (6.39) we obtain after simplifying by 9(B) 9¢8")(1-B)4 G1-BY) ycB) = 6(B) @(BY) . (6.40) The y-weights are obtained from the several equations that result from Eq. (6.40) by equating equal powers of B. A sample calculation is given in Sec. 6.3.5 6.3.3 GOODNESS OF FIT FOR MULTIPLICATIVE ARIMA MODELS As before, the residuals are examined. The correlogram is checked and the Porte Manteau lack of fit test is perform- ed. The periodogram check likewise may be performed and the Akaike test may be used to compare competing models. 6.3.4 SUMMARIZED PROCEDURE FOR MULTIPLICATIVE ARIMA MODELING The modeling procedure for the multiplicative ARIMA(p,d,q) x (P,D,Q),, models may be summarized in the following steps. 300STEP (1). ‘Transformation. Check the normality of the data and make the appropriate transformation (such as the Box- Cox transformation) to normality as necessary. STEP (2). Differencing and Identification (2a) From a plot of the normalized series observe whether there is any periodicity or other nonstationarity in the series. (2b). Check the autocorrelation of the normalized series. ‘Typically, the ACF of monthly series shows a 12 month periodicity ‘superposed on a decaying autocorrelation The periodicity indicates the need of seasonal differencing by Eq. (6.13); a slow decay superposed on the periodicity may indicate the need of nonseasonal differencing by Eq. (6.1) It is useful to observe the behavior of the ACF for several combinations of seasonal and nonseasonal differencings. Use the lowest level of differencing necessary to achieve station- arity. The combination of a Box-Cox transformation with seasonal and nonseasonal differencing may be accomplished by IMSL Program FTRDIF*. STEP (3). Fitting the’ Model Parameters (3a). Preliminary estimates. The expressions for the autocovariance structure may be developed. Estimates of the parameters may then be obtained by replacing the expected values of the autocovariances by their observed values, and solving these equations simultaneously. Box and Jenkins (1976, p. 329 and ff) give a list of such functions for a few models, however these are not necessarily appropriate models for hydrologic situations. This step may become laborious and may be skipped, starting with step (3b) (3b). Maximum likelihood estimates. Find the sum of squares surface e,2(, 0, , ©) for a range of parameter values, locate its minimum and the corresponding parameter values (3c). Nonlinear estimation. Use the maximum likelihood estimates as initial values, the final estimates of the param- eters are obtained by the nonlinear estimation procedure. (3d). Diagnostic check. Perform the appropriate checks on the residuals; these include the inspection of their ACF, the Porte Manteau test and the cumulative periodogram test. The Akaike test may be performed to compare competing models. *See Appendices AG.1 and A6.2 301(3e). Forecasting. Develop the forecasting function by taking the conditional expectations of the expanded finite difference form of the model. Compute the y-weights as indi- cated in Eq. 6.40. The forecasts and their confidence inter- vals are then evaluated (3f). Inverse transformation. The inverse of the transformation performed in step (3a) must be performed to obtain the forecasts in the original physical units Steps (3b) through (3f) (except the Akaike test) may be performed by the Box-Jenkins program UNESTM (see Appendices A6.3 and A6.4). 6.3.5 EXAMPLES OF MULTIPLICATIVE ARIMA MODELING Monthly flows of 16 watersheds located in Indiana, Illinois and Kentucky were studied by McKerchar and Delleur (4974). Many of these watersheds are the same as those referred to in Sec. 5.3.5 and 6.2.5. The watershed areas vary from approximately 240 to 4000 square miles and the length of the records varies from 444 to 672 months. The watershed corresponding to the rainfall data used in previous examples (the Blue River near White Cloud, Indiana) is used for illustration. It has a drainage area of 461 square miles and a length of record of 456 months. The data are given in the Appendix as part of the computer program input. Initially, AR(1) and AR(2) models were fitted to the periodic standardized monthly flow logarithms. The AR(1) model passed the Porte Manteau test in 10 out of 16 cases and the AR(2) model passed the test in all cases. The AR(2) model was selected and referred to as model A. The number of parameters required was 27, namely, 12 monthly means, 12 monthly standard deviations, 2 AR coefficients and 02. The multiplicative ARIMA models were investigated as they “offered the promise of fewer parameters in forecasting applications. STEP (1). Transformation. The seasonality of the monthly means and standard deviations of the flows are exhibited in Fig. 6.9. Often the standard deviations are larger than the means, resulting in a coefficient of variation greater than unity, indicating highly variable data. In addition, since the data have lower bounds of zero, a coefficient of variation greater than unity implies that the data must be positively skewed; this is confirmed by the positive values of the monthly coefficients of skewness shown in Fig. 6.10 The skewness coefficients for the logarithms of the monthly flows are close to zero, suggesting that monthly flows may follow lognormal distributions. Plots of flows of indivi- dual months on lognormal probability paper as in Fig. 6.11 30215004 5 1000-4 300 Oe eT eT TT toe MONTH (j) Figure 6.9a. Mean monthly flows of the Blue River near White Cloud, Indiana ‘500-4 -| || 00-4 |_| Le Olhericislisseeel air fe erceal Wc lareees (ara eee at ct eee aT MONTH (j) Figure 6.9b. Monthly standard deviations of flows of the Blue River near White Cloud, Indiana. support this contention. Figure 6.12 gives little evidence for assuming a periodic pattern in the monthly correlations. It is thus assumed that the data are covariance stationary: the same dependence exists between all months regardless of the position within the 12 month seasonal cycle. STEP (2). Differencing and Identification. Autocorrelations were calculated for all possible differencing schemes of non- seasonal differencing (d = 0,1,2) and seasonal differencing with a lag of 12 (D = 0,1,2). The autocorrelation functions 303ao4 Cy 20 NATURAL SERIES eal ee -—_— 04 FeePNEES pes eee 7] LOG-TRANSFORMED SERIES 4 oo 204 I ot MONTH (j) Figure 6.10. Monthly coefficients of skewness of flows and log-transformed flows of the Blue River near White Cloud, Indiana. of the differenced series w, = S4v2,y,, where y, = lox, are shown in Fig. 6.13. The first seasonal difference is seen to considerably decrease the seasonality in the autocorrelation function, and the first seasonal combined with the first non- seasonal difference (D=1 and d=1) essentially eliminates the cyclicity and shows significant values of lags 1, 2, 11, 12, and 13, with lags 1 and 12 being the dominant ones. This type of behavior tends to indicate the possibility of a season- al and a nonseasonal moving average component. An ARIMA modei of the type (0,1,1) x (0,1,1)12 appears to be a candi- date. This is the model used by Box and Jenkins to repre- sent the logarithms of monthly passenger totals in internation- al air travel. That series exhibited both seasonality and a positive trend. For the hydrologic data physical intuition would indicate that the nonseasonal differencing is unneces- sary due to the absence of a trend and that seasonal differ- encing would result in a series with stationary mean and var- iance. The month to month correlation could be taken into account through an AR(1) or AR(2) nonseasonal component. Thus, the ARIMA models (1,0,0) x (0,1,1)i2 and (2,0,0) x (0,1,1)12 also deserve consideration. The previous experi- ence with the models applied to the cyclically standardized flows mentioned in the introduction of this section indicates that an AR(2) component is likely to exist. Therefore, the following models are retained for further investigation: the ARIMA (2,0,0) x (0,1,1)i2 and the ARIMA (0,1,1) x (0,1,1),2 models. STEP (3b). Maximum likelihood estimates. The (0,1,1) x (0,1,1)12 model is written as (1-B)C-B1)y, = (-6,B)(-6:B1*)e, 304200 |}-— + > 4 | ry l ! | J rr ee pRosaoLiry That Gg —e Figure 6.11. Lognormal probability plot of logarithms of April flows of the Blue River near White Cloud, Indiana. to. 5 1 os. ° © @ 4 3 Tet z MONTH (j) Figure 6.12. Monthly serial correlations of the logarithms of flows of the Blue River near White Cloud, Indiana. 305Figure 6.13. k 420, 00 k d0, 0 k ert, D+0 x au. ont Estimated autocorrelation functions for differenced series for the Blue River near White Cloud, Indiana, with u, = v4v2,y;, where y, = log, @,, N= 456 306os a a5 420 \ 08 460 seo. 0.6 420 bo (ae Dok = 400 a 380 [ 31 362 boon 1.0 Figure 6.14. Sum of squares surface 3e,2(61,0:) for multiplicative model (0,1,1) "x (0,1,1)i2 applied to the logarithms of monthly flows of the Blue River near White Cloud, Indiana. or Ye = Yer * Yeeza ~ Yeas * &t 7 One peg - repre * 9191813 The sum of the squares surface %e,2(01.02) is calculated and plotted in Fig. 6.14 for a range of values 0.2 < 6; < 0.8 and 0.4 < @; < 1.0. The surface is well behaved and exhibits a single minimum around 6; = 0.55 and 6, = 0.9 The (2,0,0) x (0,1,1)12 model is written as (1 ~ 6;B - 62B%)G - Bl )y, = G1 - 4B! )e, or Vee * Oe + Vere ~ HVE ag ~ MVera te” Op ae 307The sum of squares surface Ze#($1,2,01) is shown in Fig. 6.15 for 0.2 < 6: < 0.8, 2 40.1 and 0.4 < 6 < 1.0. Again, the surface is well-balanced with a minimum in the neighborhood of 4; ~ 0.5 and 6, ~ 0.9. For 62 =0 and 0.2 the shape of thé surface remained almost unaltered and only small changes in the sum of squares occurred. r 0.8 0.6 Figure 6.15. Sum of squares surface 3¢,7(01,02,01) for multiplicative model (2,0,0) "x (0,1,1)12 for do = 0.1, applied to logarithms of monthly flows of Blue River near White Cloud, Indiana. STEP (3c). Nonlinear iterative estimation. Using the nonlinear iterative estimation procedure the following values were obtained. Model (0,1,1) x (0,1,1)32 Iteration 6 o, Initial estimate 0.55 0.9 Final estimate 0.549 + 0.040 0.942 + 0.009 308The results for the model (2,0,0) x (0,1,1):2 obtained from the program UNESTM are given in Table 6.3 STEP (3d). Diagnostic check. The autocorrelation function of the residuals of model (0,1,1) x (0,1,1)12 is shown in Fig. 6.16. Lags two to six are seen to be all negative and significantly different from zero as the standard error is 21/{N = 41/J456 = 40.047. This is not typical of random 24 series. The Q-statistic is Q=N x r,%(e) = 71.3 which is 1 highly significant as 2 (90%) = 30.8, substantiating the conclusion that this autocorrelation function is not representa- tive of a random series. The (0,1,1) x (0,1,1)12 model must therefore be discarded. Further inspection of the ACF of the residuals shows that the seasonal effects have been nearly eliminated. It would therefore appear that the seasonal part of the model is acceptable but the nonseasonal is not. Figure 6.16. Residual autocorrelation function for model (0,1,1) x (0,1,1)12, (the standard error is 41/(N)® = 0.047), applied to logarithms of monthly flows of Blue River near White Cloud, Indiana. The residuals of the model (2,0,0) x (0,1,1)12 are calculated from EVE” Ve 7 V2 Vere * Veg + 2% t-1g * OPE re The last 44 residuals are listed in Table 6.4 The autocorrelation and partial autocorrelation functions of the residuals of the model (2,0,0) x (0,1,1);2 are shown in Table 6.5. They give no reason to suspect that the resi- dual series is not independent. The Q-statistic calculated for the first 30 lags is Q = 17.30, which is not significant com- pared to 3, (90%) = 29.6. This suggests that the residuals may be considered as random. The ARIMA (2,0,0) x (0,1,1),2 model passed the Porte Manteau test in 15 out of 16 cases studied. In the one case not passing, the statistic was Q@ at the 90% level and was just passing at the 95% level. It may therefore be concluded that the ARIMA (2,0,0) x 309T0-310293"8, oud TavENYLS TwhITSIA 2bp STWNOIS3A 40 83gHNN To-322sap"2 SUNOS NuSH “wngISza ‘a'U Gev — 20+3ee9e2"e sauunos 40 KNS TwhaIs3y SITNS34 ONY NOTLUYOSNT A3HLO To-az00Tb"6 To-a26995°8 10-320866°8 a 1 39yaan¥ SNINOH e To-31stso"T To-38e98"—» €0-30sS8E°6 2 1 anTss3uo3u01ny z To-absT1S"9 To-322968"¥ To-3eve9s"S 1 T 3nTSS3uoRN0LNY 1 LTHIT 3aasn AIHIT w3H07 ann azo dAL a36hON 4N3D Bd SE aalyutisa al 3Hvavd aa ahead aalanvava (oA = 4199907 = WLbo CaHYOSSNAL HIIM G3d07|NgC 300K 21 a3gyo 40 T - x NO ONTONREBAAIC SHOILUnaasao ssh gno7 ATH aeaN aznTa ante = x - wiv 1 7300 40 aaeMANS ‘euRIpU] ‘pnofg aityM Ivey seATY entg ‘smo[y ATYIUOW Jo wYIIeZ0] ayy 0} paddy @T(T‘T‘o) x (0'0'Z) POW ‘s"9 AITEL e S aTable 6.4. Residuals of Model (2,0,0) x (0,1,1)12 Applied to the Logarithms of Monthly Flows, Blue River Near White Cloud, Indiana. T FIVTED VALUE RESIDUAL DATA UALUE 5.8713E+00 2-36516+00 2.2363E+00 71 14qaE+00 aloszie-o1 2713805€+00 7.8022e+00 -Ilo161e+00 5.58526+00 5:3625E+00 8180g2e-01 7. 34346-00 5.4865¢+00 4.8702e-01 35+ 00 81 12886+03 -1120536+00 7 32008+00 4:9398e-00 -4151236-01 4!aB86e+00 3. 3980E+00 6.45326-91 4.5151e+00 4/51546+00 03186+00 3!5e3se+00 3:55336+00 3:3856E-01 3.88186+00 3151396+00 SI51586-01 310814E+00 515856E+00 312314€-01 615088E+00 7:07s2e+00, One peae- Taking the conditional expectation, indicated by a square bracket, we have for a lead time of L months 31120" 20-0 Bar= 00" 00" HOYOS baT= SO" 0" Br be £1 ToT zo" so" $0" Sor Tor= 90" 20" HOT OTTO EO 2bb = SuOTLYna3sa0. 49 a3ANN Yo-3abe09"8= $3TSI5 JO “Nad “1s To-30g02*—e= $3183 341 40 Wa ‘Sa1aaS WHIDTIO suoruenaasao 2b) 7 70OH - STeNGTS3 GBLYNTIS3 3HL - viva SNOTLYTRUODOINY WILaeE 1 3 rato = stwnaszy aa.eWtis3 HL t MoUS3as 30 S333030 12 HIN 3 Wgulaen SaunOs-IHD ¥ ALIN GaledNOO 8 anOHS Vovgorae2"T “Sn 3Hi 3610 SLIMN SI Sa]a36 SIM SU SHT 1531 OL oosass2e2"T = aoa “1S 4€ a3diAIa WwSH so: sor sor go: so: so: so: so-so: gor “3s go-- s0-- 20" S0°~ So* for bor bora v2 “er $0: $0: go" 0° 0: sor sor sor gar gor gor gor ss To So" So" STO o> Bas BO BOY TO" EO TO a 2>b = swoTiunesan 49 amu soeSsre09*e= sa1aas Jo *n3d "1S T0=30802"-s= Saas Su. oo Wa 831838 WATIEO sHOLisnaasao 2bp TTaUOW = sTwnaISze Caue8T1S3 IHL ~ YIN NoToNny MOTLETEAROI0IN 1 seuerpul “prog aYM ceeN saary antg ayy jo smory ATyiuoj Jo suyytueSoy ayy 0) parddy 2'(T‘T‘9) Yened pue voreestoooy °s°g oTGeL X (0'0'Z) [POW JO S[eNpIsey Jo suooUNY uoreTeZs090: 312yl) = (Yeap) = abv gpea) + O2l¥ar-o) + Yen-ael - OsYeen-a3) ~ O2lVeez-agl + [pap] > Ole pt-r2l Remembering that the expectations of past observations and past random variables are the values themselves, and that the expectation of the future random variables is zero, the fore- casting functions become: Ll VED) = Oa eFOoVe AV p11 Oe 22 e131 L=2 £ ypC2) = bry +a ety 797% ¥ 47772 4-101 10 L=3...12: y,(L) = dry, (L-1)+o2y,(L-2)+¥ 4473071 ta-137 eV teL-14 1 tL 12 L=13 ¥,C13) = dry, @2)+oey, C11) ty, (Lory -o2y ey L=14-y(14) = O1y,(13)+2y,(12)+y4 (201 y4 1) boyy, LL... + y,(L) = Ory, (L-1)+b2y,(L-2)+y, (L-12)-61y,(L-13)- bey, (L-14) For example, making use of the y, and e values listed in Table 6.4 we obtain the lead one forecast at base time t = 456 months: Ya5q(1) = *Y¥a56 * 2¥a55 * Yaas ~ %1¥qaq ~ $2Vqag ~ 1%4a5 = 0.55534 x 4.3567 + 0.0093865 x 5.2417 + 3.4012 - 0.55534 x 4.3175 - 0.0093856 x 5.3753 + 0.898802 x 0.62689 = 3.9852 Likewise, making use of Tables 6.4 and 6.5, the 14 month forecast is: Vagg614) = O1¥ g5g(13) + b2¥q56(12) + Yg5g(2) - o1¥g5661) - $29 456 = 0.55534 x 3.9814 + 0.009386 x 4.3596 + 4.6945 - 0.55534 x 3.9852 - 0.009386 x 4.3567 = 4.6945 313The forecasts at base time t = 456 months are listed in Table 6.6. It may be observed that the forecasts tend to the monthly means: L Vaso) in, % Difference 1 3.9852 4.1443 3.84 2 4.6945 4.8189 -2.58 3 5.7638 5.5837 43.23 4 6.4920 6.5030 -0.17 5 6.6869 6.8632 +0.36 6 7.0225 7.0079 +0.21 ete To estimate the forecasting errors we calculate the y-weights from Eq. (6.40) equating coefficients of equal powers of B: (1 ~ O1B ~ $2B?)(1 - Bl?)(Uo + YiB + ¥gB? + ...) = 1-6,B1? or (1. = OB ~ 628% - BI? + gsBI® + 6eBt4) (Wo + YB + ¥aB?+...) = 1 - @yB1? Thus $o=1 Ui = o1 = 0.555343 Yo = Ovbi + 2 = 0.555343x0.555343+0.0093856 = 0.31779 Us = Oib2tda = 0,555343x0.31779+0.0093865x0.555343 = 0.1817 Yi = Orhi0 + bao Vie = orbit dotio + 1 - Wig = Orbi2 + Gabi + U1 - On Ostia + Ooi Y= Ory * O22 + ay - OY ag batjeyge 52M The first 24 y weights are listed in Table 6.7. The standard deviation of the forecasts is 314wr +09 “a “eueTpU] ‘pNo[D aiYM JON Jeary ont ‘smolq AqyIUOW Jo sunpEZoT oy 07 paddy (1 “T°0) X (0'0'%) T9POW 20°01 usw eors2a “9'9 aIGeL 315Table 6.7. Model (2,0,0) x (0,1,1)12 Applied to the Logarithms of Monthly Flows, Blue River Near White Cloud, Indiana. 1 WEIGHTS USED IN CALCULATING CONFIDENCE LIMITS AND UPDATING FORECASTS AFTER NEW OBSERVATION J PSC) 0 1.0000000E+00 1 519534304E-01 2 17792396-01 3 g169652E-01 4 1,038868SE-01 5 519398334E-02 8 3.3961585€-02 2 1.3417872E-02 8 1.1192360E-02 3 613478843E-03 10 3.6294656E-03 a 2L0751829E-03 42 1,0238477E-01 13 14 15 16 17 18 19 5:6878146E-02 3. 2547917E-02 1:8609146£-02 1.063997 06-02 6. 08350826 -03 3..4783060E-03 19887558E-03 20 1,1370908E-03 21 &is014292€-04 22 172564E-04 23 253781E-04 '31978E-01 = 1/2 sy) = (142 +0. + ayy?) For example for L = 3, sy(3) = (1 + 0.555347 + 0.317792)! x 0.8652 = 1.0271. Note that the standard deviations of the forecasts increase slowly to 1.048 for L = 12 and to 1.054 for L = 24 remaining essentially constant, and do not reflect the variation in the monthly standard deviations of the flows. The 95% confidence limits of yy5g(3) are 5.7638 + 1.0271 x 1.96 UI 5.7638 - 1.0271 x 1.96 = 3.75 The forecasts confidence limits are listed in Table 6.6. STEP (Sf). Inverse Transformation. The y,(L) are exponentiated to obtain the flow forecasts listed in the lower half of Table 6.6, and plotted in Fig. 6.17. 316Figure 6.17. Graph of forecasts at origin, graph interval is 2.1360E + 01, T = 456 with (2,0,0) x (0,1,1)12 model applied to monthly flow log- arithms of the Blue River near White Cloud, Indiana. STEP (3g). Forecasts Updates and Real Time Forecasts. The forecasts may be updated as a new information becomes avail- able. In example 5.2.7, the series was short and the param- eters were re-estimated each time a new flow became avail- able. In this case, the subroutine FCAST of the program UNESTM updates the forecasts keeping the model parameter constant. Subtracting ya) from Yee) evaluated from Eq. (5.54) the following expression for the forecast update is obtained: Yer) = yl) + bee) where fee = Veer 7 YD) which follows from Eqs. (5.55) and (5.54) written for L = 1. Thus when the new observation, yge7, is available the fore- casts may be updated: a Ya57) = Ygse(2) + ¥1Qq57 ~ Vase)? = 4.6945 + 0.5553 (gn 36 - 3.9852) = 4.4714 317where the flow at time 457 is 36 cfs. (See data input in Appendix). Likewise, Vag7(2) = Yagg63) + ¥2(¥a57 - Yasg(D) = 5.7638 + 0.31779 [2n (36) - 3.9852] = 5.6361 Similarly as soon as Yygg = 2n (138) becomes available, the updated forecasts with two new observations may be calculated: Vagg(1) = Yagq(2) + ¥n(Va5q - Ya5qD) 361 + 0.5553 [gn (138) - 4.4715] = 5.8892 and Vagg(2) = Yagz(3) + Yoa5g ~ Yqgq1) 6.4190 + 0.31779 [2n (138) - 4.4715] = 6.5638 The updated forecasts are listed in Table 6.8. The sequence of updated lead 1 forecasts or real time forecasts are plotted in Fig. 6.18 and the exponentiated values are shown in Fig. 6.19 “+e Lae one SF Ube Forecasr Figure 6.18. Real time forecasts of logarithms of monthly flows, Blue River near White Cloud, Indiana. 318eres» “Ghiveah seusoas ‘eave m1 Hsu s eeveee ssuazz08 rat» wave ‘Gatean ‘soninaaseo raw 2 - “BueIpU] “PNo[D oNYM WAN Jeary ant ‘smord AIUIUOWL Jo suMEIeZ0T ou or pemtddy 27(T‘T‘o) x (0'0'Z) IPO “8"9 ATAEL 3196.3.6 LIMITATIONS TO BE CONSIDERED IN APPLICATIONS OF MULTIPLICATIVE ARIMA MODELS A comparison of Figs. 6.18 and 6.19 reveals that the multiplicative ARIMA model tracks the logarithms of the flows better than the flow obtained by exponentiation of their logarithms 3000.7 “to o8Ta SF Forecast 2500. 4 2000. 1800, FLON( CFS) 000, 500, “8.00 “00 a i i ee Figure 6.19. Real time forecasts of monthly flow, Blue River near White Cloud, Indiana. The forecasts y,(L) are conditional means which are expected to be normally distributed about the actual flow log- arithm with a standard deviation s,(L). It appears more realistic to use the method of moments instead of exponentia- tion to obtain the flow forecasts. The method of moments gives directly the mean m, and the standard deviation s, of the logarithms from the mean xX and the standard deviation Sy of the x, series by the relationships ie) 2 x exp{m, + 85/2] and a =k 2). 8, = ¥fexp(st) - 1] 320Thus, the flow forecasts ay) and their standard deviations 5,(L) are given by ay(L) = exply,(L) + 1/2 s*,(L)] and \ s(L) = a,(L) fexpls,2(L)} - 1) However, it is important to recognize that by either method the ARIMA models yield standard errors of the fore- casts which are independent of the season. This inability to take into account the seasonal variability of the standard de- viations results in errors in the flow forecasts. It is interesting to note that.this defect can be eliminated by using a different model. The same series of monthly flow logarithms can be made stationary by means of a nonparamet- ric periodic standardization. AR(2) models were fitted to the 2, series with t= (v-1)12+ 1 where the y's are flow logarithms. All 16 flow series tested passed the goodness of fit test. For the Wabash River at Logansport, Indiana, (Station 3-3290) the model parameters were 62 = 0.738 ; 1 = 0.468 + 0.043 ; op = 0.082 + 0.043 The forecasts of the flow logarithms obtained by the AR(2) model are shown in Fig. 6.20 and are very similar to those obtained with the ARIMA (2,0,0) x (1,1,0)12 model. For the AR(2) model, the standard error of the forecasts of the standardized flow logarithms 2, is 9, s(L) = 1+ Wy? tet to. tPF OL The corresponding standard error of the y,(L) is sy(t,L) = s,(L)s, where the s, are the standard deviations of the correspond- ing monthly flow logarithms. The s, thus introduce the seasonality effect in the s,(t,L). It is therefore possible to obtain correct flow forecasts as shown in Fig. 6.21. Other limitations and comparisons hetween the ARMA and ARIMA models are discussed in the next section. 321$9 STN. 3-3290 O—© MONTHLY MEANS. %——X FORECAST FUNCTION %(L) 5 L 1 t— fe € 2 8 24 im 2 6 12 € 12 Figure 6.20. Forecasting function for logarithms of monthly flows of the Wabash River at Logansport, Indiana 10000) STH. 3.3290 OO MoNTHLY MEANS 8000; Xx Forecast FN O(L} aw 6000 4000 2000! L 1 L 6 12 6 24 se ee e 12 Figure 6.21. Forecasting function for monthly flows of the Wabash River at Logansport, Indiana 3226.3.7, COMPARISON AND LIMITATIONS OF ARMA AND. ARIMA MODELS A number of linear stochastic models are used for hydrologic time series. Some of these models are used for generating synthetic sequences of data, while others are used to forecast the data one or several time steps ahead. Both applications are of considerable importance to the design and operation of water resources systems. The historical stream- flow record is just one realization of the stochastic process of streamflow time series, which may not include all the critical periods of floods and droughts. It is therefore necessary to generate synthetic streamflow sequences which are sufficiently long, so that they can be expected to produce these critical conditions. These flow realizations, with the same statistical characteristics as those of the historical streamflow record, make it possible to analyze water resources systems under a great variety of conditions and to approach the optimal design more closely than would be possible with the historical flows only. To accomplish these objectives, hydrologists construct stochastic models which preserve the mean, the variance, and the autocorrelation structure of the historical flow record. The justification for preserving the mean and the variance is that ‘the range of the cumulative departures from the mean, which in turn specify the design of reservoir capacities, can be estimated in terms of these two statistics: The justifica~ tion for preserving the autocorrelation structure is to main- tain the characteristics of low-flow and high-flow sequences (besides, the needed storage capacities are functions of the autocorrelation structure). Traditionally, the time series models are fitted to the autocorrelation function or equivalent- ly, to its Fourier transform or the spectrum of the stationary transformed historical hydrologic record. Obviously, several models with increasing degrees of complexity can satisfy these statistical requirements with an increased accuracy. The cost of this increased accuracy is usually an increase in the num- ber of model parameters, but often the historical series are fairly short and lead to uncertainties in the estimation of the parameters, as well as to doubts on the appropriateness of models requiring the estimation of a large number of param- eters. The following question may then be raised: What are the trade-offs between the practicality and the complexity of competing time series models used in hydrologic analyses? The model choice may not be the same for different time resolutions, such as year, month, week, or day. It is ap- parent that in the analysis of annual series, the long-range dependence would be of major concern; for monthly series, the seasonal effects may be the dominant characteristic; whereas for daily series, the absence of flow or of rain in a 323