Sequentially adaptive Bayesian learning for a nonlinear model of the secular and cyclical behavior of US real GDP
Abstract
EconStor is a publication server for scholarly economic literature, provided as a non-commercial public service by the ZBW.
Full text
Geweke, John Article Sequentially adaptive Bayesian learning for a nonlinear model of the secular and cyclical behavior of US real GDP Econometrics Provided in Cooperation with: MDPI – Multidisciplinary Digital Publishing Institute, Basel Suggested Citation: Geweke, John (2016) : Sequentially adaptive Bayesian learning for a nonlinear model of the secular and cyclical behavior of US real GDP, Econometrics, ISSN 2225-1146, MDPI, Basel, Vol. 4, Iss. 1, pp. 1-23, https://doi.org/10.3390/econometrics4010010 This Version is available at: https://hdl.handle.net/10419/171861 Standard-Nutzungsbedingungen: Die Dokumente auf EconStor dürfen zu eigenen wissenschaftlichen Zwecken und zum Privatgebrauch gespeichert und kopiert werden. Sie dürfen die Dokumente nicht für öffentliche oder kommerzielle Zwecke vervielfältigen, öffentlich ausstellen, öffentlich zugänglich machen, vertreiben oder anderweitig nutzen. Sofern die Verfasser die Dokumente unter Open-Content-Lizenzen (insbesondere CC-Lizenzen) zur Verfügung gestellt haben sollten, gelten abweichend von diesen Nutzungsbedingungen die in der dort genannten Lizenz gewährten Nutzungsrechte. Terms of use: Documents in EconStor may be saved and copied for your personal and scholarly purposes. You are not to copy documents for public or commercial purposes, to exhibit the documents publicly, to make them publicly available on the internet, or to distribute or otherwise use the documents in public. If the documents have been made available under an Open Content Licence (especially Creative Commons Licences), you may exercise further usage rights as specified in the indicated licence. http://creativecommons.org/licenses/by/4.0/
econometrics Article Sequentially Adaptive Bayesian Learning for a Nonlinear Model of the Secular and Cyclical Behavior of US Real GDP John Geweke Economics Discipline Group, School of Business, University of Technology Sydney, 14 - 28 Ultimo Road, Ultimo, NSW 2007, Australia; [email protected]; Tel.: +61-2-9514-9797 Academic Editors: Herman K. van Dijk, Francesco Ravazzolo, Nalan Basturk and Roberto Casarin Received: 1 October 2015; Accepted: 2 February 2016; Published: 2 March 2016 Abstract: There is a one-to-one mapping between the conventional time series parameters of a third-order autoregression and the more interpretable parameters of secular half-life, cyclical half-life and cycle period. The latter parameterization is better suited to interpretation of results using both Bayesian and maximum likelihood methods and to expression of a substantive prior distribution using Bayesian methods. The paper demonstrates how to approach both problems using the sequentially adaptive Bayesian learning algorithm and sequentially adaptive Bayesian learning algorithm (SABL) software, which eliminates virtually of the substantial technical overhead required in conventional approaches and produces results quickly and reliably. The work utilizes methodological innovations in SABL including optimization of irregular and multimodal functions and production of the conventional maximum likelihood asymptotic variance matrix as a by-product. Keywords: business cycles; posterior simulation; sequential Monte Carlo JEL classification: C11 1. Introduction This paper takes up a simple but nontrivial example of a situation that arises often in econometrics. An econometric model takes the form p(y|x,β)where yis a vector of outcomes, x is a vector or matrix of covariates or conditioning observables, βis an unknown parameter vector, and the functional form of pis the model specification. Due to the motivating economic theory, or by virtue of the interpretation of the model, βis a function of a more fundamental parameter vector θ, so that β=β(θ). The function need not be one-to-one. For purposes of motivation and interpretation θis superior to β; indeed, this typically can best be accomplished in terms of θ. Examples can be found in most chapters of many econometrics textbooks, from the undergraduate to postgraduate levels. A generic case is the one in which θexpresses the underlying taste and/or technology state of a market or economy: neoclassical models of production and consumption and structural simultaneous equation macroeconometric models are two broad subcategories. The same is true in nonstructural settings like the many specific variants of linear state space models and factor models. And it is also true in the effort to provide economic interpretation of simple descriptive models like the one used here. For a subjective Bayesian, this point has added force because a prior distribution that is substantive (by implication proper) must be expressed in terms of θ, not β. Bayesian econometrics now has a set of tools to address these nonlinear models, the most widely applied perhaps being Markov chain Monte Carlo (MCMC). This paper adds to this collection of tools the sequentially Econometrics 2016,4, 10; doi:10.3390/econometrics4010010 www.mdpi.com/journal/econometrics
Econometrics 2016,4, 10 2 of 23 adaptive Bayesian learning algorithm (SABL). Given that there already exist multiple approaches, the question of why an additional approach naturally arises. There are several good answers to this question. The objective of this paper is to substantiate the answers, by both presenting the method and by illustrating its application to nonlinear models. 1. SABL provides a generic and robust approach to the nonlinear model problem as just stated. Compared with existing methods like MCMC it requires very little tuning and experimentation with the exact form of the algorithm (for example, specification of the variance matrix for the Metropolis random walk, burn-in and convergence decisions). In many cases, like the illustration here, no tuning or experimentation at all is required. 2. With a simple change of a single parameter, the SABL algorithm can be used for optimization as well as Bayesian inference. Here, that feature is used to compute maximum likelihood estimates and their associated asymptotic distribution. More generally, SABL can be used to attack a wide variety of optimization problems in economics. 3. SABL enables Bayesians to use almost any prior distribution and to modify conventional distribution by imposing constraints (illustrated here) or mixing with discrete distributions (not illustrated). It also provides numerical standard errors and accurate log marginal likelihood (marginal data density) approximations as by-products, neither of which is a focus of this paper. 4. In many cases SABL is faster and more accurate than any competing algorithm when executed in a conventional multicore CPU environment. That is the case for the illustration here. 5. The SABL algorithm is pleasingly parallel, and except for a computationally insignificant portion of the algorithm it is embarrassingly parallel. It is therefore well suited to execution on graphics processing units, and this facility is included in SABL. This list is not intended to be exhaustive, but rather as motivation for the reader already steeped in Bayesian computational techniques to continue on. The paper proceeds by introducing the nonlinear model used as a simple but realistic example, Section 2. Section 3then provides an overview of SABL used for Bayesian inference, drawing on more extensive documentation for SABL that is readily available [1]. This is followed by the illustrative example for Bayesian inference, Section 4. Section 5takes up optimization in SABL, with a specific focus on maximum likelihood, and the illustration follows in Section 6. There is a short concluding section. The paper is written to convey an understanding of SABL and its application to the problem set forth in the next section. For full development of the immediate theory, refer to [2–4]. For the underlying probability theory the single best self-contained reference is [5]. 2. Interpretation of the Third-Order Autoregression The relationship of second-order stochastic difference equations to business cycle dynamics has been recognized at least since [6]. In a model like yt=γ0+γ1yt−1+γ2yt−2+εt, where εtis the innovation (shock) for the stationary time series {yt}, the associated characteristic polynomial is γ(z)=1−γ1z−γz2. Let the roots of the polynomial be r1and r2. Stationarity is equivalent to |r1|>1, |r2|>1. If, in addition, r1and r2are a complex conjugate pair then the time series exhibits characteristic cycles in which the amplitude is α=|r1|−1=|r2|−1and the period is 2π/ tan−1(Im (r1)/Re (r1)) where tan−1denotes the principle branch in (0, π). This is the technical essence of [6] and now a standard part of graduate education. Geweke [7] applied a similar interpretation to the third-order stochastic difference equation (autogregression)
Econometrics 2016,4, 10 3 of 23 yt=β0+β1yt−1+β2yt−2+β3yt−3+εt,εtiid ∼N0, σ2, (1) taking up the case with one real root r1and a pair of complex conjugate roots r2and r3in the associated characteristic polynomial. That paper used the reparameterization αs=|r1|−1,αc=|r2|−1,p=2π/ tan−1(Im (r2)/Re (r2)) , (2) where the subscript sdenotes “secular” and cdenotes “cyclical.” It continued to impose αc<1, permitted αs>1, αs−1 then being the explosive growth rate, as well as αs<1, the rate of dampening in the transmission of εt. The paper used a conventional improper prior distribution for βand σ2=var (εt)and data from 19 OECD countries 1957–1983. It found posterior probabilities of explosive roots near 0, probabilities of complex pairs exceeding one-half for all countries, and probabilities that |as|>|αc|over one-half for most countries. The application here works directly with parameters that are much closer to the way that economists think about growth and business cycles than are the time series parameters β=(β0,β1,β2,β3)0and σ. This enables the economist to construct a substantive prior distribution and to readily understand the posterior distribution. The work begins by replacing the amplitudes αsand αcwith their corresponding half-lives. A damping amplitude α∈(0, 1)generates the sequence 1, α,α2, . . ., equivalent to the impulse response function in the first-order autoregression xt=αxt−1+ηt. The corresponding half-life is the value hfor which Rh 0αudu R∞ 0αudu =1 2, which implies h=log (1/2)/ log (α). Thus for the secular and cyclical components we have the inverse relations αs=(1/2)1/hs,αc=(1/2)1/hc(3) mapping the secular half-life hsto its amplitude αsand the cyclical half-life hcto its amplitude αc. Writing the generating polynomial for the stochastic difference equation (1) 1−β1z−β2z2−β3z3=(1−r1z) (1−r2z) (1−r3z) with r3=r2, we obtain from (2) β1=αs+2αccos (2π/p),β2=−(αsαc)cos (2π/p)+α2 c,β3=αsα2 c. (4) The domains of αsand αcare (0, ∞). The domain of pis (2, ∞), the lower bound corresponding to using the principal branch of the function tan−1in (0, π)in (2). More fundamentally, there is an identification problem presented by aliasing: in any time series with one time unit between observations periodicities p/(1+pj) (j=0, 1, 2, . . .)all exhibit as period p. A conventional way to resolve this problem is to require p>2, which also seems satisfactory for business cycles with annual data. Thus, given the half-lives hsand hcand the period p, (3) followed by (4) provides β1,β2,β3. The mapping is continuous and has continuous derivatives of all orders. The other parameters of the model are σ, which has straightforward economic interpretation, and β0, which does not but is of little interest. It is natural to express independent prior distributions for hs,hc,p, and σ: most economists could readily state some plausible and some implausible values for each—unlike the case with β1,β2and β3. The half-lives and periods are all measured in time units and the supports of the respective prior distributions must each be (a subset of) the positive half-line. Several well-known prior distributions qualify and can easily be used in the approach taken here. We will use a log-normal prior distribution
Econometrics 2016,4, 10 4 of 23 for each, the distribution for log (p)being truncated below at log 2. There are also several well-known prior distributions for σ; we again use a log normal prior. Finally, β0will be given a diffuse normal prior distribution. Both the Bayesian approach (Sections 3and 4) and the maximum likelihood approach (Sections 5 and 6) thus use the 5 ×1 parameter vector θwith β0=θ1,hs=exp (θ2),hc=exp (θ3),p=exp (θ4),σ=exp (θ5). The components θ1, . . . , θ5are mutually independent and normal in the prior distribution. Section 4discusses the specific choice of the distribution. The prior distribution is also used as a computational device for maximum likelihood, but the result is unaffected by the choice of prior so long as its support includes the maximizing argument of the likelihood function. Noting that the successive transformations (2) to (3) to (4) are continuously differentiable of all orders, and considering the properties of the likelihood function for (1), it is clear that if the likelihood function has a unique internal global mode, then there is a neighborhood of the mode in which the log-likelihood function is twice continuously differentiable with bounded third derivative. This familiar condition is important to a deep verification of the properties of the SABL maximum likelihood estimates in Sections 5and 6. 3. Bayesian Inference Using SABL The SABL algorithm is a procedure for the controlled introduction of new information. It pertains to situations in which information can be represented as the probability distribution of a finite dimensional vector. SABL approximates this distribution by means of many (typically on the order of 104to 106) alternative versions of the vector. These versions are called particles, reflecting some of SABL’s connections to the particle filtering literature. In the SABL algorithm particles undergo a sequence of transformations as information is introduced. With minor exceptions accounting for a negligible fraction of computing time in typical research applications, these transformations amount to identical instructions that operate on each particle in isolation. SABL is therefore a pleasingly parallel algorithm. This property is responsible for dramatic decreases in computing time for many research applications with GPU execution of SABL. At its highest level the SABL algorithm looks like this: •Represent initial information •While information not entirely incorporated –Determine information increment and incorporate by weighting particles –Remove the weights by resampling –Modify the particles to represent the information more efficiently •End In the sequential Monte Carlo literature each pass through the loop While ... End is known as a cycle, and we will use `to index cycles. The three steps in each cycle are the correction (C) phase, the selection (S) phase, and the mutation (M) phase. Let θ∈Θ⊆Rddenote the vector whose probability distribution represents information. Denote the particles by θjn, the double subscripts indicating the Jgroups of Nparticles each employed by SABL. Initially θhas probability density p0(θ); extension beyond absolutely continuous distributions is easy, and this streamlines the notation. In SABL the particles initially are θ(0) jn iid ∼p(0)(θ) (j=1, . . . , J;n=1, . . . , N). (5) In Bayesian inference p(0)(θ)is a proper prior density and in optimization it is the probability density. It must be practical to sample from the initial distribution (5) and to evaluate p(0)(θ).
Econometrics 2016,4, 10 5 of 23 Denote the density incorporating all the information by p∗(θ). SABL requires that it be possible to evaluate a kernel k(θ)with the properties k(θ)≥0∀θ∈Θ,ZΘk(θ)dθ<∞,p∗(θ)∝k∗(θ)=p(0)(θ)k(θ). (6) In Bayesian inference the kernel k(θ)is the likelihood function, k(θ)=p(y1:T|θ), (7) where Tdenotes sample size and y1:T={y1, . . . , yT}denotes the data. Cycle `begins with the kernel k(`−1)and ends with the kernel k(`). In the first and last cycles, k(0)=1 and k(L)(θ)=k(θ), respectively. Correspondingly define k∗(`)(θ)=p(0)(θ)k(`)(θ), (8) implying k∗(0)=p(0)(θ)and k∗(L)(θ)=k∗(θ). (9) The particles change in each cycle, and reflecting this let θ(`) jn denote the particles at the end of cycle `. The initial particles θ(0) jn have the common distribution (5) and are independent. In succeeding cycles the particles θ(`) jn continue to be identically distributed but they are not independent. The theory underlying SABL, discussed further in this section and developed in detail by [3,4] drawing on sequential Monte Carlo theory, assures that the final particles θjn =θ(L) jn d −→ p∗(θ). This convergence in distribution takes place in N, the number of particles per group. The result is actually stronger: the particles are ergodic in N, meaning that for any function gfor which E[g(θ)] =RΘg(θ)p∗(θ)dθ exists, lim N→∞N−1N ∑ n=1 gθjn=E[g(θ)] (10) with probability 1 in each group j=1, . . . , J. A leading technical challenge in practical sequential Monte Carlo algorithms, which of course work with finite N, is to limit the dependence amongst particles, and in particular to keep dependence from increasing from one cycle to the next to the point that the final distribution of particles is an unreliable representation of any distribution at all. A further technical challenge is to provide a measure of the accuracy of the approximation implicit in the left side of (10) for finite Nthat is itself reliable. The SABL algorithm and toolbox do both in a way that makes minimal demands on users. The remainder of this section provides some details. 3.1. C phase For each cycle `define the weight function w(`)(θ)=k(`)(θ)/k(`−1)(θ). The theory underlying the SABL algorithm requires that there exist an upper bound w(`), that is, w(`)(θ)<w(`)<∞∀θ∈Θ.
Econometrics 2016,4, 10 6 of 23 The Cphase determines w(`)(θ)explicitly and thereby defines k(`)(θ)=w(`)(θ)·k(`−1)(θ)(11) and p∗(`)(θ)=k∗(`)(θ)dθ/ZΘk∗(`)(θ)dθ. Thus (8) and (11) imply k∗(`)(θ)=w(`)(θ)·k∗(`−1)(θ)as well. In SABL the weight functions w(`)(θ) are designed so that there exists L<∞for which k(L)(θ)=k(θ), although the value of Lis in general not known at the outset. One approach in designing the weight function is to use the functional form w(`)(θ)=k(θ)∆` and determine a sequence of positive increments {∆`}with ∑L `=1∆`=1. Thus at the end of cycle `, k(`)(θ)=k(θ)r`where r`=∑` s=1∆s. This variant of the Cphase is known as power tempering . The term originates in the simulated annealing literature in which T`=r−1 `is known as temperature and {T`}as the cooling schedule. Another approach originates in particle filtering and Bayesian inference: k(`)(θ)=py1:t`|θ, where 0 <t1. . . <tL=Tfor a sample of size T. The increments are therefore w(`)(θ)=pyt`−1+1:t`|y1:t`−1,θ. This variant of the Cphase is known as data tempering. The Cphase can be motivated informally by analogy to importance sampling, a long-established Monte Carlo simulation method, interpreting k∗(`−1)(θ)as the kernel of the source density and k∗(`)(θ)as the kernel of the target density. If it were the case that the particles θ(`−1) jn were independent and had common distribution indicated by the kernel density k∗(`−1)(θ), then ∑J j=1∑N n=1wθ(`−1) jn gθ(`−1) jn ∑J j=1∑N n=1wθ(`−1) jn a.s. −→ RΘk∗(`)(θ)g(θ)dθ RΘk∗(`)(θ)dθ =ZΘp∗(`)(θ)g(θ)dθ=E(`)[g(θ)] (12) so long as E(`)[g(θ)] exists. The convergence is in N, the number of particles per group. The core of the argument for importance sampling is ZΘp∗(`)(θ)g(θ)dθ=RΘw(`)(θ)k∗(`−1)(θ)g(θ)dθ RΘw(`)(θ)k∗(`−1)(θ)dθ=RΘw(`)(θ)p∗(`−1)g(θ)dθ RΘw(`)(θ)p∗(`−1)(θ)dθ. This result does not apply strictly, here, because while the particles θ(`−1) jn are identically distributed, they are not independent and k∗(`−1)(θ)is at best an approximation of the kernel density of the true common distribution of the particles θ(`−1) jn so long as N<∞(as it must be in practice). But many of the practical concerns in importance sampling carry over. In particular, success lies in w(θ)being “well-conditioned”–loosely speaking, variation in wθjnmust not be too great. For example, difficulties arise when just a few weights wθjnaccount for most of the sum. In this case the target density kernel k∗(`)(θ)is represented almost entirely by a small number of particles and the approximation of E(`)[g(θ)] implicit in the left side of (12) is poor. The Cphase directly confronts the key question of how much information to introduce in cycle `: too little and Lwill be larger than it need be; too much, and it becomes difficult for the other phases to convert ill-weighted particles from cycle `−1 into particles from cycle `sufficiently independent that the representation of the distribution does not deteriorate from one cycle to the next into a state of gross unreliability. A conventional and effective way to monitor the quality of the weight function is by means of relative effective sample size
Econometrics 2016,4, 10 7 of 23 RESS(`)=ESS(`) JN =h∑J j=1∑N n=1w(`)θ(`−1) jn i2 JN ∑J j=1∑N n=1w(`)θ(`−1) jn 2. (13) The effective sample size ESS(`)is an adjustment to the sample size (number of particles, JN) that accounts for lack of balance in the weights, and relative effective size is its ratio to sample size. In general RESS(`)is lower the more information is introduced in the Cphase. This is always true for power tempering and as a practical matter is nearly always the case for data tempering. It suggests a strategy of introducing no further information after RESS(`)has attained or fallen below a target value RESS∗. The target RESS∗=0.5 is usually reasonable. Practical experience shows that somewhat higher RESS∗leads to more cycles but faster execution in the Mphase, lower RESS∗to fewer cycles but slower Mphase execution, and as a result there is not much difference in execution time over the interval (0.1, 0.9)for RESS∗. Before any new information is introduced in the Cphase w(`)(θ)=1. Data tempering entails iterations s=1, 2, . . . in which iteration sintroduces yt`−1+s, updates w(`)θ(`−1) jn =w(`)θ(`−1) jn ·pyt`−1+s|yt`−1+s−1,θ(`−1) jn , and computes the corresponding RESS(`). Iterations terminate the first time RESS(`)<RESS∗. This procedure is well established, though much of the sequential Monte Carlo particle filtering literature introduces exactly one new observation per cycle. In neither approach does the algorithm control the amount of information introduced in the Cphase and therefore in each cycle. Indeed, routine applications of SABL demonstrate that unusual or outlying observations (e.g., asset returns for days or periods marked by financial crisis) can produce RESS(`)with values much smaller than RESS∗, imply poor performance in the Sand Mphases, and generally compromise the efficiency of the algorithm. Power tempering, discussed briefly at the start of this section, makes it possible in principle for the algorithm to control the introduction of information through the choice of the sequence of increments {∆`}. Precisely the same problem arises in simulated annealing approaches to optimization, which uses temperature, the inverse of power, and the problem is known as choice of the temperature reduction schedule. We return to this problem in Section 5, because it has some closely related aspects that apply to optimization but not Bayesian inference. The solution developed there is subsequently used for both Bayesian inference and maximum likelihood estimation in Sections 4and 6. 3.2. S phase The rest of cycle `starts with the weighted particles θ(`−1) jn from the end of the Cphase and produces unweighted particles θ(`) jn that that meet or exceed a mixing condition—a measure of lack of dependence described in the next section—at the end of the Mphase. The Sphase begins this process, removing weights by means of resampling. The principle behind resampling is to regard the weight function as the kernel of a discrete probability function defined over the particles and draw from this distribution with replacement. Hence the name selection phase. SABL performs this operation on each group of particles separately—that is, particles are always selected within groups and never across groups. This independence between the groups j=1, . . . , Jis essential in (1) proving the convergence of the algorithm; (2) assessing the mixing condition in the Mphase; and (3) providing a numerical standard error for the approximation as discussed in Section 3.4. Resampling produces unweighted particles denoted θ(`,0) jn .
Econometrics 2016,4, 10 8 of 23 The most elementary resampling method is to make Nindependent and identically distributed draws from the multinomial distribution with argument Nand probabilities pjn =w(`)θ(`−1) jn / N ∑ i=1 w(`)θ(`−1) ji (n=1, . . . , N). This method is known as multinomial resampling. An alternative method, known as residual resampling, is to compute the same probabilities and collect an initial subsample of size N∗≤Nconsisting of N·pjncopies of each particle θjn, where the function [·]is standard notation for what is variously known as the greatest whole integer, greatest integer not greater than, or floor function. Then draw the remaining N−N∗particles by means of multinomial resampling with probabilities p∗ JN ∝Npjn −N·pjn. Residual resampling results in lower dependence amongst the particles θ(`,0) jn (n=1, . . . , N)than does multinomial resampling. For both methods there are central limit theorems that are essential to demonstrating convergence and interpreting numerical standard errors. There are other resampling methods that lead to even less dependence amongst the particles, but for these methods central limit theorems do not apply. These methods are all described in [5]. The Sphase is a simple but key part of the SABL algorithm. Resampling is also a key part of evolutionary (or, genetic) algorithms where it plays much the same role. The particles θ(`,0) jn (n=1, . . . , N)are for this reason sometimes called the children of the parent particles nθ(`−1) jn o (n=1, . . . , N), and also to emphasize the fact that for each child θ(`,0) jn there is a parent θ(`−1) jn0. Parents with larger weights are likely to have more children—it is not hard to work out the exact distribution of the number of children of a given parent for any one parent for multinomial resampling and then again for residual resampling. With both, the expected number of children, or fertility, of the parent θ(`−1) jn is proportional to wθ(`−1) jn , a measure of the parent’s “success” in the environment of the information introduced in cycle `. 3.3. M phase If the algorithm were to continue in this way, the number of unique children would never increase and in general would decrease from cycle to cycle. Indeed, in the context of Bayesian inference it can be shown under mild regularity conditions that the number of unique particles converges almost surely to 1 as the number of observations increases. The Mphase addresses this problem by creating diversity amongst sibling particles in a way that is faithful to the information kernel k∗(`)(θ). It does so using the same principle of invariance that is central to Markov chain Monte Carlo (MCMC) algorithms, drawing particles from a transition density dQ(`)(θ|θ∗)with the invariance property ZΘk∗(`)(θ∗)dQ(`)(θ|θ∗)dθ∗=k∗(`)(θ)∀θ∈Θ. (14) The universe of invariant transition densities is large and manifest in the MCMC literature. Many of these transitions are model-specific, for example Gibbs sampling variants of MCMC. On the other hand a number of families of Metropolis-Hastings transitions apply quite generally and with problem-specific tuning of parameters can be computationally efficient. SABL incorporates one of these variants, the Metropolis Gaussian random walk. The Mphase applies the Metropolis random walk repeatedly in steps s=1, 2, . . ., each step generating a new set of particles θ(`,s) jn from the previous set θ(`,s−1) jn . Following the familiar arithmetic, candidate new particles are generated θ∗(`,s) jn ∼Nθ(`,s−1) jn ,Σ(`,s−1)and accepted with probability
Econometrics 2016,4, 10 15 of 23 0 1 2 3 4 5 6 7 8 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 Japan: log Secular half−life probability densities log Secular half−life Density Posterior Prior −5 0 5 0 0.2 0.4 0.6 0.8 1 Japan: log Cyclical half−life probability densities log Cyclical half−life Density Posterior Prior 0 1 2 3 4 5 6 0 0.2 0.4 0.6 0.8 1 Japan: log periodicity probability densities log periodicity Density Posterior Prior −4.5 −4 −3.5 −3 0 0.5 1 1.5 2 2.5 3 3.5 4 Japan: log shock standard deviation probability densities log shock standard deviation Density Posterior Prior Figure 3. Prior and posterior parameter distributions, Japan. The mechanics of how the prior distribution influences the posterior are straightforward in this situation. Since there is no correlation between parameters in the data and little in the posterior, by implication prior and data combine for each parameter with little interaction. Given the standard deviations of the prior distribution and the posterior distribution (Tables 2–4), data precision is only modestly higher than prior precision. Thus a location shift of a prior distribution by vunits will produce a shift of a little less than v/2 units in the mean of the posterior distribution. Section 6will compare these posterior distributions with those that would be obtained using the “diffuse” prior distribution in [7]. 5. Maximum Likelihood Using SABL With minor modification of the Cphase, SABL handles global optimization problems as well as inference problems. This section provides a heuristic approach; for more formal motivation and technical details, see [2] and [4]. 5.1. The Method To begin, consider replacing the kernel k(θ)of Section 3with the kernel k(θ)qwith q>1. The corresponding probability density is now more concentrated than it was originally. The Bayesian annealing algorithm could proceed in precisely the same way but now terminating with rL=qrather than rL=1. Of course, the particles at that point would not correspond to a posterior distribution: such an interpretation would amount to an erroneous replication of the sample and additional q−1 times. But everything stated in Section 3about approximation of the distribution with kernel k(θ) remains true for the distribution with kernel k(θ)q. Next consider what happens as qmoves to increasingly higher values, and to this end two properties of k(θ)are useful: 1. The kernel k(θ)has a unique global mode θ∗; 2. log k(θ)is twice continuously differentiable with bounded third derivative in a neighborhood of θ∗, and ∂2log k(θ)/∂θ∂θ0|θ=θ∗=H, a negative definite matrix.
Econometrics 2016,4, 10 16 of 23 In the applications in this paper k(θ)is the likelihood function and similar conditions are invoked in standard limit theorems for posterior distributions and maximum likelihood estimators. The difference is that here the limit is q→∞rather than increasing sample size. Recall that in cycle `of the annealing variant of the SABL algorithm the exponent of k(θ) becomes r`. Denote the variance matrix of particles at the end of this cycle by V`. The following four implications follow, the first from the first property and the others from both. The first three are unsurprising given conventional results for the limits of posterior distributions and maximum likelihood estimators. 1. The probability distribution corresponding to the kernel k(θ)qconverges in distribution to the point θ∗. 2. The probability distribution of q1/2 (θ−θ∗)converges in distribution N0, H−1. 3. Taking the limit first as the number of particles Nincreases and then as the cycle `increases, r−1 `V` a.s. −→ H−1, (20) which is the asymptotic variance of the maximum likelihood estimator. 4. Taking limits in the same way, the power increase ratio ρ`=(r`−r`−1)/r`−1converges almost surely to ρ=RESS∗−2/d−1+hRESS∗−2/d−1·RESS∗−2/di1/2 , (21) where dis the dimension of θ. Note that ρ, the asymptotic power increase ratio, depends on k(θ)only through d. A strength of this approach is that there is no need to determine first and second derivatives, either analytically or by means of numerical differentiation. The only requirements are (a) verify properties 1 and 2 analytically, (b) derive the likelihood function, (c) code the evaluation of the log-liklelihood function, and (d) code nonlinear parameter transformations. For many applications these requirements become trivial if one is using a nonlinear parameterization of an existing model, thus avoiding (b) and (c). In particular this approach avoids analytical derivation and code testing for first or second derivatives, or numerical evaluation of derivatives, both of which can be time consuming, tedious and encounter arcane numerical problems. The results are insensitive to the prior distribution so long as the prior distribution provides support in a neighborhood of θ∗, the same condition invoked in the derivation of the asymptotic properties of posterior distributions. A practical consideration, here, is that as prior probability in this neighborhood decreases, r1becomes smaller and the number of cycles required to achieve a given concentration of particles becomes greater. 5.2. Convergence Criteria Important practical questions are SABL termination criteria and the cycle(s) `whose particles are used to approximate V=H−1using V`. Clearly the cycles chosen to approximate vmust be cycles after the asymptotic power increase ratio has been closely attained, evidenced by fluctuations above and below ρover a sequence of successive cycles. One may also wish to apply criteria for concentration of the distribution of the particles θjn or the distribution of the objective log kθjn. There seems no reason to continue beyond these points. In fact, if cycles are allowed to continue, then eventually the algorithm encounters the limits of 64-bit arithmetic in distinguishing between values of log kθjn. The telltale evidence of this condition is that the evaluation of log kθjnat different particles θjn reflects the bits of the mantissa corresponding to lowest significance. Experience with examples like the one in this paper strongly suggests that the sequence of power increase ratios {ρ`}exhibits three episodes, going to the limits of 64-bit arithmetic.
Econometrics 2016,4, 10 17 of 23 1. In the early cycles ρ`differs substantially from ρ. The most common pattern observed is that in the early cycles ρ`exceeds ρ, drifting downward toward ρ. 2. In the middle cycles ρ`fluctuates around ρ, fluctuations being smaller the larger the number of particles. With the default number of particles in the SABL software (214) fluctuations are less than 10% and commonly less than 5%. In these cycles the particles θ(`)have a distribution that is hard to distinguish from multivariate normal. 3. In the later cycles ρ`drops well below ρand fluctuates erratically. The reason is that variation in the particles is no longer dominated by the asymptotics outlined above: the limits of machine precision become increasingly important. (In the limit the distribution can become bizarre, as detailed in [2]). The random walk Gaussian Metropolis steps in the Mphase are poorly suited to the the objective function now dominated by lower-order bit arithmetic, relative numerical efficiency is poor, and the particle distribution provides a poor source distribution in the Cphase, leading to smaller increases in power in each cycle. These patterns are generally evident in a plot of log ρ`as a function of cycles `, in which the middle cycles exhibit as a nearly flat portion of an otherwise generally decreasing function of `. Any one of the middle cycles is a natural point to harvest the asymptotic variance matrix of the maximum likelihood estimator, as described above. At this point it is also natural to take as the MLE b θ=arg max`,j,nlog kθ(`) jn . Experience suggests that the accuracy of the MLE, so computed, is well beyond the number of digits typically reported. 5.3. Relationship to the Simulated Annealing Literature The technique of simulated annealing was introduced over 30 years ago [10] and is now widely applied in science and engineering. Applications in statistics and econometrics are very rare and most econometricians do not include it in their suite of approaches to maximization problems. This is so despite the fact that [11] demonstrated the method’s utility in that capacity in a Journal of Econometrics paper that ranks 18th (out of thousands) by citation in the simulated annealing literature, and ninth in the citation rankings of articles in that journal. Almost all of the citations come from the science and engineering literature, very few from economics or statistics. The simulated annealing literature also uses a sequence of increasing powers of the objective function, but casts the sequence as its inverse r−1 `, known as temperature. Thus temperature decreases as the algorithm proceeds and this is responsible for its name. In the original version, and indeed most applications since, it may be regarded as a simple version of the SABL algorithm in which there is one particle and no Sphase. Since there is no distribution of particles, neither the sequence of increasing powers in the Cphase nor the variance in the Metropolis steps of the Mphase can be constructed algorithmically as they are in SABL. Instead they must be provided directly by the user in each application. Choosing a sequence of increasing powers (decreasing temperatures) that results in reasonable efficiency—or even works at all—has been a challenge. Typical applications, even by experienced practitioners, involve trial, error and tinkering with temperature reduction schedules. The choice of the variance matrix for the Metropolis step similarly must be tailored to each application, a procedure familiar to many Bayesian econometricians and statisticians who have used the Metropolis random walk for Bayesian inference. In simulated annealing, this variance matrix must be related systematically to temperature (power). Very recently the simulated annealing literature has begun to adopt parallel chains of arguments–particles, in the terminology of this paper. Zhou and Chen [12] is representative. I am not aware of any work in this literature that attempts to use the parallel chains to address the temperature reduction problem and the Metropolis variance matrix problem systematically. Thus the method still suffers from this very substantial overhead in application. Once acceptable solutions to these problems have been found by trial and error, none begins to approach the standard of computing the maximizing argument to the limits of machine precision attained by SABL. Geweke
Econometrics 2016,4, 10 18 of 23 and Frischknecht [2] draws an explicit comparison using the test problems in [12], showing that SABL achieves machine precision with about the same number of floating point operations used in the methods of that paper, which in fact do not even determine the optimizing values to even three significant figures in all cases. 6. Maximum Likelihood Estimation of Half-Lives and Periods This section illustrates optimization in SABL for the case of maximum likelihood using the U.S. data. As with the posterior distribution results are quite similar across countries. 6.1. Performance of the Optimization Algorithm Figure 4provides a global perspective on the behavior of the algorithm. The northwest panel provides the power r(of the likelihood function in each cycle of the SABL algorithm), and the south east panel displays the power increase ratio. In the terminology of the simulated annealing literature the temperature is the inverse of power, and the analogue of temperature for the northwest panel would simply flip the graph about a horizontal axis of rotation at 100. The temperature decay and power increase ratios are identical. In both cases it is straightforward to identify the cycles over which the geometric rate of increase is constant, roughly cycles 14 through 46. The power increase (temperature decay) ratio fluctuates about the theoretical value ρstated in (21) and shown by the dotted line in the southeast panel. The last cycle in which the ratio exceeds ρis `=44. Computation to this point required 44 seconds using the same hardware and software used for the posterior distribution in Section 4. The difference is due to the fact that Bayesian inference required only 5 cycles (Table 1). 10 20 30 40 50 60 70 10−20 10−10 100 1010 1020 US: Power (r) of likelihood function SABL cycle Power 10 20 30 40 50 60 70 10−20 10−10 100 1010 1020 US: Standard deviation (over particles) of log likelihood SABL cycle Standard deviation Standard deviation Machine epsilon 10 20 30 40 50 60 70 101 102 103 104 US: Number of distinct particles SABL cycle Number Distinct particles Particles 10 20 30 40 50 60 70 10−2 10−1 100 101 102Power increase ratio SABL cycle Ratio Ratio Asymptotic rho Figure 4. Convergence details for the SABL optimization algorithm. The cycles of constant power increase ratio end when the limitations of floating point arithmetic begin to disguise the true quadratic nature of the log-likelihood function in the neighborhood of the maximum. Up to this point the Metropolis random walk is effective in mixing particles in the M phase, which may be seen in the fact that at most 8 iteration are required to attain the RNE criterion of
Econometrics 2016,4, 10 19 of 23 0.4 that ends the M phase and the cycle, whereas from iteration 49 onward the convergence criterion is never met and the Mphase goes to the default limit of 100 iterations. After iteration 48 (roughly) RNE drops rapidly, the weight function in the Cphase is poor, and the number of distinct particles (southwest panel) deteriorates quickly. By iteration 60 there are only about 100 distinct particles. The northeast panel provides a complimentary perspective on the limitations imposed by machine arithmetic. So long as the power increase ratio is near ρ, the standard deviation of the log-likelihood objective function is very nearly inversely proportional to power. In all events differences between real numbers are multiples of what is known as “machine epsilon”, which for conventional 64-bit floating point representation is ε=2.22 ×10−16. This graininess becomes a factor beyond about iteration 48. Standard deviation of the objective function, across particles, decreases toward ε, shown by the dotted line in the northeast panel. Eventually the objective function behaves like a step function and except for extremely simply objective functions the steps appear random to the eye. Figure 5provides perspectives on the maximum likelihood estimates and asymptotic standard errors in each cycle of the SABL algorithm. The maximum likelihood estimates in the upper panel are constant (to the accuracy of the plot) beyond about cycle 20. The complications of machine arithmetic affect only the evaluated shape of the surface, not its location, and so these estimates remain unaffected. The deduction of asymptotic standard errors from the distribution of the particles, on the other hand, is closely tied to multivariate normal distribution of particles. It is constant over the same range that the power increase ratio is constant, and exhibits about the same amplitude of relative fluctuations. Beyond about cycle 54 it increases, due to the fact that the limitations of 64-bit arithmetic introduce variation in particles that is significant relative to the actual value, meaning that it continues to increase. The lower panel of Figure 5supports the convergence criterion of last cycle (`=46)in which the power decay ratio exceeds ρ. 0 10 20 30 40 50 60 70 80 90 100 −6 −4 −2 0 2 4 6 US: Parameter value at likelihood maximum SABL cycle Parameter value log Secular half−life log periodicity log Cyclical half−life log shock standard deviation 0 10 20 30 40 50 60 70 80 90 100 0 0.5 1 1.5 2 2.5 US: Asymptotic standard deviation of ML estimate SABL cycle Standar deviation log Secular half−life log Cyclical half−life log shock stan. dev. Figure 5. Implied maximum likelihood estimates and asymptotic standard errors by cycle. Figure 6supplements these perspectives by providing the distribution of the parameter θ4=log (p)in some cycles of interest. (Result for other parameters are qualitatively similar.) The solid line provides the kernel smoothed estimate of the distribution of particles, the dotted line
Econometrics 2016,4, 10 20 of 23 the Gaussian distribution corresponding to particle mean and variance. In all cases the deviation of values from the final maximum likelihood estimate are shown to make the horizontal axis ticks readily interpretable. Prior to the cycles of constant power increase ratio the shape of the distribution moves from the posterior distribution portrayed in Figure 1(cycle 5 is very close) to the quadratic expansion of the log-likelihood about the maximum likelihood estimate, scaled by power. Beyond that point the distribution becomes erratic as it is increasingly corrupted by the limitations of machine arithmetic. The Metropolis step, with its Gaussian proposal is increasingly ineffective; to appreciate this fully, recall that the Metropolis step is dealing with this behavior in five dimensions at once. −1 −0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 0 0.5 1 Cycle 5, power 1.1690e+00 Log periodicity centered at limit Density 0 0.5 1 1.5 2 0 2 4 6 Cycle 8, power 7.9414e+00 Log periodicity centered at limit Density −0.03 −0.02 −0.01 0 0.01 0.02 0.03 0.04 0.05 0 10 20 30 40 50 Cycle 14, power 3.9276e+02 Log periodicity centered at limit Density −1.5 −1 −0.5 0 0.5 1 1.5 x 10−4 0 5000 10000 Cycle 30, power 1.8531e+07 Log periodicity centered at limit Density −1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 x 10−6 0 0.5 1 1.5 2 2.5 x 106Cycle 46, power 8.6280e+11 Log periodicity centered at limit Density −2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 x 10−7 0 2 4 6 x 106Cycle 50, power 6.7037e+12 Log periodicity centered at limit Density −1.5 −1 −0.5 0 0.5 1 x 10−7 0 5 10 15 x 106Cycle 60, power 5.6144e+13 Log periodicity centered at limit Density −1.5 −1 −0.5 0 0.5 1 x 10−7 0 0.5 1 1.5 2 x 107Cycle 70, power 1.2763e+14 Log periodicity centered at limit Density Figure 6. Distribution of particles at selected cycles, SABL optimization algorithm. These results support the idea that iteration to maximum likelihood can halt when the power increase ratio begins to fall from the neighborhood of the value ρimplied by a quadratic objective function of the relevant dimension. At the last cycle in which this ratio exceeds ρ, the maximum likelihood estimate can be taken to be the particle providing the highest log-likelihood and the asymptotic variance can be taken to be particle variance multiplied by power r`. 6.2. Findings It is straightforward to compute maximum likelihood estimates and their asymptotic variance as just described. We compare these results with two other approaches. One is the posterior distribution presented in Section 4. The other begins with the closed-form maximum likelihood (least squares) estimate of (β,σ)in (1) and transforms the estimate to (β0, log (hs), log (hc), log (p), log (σ)) as described in that section. By the invariance property of maximum likelihood estimates, these should be the same as those obtained using the methods of Section 5. From the last procedure we also compute the distribution of (β0, log (hs), log (hc), log (p), log (σ)) obtained by mapping from the asymptotic distribution of the maximum likelihood estimator of β,σ2. This will not be the same as asymptotic distribution the direct maximum likelihood estimates. But it comes very close to the posterior distribution in [7] because the prior distribution in that work was p(β.σ)∝σ−1subject
Econometrics 2016,4, 10 21 of 23 to the constraints of stationarity and two complex roots of the lag operator generating polynomial. (Those constraints are satisfied in over 99% of the draws from the asymptotic normal distribution of (β,σ)here.) Thus, this comparison enables us to examining the influence of two quite different prior distributions for (β0, log (hs), log (hc), log (p), log (σ)). Table 5provides the first two moments of each parameter for the three cases. Those for the posterior distribution are the same as in Table 2. The maximum likelihood estimates of log (hc)and log (p)differ from the posterior means, by more than one standard error in the first case and by over two maximum likelihood standard errors in the second (using the metric of the direct ML standard error in each case). Except for log (p)the posterior standard deviation and the ML asymptotic standard errors are similar. For log (p)the direct ML asymptotic standard error is smaller than the posterior standard deviation by a factor of almost 4 and the indirect ML asymptotic standard error by a factor of over 2. This gross divergence for log (p)is consistent with the posterior density in the southwest panel of Figure 1, whose model is much more sharply defined than is the mode of a normal distribution. The conventional local expansion of the log-likelihood function is unrepresentative of its global behavior in the case of log (p). Table 5. US posterior moments and maximum likelihood estimates. Posterior Direct ML, θOLS Indirect ML Parameter mean st. dev. MLE st. dev. MLE st. dev. Secular log (hs)4.056 0.667 3.646 0.767 3.646 0.866 Cyclical log (hc)−0.584 0.548 −0.096 0.457 −0.096 0.406 Period log (p)2.045 0.565 1.621 0.148 1.621 0.231 Shock log (σ)−3.917 0.112 −3.984 0.109 −3.984 0.117 Figure 7provides another perspective on the comparison between the three approaches to inference, for the joint distribution of secular and cyclical half-life (left panels) and the joint distribution of period and cyclical half-life (right panels). To facilitate comparison the axes are identical in each column and were selected so as to exclude the 0.25% smallest and 0.25% largest points out of 820 selected from the 16,348 particles in the posterior distribution. The number of points plotted in the last two rows is almost 820 since the dispersions there are smaller. The horizontal and vertical lines are the same in each column, intersecting at the maximum likelihood estimate, which is indicated by the circle in the last two rows. In the top pair of panels the circle is the mean of the posterior distribution and the cross is the median. The smaller dispersion of the parameters under the asymptotic ML distributions, especially for log (p), is striking in these figures. So, too, are the differences in shape. The joint distribution under the direct ML asymptotic expansion is Gaussian by construction; as already documented and well-understood, the posterior distribution is not; but the indirect ML distribution is also non-Gaussian because the transformation from (β,σ)to θis nonlinear. The indirect ML asymptotic expansion is very close to the exact posterior distribution using the conventional improper prior distribution p(β.σ)∝σ−1, sometimes called the Jeffreys prior on (less precisely) “diffuse” or “uninformative.”uninformative prior. This is in fact not a Jeffreys prior for linear regression except when it reduces to mean estimation. Whereas the prior in βis flat, the implied prior for θis not due to the Jacobian implied by the nonlinear transformation in Equations (2) through (4). The fact that “diffuse ”or “uninformative”prior distribution can be vague, slippery or vacuous concepts is sometimes missed by Bayesian econometricians, like [7].
Econometrics 2016,4, 10 22 of 23 102 10−1 100 US Direct Bayes Secular half−life Cycflical half−life 101 10−1 100 US Direct Bayes Cyclical half−life Periodicity 102 10−1 100 US Direct ML Secular half−life Cyclical half−life 101 10−1 100 US Direct ML Cyclical half−life Periodicity 102 10−1 100 US Indirect ML Secular half−life Cyclical half−life 101 10−1 100 US Indirect ML Cyclical half−life Periodicity Figure 7. Comparison of posterior and two maximum likelihood asymptotic distributions. 7. Conclusions The utility of econometric models hinges in no small part on their direct connection to the concepts economists use to create these models and interpret the results of inference. In the example presented in this paper it was possible to replace almost all of the conventional parameters that are convenient for statistical models with such concepts. In many other cases this can be done to partial but significant degree: dynamic stochastic general equilibrium models as utilized in central banks constitute an important class of such examples in macroeconomics. Similar examples in microeconomics and the business sector are also common. If the econometrician is to interpret and communicate findings to the decision-making client, this is important. For the Bayesian econometrician attempting to elicit and incorporate client prior distributions it is even more compelling. As a practical matter it is equally important for econometricians to be able to bring models to data quickly, avoiding the need for case-by-case special treatments in deriving auxiliary analytical results and tuning computational algorithms. These steps require significant additional time and specialized skills that can place econometric approaches at an overwhelming disadvantage in competition with alternatives (like machine learning) that on their own may not serve the client as well. The SABL algorithm illustrated in this paper is a tool that addresses these objectives. For a new application, and even for a new model, it presents much lower barriers to entry than do most existing procedures in Bayesian and non-Bayesian econometrics. This is a strong claim, and this paper is a small illustration in support of that claim. Further such illustrations are forthcoming. Acknowledgments: The Australian Research Council provided financial support through grant DP130103356 and through the ARC Centre of Excellence for Mathematical and Statistical Frontiers of Big Data, Big Models, New Insights, grant CD140100049. Conflicts of Interest: The author declares no conflict of interest.
Econometrics 2016,4, 10 23 of 23 References 1. SABL 2015a Handbook, 2015. Available online: http://www.uts.edu.au/sites/default/files/article/ downloads/SABL_handbook_2015a.pdf (accessed on 20 February 2016). 2. Geweke, J.; Frischknecht, B. Exact Optimization by Means of Sequentially Adaptive Bayesian Learning. Available online: http://www.uts.edu.au/sites/default/files/article/downloads/WP3.pdf (accessed on 20 February 2016). 3. Durham, G.; Geweke, J. Adaptive sequential posterior simulators for massively parallel computing environments. In Bayesian Model Comparison (Advances in Econometrics, Volume 34); Jeliazkov, I., Poirier, D.J., Eds.; Emerald Group Publishing Limited: West Yorkshire, UK, 2014; Chapter 1; pp. 1–44. 4. Durham, G.; Geweke, J. Sequentially Adaptive Bayesian Learning Algorithms for Inference and Optimization. Available online: http://www.uts.edu.au/sites/default/files/article/downloads/WP5.pdf (accessed on 20 February 2016). 5. Douc, R.; Moulines, E. Limit theorems for weighted samples with applications to sequential Monte Carlo methods. Ann. Statist. 2008,36, 2344–2376. 6. Samuelson, P.A. Interactions between the multiplier analysis and the principle of acceleration. Rev. Econ. Stat. 1939,21, 75–78. 7. Geweke, J. The secular and cyclical behavior of real GDP in 19 OECD countries, 1957–1983. J. Bus. Econ. Stat. 1988,6, 479–486. 8. Chopin, N. Central limit theorem for sequential Monte Carlo methods and its application to Bayesian inference. Ann. Statist. 2004,32, 2385–2411. 9. OECD gross domestic product (GDP). Available online: https://stats.oecd.org/index.aspx?queryid=60702 (accessed on 20 February 2016). 10. Kirkpatrick, S.; Gelatt, C.D.; Vecchi, M.P. Optimization by simulated annealing. Science 1983,220, 671–680. 11. Goffe, W.L.; Ferrier, G.D.; Rogers, J. Global optimization of statistical functions with simulated annealing. J. Econom. 1994,60, 65–99. 12. Zhou, E.; Chen, X. Sequential Monte Carlo simulated annealing. J. Glob. Optim. 2013,55, 101–124. c 2016 by the author; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons by Attribution (CC-BY) license (http://creativecommons.org/licenses/by/4.0/).