正在学习

5.3 COMPUTATIONAL METHODS

5.3 COMPUTATIONAL METHODS

Obtaining a Bayesian point forecast is straightforward in cases, such as those examined above, where we have both conjugate priors and point forecasts that depend on a known function of the parameter distribution. In such cases it is also simple to calculate predictive distributions or density forecasts. Such distributions can be useful in many ways—we can compute averages of posterior distributions of the model parameters, compute the average loss to understand the properties of the forecast, and construct density forecasts or make probability statements on how likely it is that the outcome falls in a specified range.

More generally, however, numerical methods are required to make these calculations. Numerical methods can be employed to obtain estimates of posterior distributions for the parameters , predictive densities , as well as summary statistics of these distributions. For example, the posterior density of the model parameters can be used to compute the mean outcome and construct onestep-ahead forecasts under MSE loss. Alternatively, could be used to generate the predictive density, the mean of which can be used in multistep forecasting.

The standard problem in Bayesian estimation is to compute the posterior density of the parameters, . This is frequently very involved with different methods tailored to the particular model that needs to be evaluated. Since many texts are devoted to this subject, we give only a cursory overview of the methods to help the reader access the literature. Later chapters are clearer on the specific methods used for a range of forecasting problems.

The basic idea is to design a computational method for constructing draws from the posterior distribution π even though its exact density is unknown in cases where we are unable to describe it as a known distribution of the parameters of the prior and the data. Instead of directly working with the posterior, typically is examined without normalizing by the marginal distribution of z. Normalization of this density is easily achieved using numerical approximation. In any particular application, and are both known since the forecaster must decide on a likelihood for the observed data z and a prior over the parameters, θ.

The next step is to sample from the distribution , given the data. This involves sampling from the prior multiplied by the likelihood, both of which are fully known as z is observed and θ is a draw from the prior. This can then be normalized using the draws. To enhance efficiency, often steps are taken to narrow down the support of the posterior so that sampling is undertaken in the correct range. Unfortunately, this approach is not very efficient or easy to use when is large-dimensional and contains more than a few parameters. For this common case, numerical methods that draw from a distribution that converges to the posterior are employed, rather than drawing θ directly from the posterior. Monte Carlo

Markov Chain (MCMC) methods typically involve refinements such as the Gibbs sampler or the Metropolis algorithm for drawing from the underlying distributions.

The Gibbs sampler is useful for situations where we cannot find a closed form for but can split θ into subsets, say partitioned in such a way that there is a closed-form solution for and . For a given starting value for , say , we can set up an iterative procedure that allows us to draw a value for (denoted given . We then obtain a draw of (denoted for the given . Proceeding iteratively, we obtain a sequence of numerical draws for . After the effect of initial conditions wears off, in many situations it can be shown that these draws are draws from the desired joint density . Hence, after discarding a set of early draws, we can save the latter draws and use them to numerically characterize the posterior distribution for the parameters.

Example 5.3.1 (Least squares regression and the Gibbs sampler). Suppose is independently normally distributed conditional on and with mean and variance where and , both of which are unknown. Suppose we set the prior for the conditional mean independent of and the prior for the inverse of the variance, so v is a divided by a constant, and the mean of the prior for the variance becomes . The hyperparameters are then . For this problem there is no simple analytical or closed-form solution for , and numerical methods are required. It can be shown (Geweke, 2005, example 2.1.2) that

where and . Since it is straightforward to draw from the normal and distributions, we can easily compute a sequence of values from these conditional distributions.

Using draws of θ generated from , it is straightforward to either directly construct the forecast when this is a known function of , or alternatively construct draws of the forecast, . In the first case the forecast is a known function of features of the distribution and of the distribution for . For example, the linear regression case requires only the posterior means of θ given z which are easily computed. These can be used as the “coefficient estimates” in constructing the linear forecasting model.

The forecast density, , can be constructed from the draws of π and the known model, , drawing a value for the prediction for each of the draws of , while holding z constant. As noted in chapter 3, this approach can be used for any loss function, with different features of the estimated forecast distribution being relevant for different loss functions.

Suppose we are interested in the actual forecast rather than the predictive density, but there is no closed-form solution for the forecast as a function of this density. In this case we need to compute min . Conditional on this requires finding the rule that minimizes . Using the draws from , for any forecast rule, , we can compute the average loss.

This follows because for any such forecast rule and any draw for y, we can compute a value for with the average of these draws being the expected loss. Thus we can directly compute the expected loss associated with any forecasting rule. From among a set of such rules we can then choose the best rule as that with the lowest expected loss.

Zellner (1971) gives an early exposition of the Bayesian analysis of regression models including many of the models typically used in forecasting. More recent treatments and discussions of algorithms and numerical methods are provided in Koop (2003), Geweke (2005), and Karlsson (2013).

练习题

When is obtaining a Bayesian point forecast straightforward?

A. When the prior distribution is non-conjugate
B. When the parameter distribution is unknown
C. When we have conjugate priors and point forecasts that depend on a known function of the parameter distribution
D. When the likelihood function is not specified

What is the standard problem in Bayesian estimation?

A. Computing the likelihood function
B. Computing the prior distribution
C. Computing the posterior density of the parameters,
D. Computing the predictive density

What is the purpose of sampling from the distribution ?

A. To compute the prior distribution
B. To compute the likelihood function
C. To normalize the posterior density
D. To construct the predictive density directly

Which of the following are numerical methods used in Bayesian estimation? (Select all that apply)

A. Gibbs sampler
B. Maximum likelihood estimation
C. Metropolis algorithm
D. Method of moments

The Gibbs sampler is useful when we can find a closed form for .

Numerical methods are required to compute the posterior density in all Bayesian estimation problems.

The posterior density of the model parameters can be used to compute the ___ outcome and construct one-step-ahead forecasts under MSE loss.

The Gibbs sampler involves an iterative procedure that allows us to draw values for subsets of , say , given the values of the other subsets, such as drawing given and then drawing given . This process generates a sequence of numerical draws for that, after the effect of initial conditions wears off, are draws from the desired joint density . Hence, after discarding a set of early draws, we can save the latter draws and use them to numerically characterize the ___.

Explain why sampling from the distribution is not very efficient when is large-dimensional.

What is the role of the hyperparameters in the least squares regression and Gibbs sampler example?

When computing the posterior density for a Bayesian estimation problem, which of the following statements is correct?

A. The posterior density can always be described as a known distribution of the parameters of the prior and the data.
B. Numerical methods are only required when dealing with conjugate priors.
C. The standard problem involves computing the posterior density, which is frequently complex and requires tailored methods.
D. The posterior density is computed using only the likelihood function .

Which of the following are true about numerical methods in Bayesian estimation? (Select all that apply)

A. Numerical methods are used to obtain estimates of posterior distributions for the parameters .
B. Numerical methods are only used when the posterior density can be described as a known distribution.
C. Numerical methods can be employed to generate predictive densities .
D. Numerical methods are not necessary when using conjugate priors.

The Gibbs sampler is useful for situations where we can find a closed form for and do not need to split into subsets.

In Bayesian estimation, the basic idea is to design a computational method for constructing draws from the posterior distribution even though its exact density is unknown. Instead of directly working with the posterior, typically is examined without normalizing by the marginal distribution of . Normalization of this density is easily achieved using ___.

Explain how the Gibbs sampler can be used to numerically characterize the posterior distribution for the parameters in a Bayesian estimation problem.

登录后解锁笔记、知识点解析、AI 问答

立即登录