Page 442 - Numerical Methods for Chemical Engineering
P. 442
MATLAB summary 431
then
ln[B αβ (y)] ≈ BIC (y) − BIC β (y) (8.237)
α
This approximate result tells us that we should choose the model with the largest value
of BIC. The second term in the square brackets in (8.236) adds to the weighted sum of
squared errors an additional penalty per parameter, encouraging the use of models with
smaller numbers of adjustable parameters. Clearly, this is only an approximation of the
Bayes factor, and should be applied only when N is large. For more exact analysis, the
Bayes factor should be computed by MCMC evaluation of the integrals (8.219).
Further reading
This chapter has merely introduced the subject of Bayesian statistics, a field that is far
broader than the subject of estimating parameters from data with normally-distributed errors
discussed here. For further reading, comprehensive graduate-level overviews of Bayesian
statistics are provided by Robert (2001) and Leonard & Hsu (2001). A text suitable for
undergraduates is Bolstad (2004). Among specialized texts, Box & Tiao (1973) treats in
further depth the problem of parameter estimation; however, it does not discuss advanced
MCMC techniques. For more on Bayesian Monte Carlo methods, consult Chen et al. (2000).
For a more philosophical, conceptual treatment of Bayesian statistics see Bernardo & Smith
(2000).
MATLAB summary
In this chapter we have addressed the Bayesian approach to estimating parameters from data
that are assumed to have normally-distributed errors. The MATLAB statistics toolkit offers
several functions for parameter estimation, whose results agree with both the Bayesian
approach taken here and the traditional frequentist formalism. regress fits a linear model to
single-response data and returns confidence intervals on the model parameters and predicted
responses. nlinfit fits the parameters of a nonlinear model to single-response data, with
confidence intervals on the parameters and predictions returned by nlparci and nlpredci
respectively. These routines use a quadratic expansion of the sum of squared errors and
thus, in general, give confidence intervals that are too wide. When the MATLAB statistics
toolkit is unavailable, linear models may be treated explicitly quite easily, and for nonlinear
models the MCMC routines presented here may be used (and give more accurate results
without using quadratic expansions of S(θ)).
For single-response data, Bayes MCMC pred SR.m computes the expectation of a
vector g(θ,σ). This routine is used in turn by Bayes MCMC 1Dmarginal SR.m and
Bayes MCMC 2Dmarginal SR.m to compute 1-D and 2-D marginal densities. The outputs
of these routines are used to compute 1-D and 2-D HPD regions by Bayes 1D HPD SR.m
and Bayes 2D HPD SR.m respectively.