# Statistical Computation

## Abstract

Capture–recapture has made considerable advances because of progress in the development of extensive computer packages (a list is given in the Appendix). In the past, the emphasis has been on obtaining explicit maximum likelihood estimates and using mathematically derived formulae for asymptotic variances and covariances to obtain standard errors. However, iterative methods are now available for solving maximum likelihood equations and obtaining asymptotic sample variance and covariance estimates. In addition, we have powerful simulation methods which are particularly useful for Bayesian models. In this chapter, written by Matthew Schofield, we give some theory for the numerical process involved as well as simple numerical examples. We start with numerical optimization using the Newton and quasi-Newton algorithms, and then the Hessian matrix for standard errors, with brief reference to multimaxima problems. In using latent (hidden) variable models, the EM (Expectation–maximization) algorithm can be used along with extensions called the SEM (Structural Equation Modeling) and GEM (generalized EM) algorithms. These methods can be applied to hidden Markov models using forward and backward algorithms. Bayesian models require knowledge of the posterior distributions of the parameters and this can be done numerically using Markov chain Monte Carlo (MCMC) to obtain samples from the posterior distributions. Theoretical properties of finite-space Markov chains are discussed along with the Monte Carlo method. The MCMC approach is applied using the Metropolis–Hastings algorithm along with a special case of the Gibbs sampler and making use of the Hammersley–Clifford theorem. Auxiliary latent variables can be used with so-called slice sampling and Hamiltonian Monte Carlo. Since some posterior distributions have variables that can have variable dimensions, methods for transdimensional sampling are described such as the so-called reversible jump MCMC and a universal variable approach.