O objetivo deste texto é fornecer uma introdução nas técnicas
computacionais Monte Carlo. Temos o propósito de tornar o público em
geral familiarizado com os aspectos de programação Monte Carlo através
da implementação prática.
Fundamentos teóricos são intencionalmente evitados neste texto. De fato,
a ênfase na prática é uma característica importante, pois seu público
principal consiste em estudantes de pós-graduação em estatística,
bioestatística, engenharia, etc., que precisam aprender a usar métodos
de simulação como uma ferramenta para analisar seus experimentos e/ou ou
conjuntos de dados.
Temos por objetivo atrair cientistas de todas as áreas, dada a
versatilidade das ferramentas Monte Carlo. Também pode ser usado para um
público mais clássico de estatística quando visa ensinar uma entrada
rápida em métodos computacionais modernos baseados em R, no final de um
curso de graduação, por exemplo, mesmo que isso possa ser um desafio
para alguns alunos.
A escolha da linguagem de programação R, deve-se à sua simplicidade
pedagógica e à sua versatilidade. Os leitores podem facilmente realizar
experimentos em sua própria linguagem de programação, traduzindo os
exemplos fornecidos. Enfatizamos que, em nível de produção, ou seja, ao
usar técnicas avançadas de Monte Carlo ou analisar grandes conjuntos de
dados, R não pode ser recomendado como linguagem padrão, mas o
conhecimento adquirido aqui deve facilitar a mudança para outra
linguagem.
Como suporte computacional utilizamos a linguagem de programação e
ambiente de desenvolvimento integrado para cálculos estatísticos e
gráficos R, versão 4.2.2, “Innocent and Trusting” Copyright (C) The R
Foundation for Statistical Computing, 64-bit de 31 de outubro de 2022.
8.2.1 Convergência para a distribuição estacionária
8.2.2 Convergência de médias
8.2.3 Aproximando a amostragem iid
8.2.4 O pacote coda
8.3 Monitorando a convergência para estacionaridade
8.3.1 Diagnósticos gráficos
8.3.2 Testes não paramétricos de estacionariedade
8.3.3 Análise espectral
8.4 Acompanhamento da convergência das médias
8.4.1 Gráficos diagnósticos
8.4.2 Dentro e entre variâncias
8.4.3 Tamanho efetivo da amostra
8.4.4 Significado de lote de largura fixa
8.5 MCMC Adaptativo
8.5.1 Cuidados com a adaptação
8.5.2 O pacote amcmc
8.6 Exercícios
Referências
Albert, J. (2009). Bayesian Computation with R, second edition.
Springer–Verlag, New York.
Beaumont, M., Zhang, W., and Balding, D. (2002). Approximate Bayesian
computation in population genetics. Genetics, 162:2025–2035.
Berger, J., Philippe, A., and Robert, C. (1998). Estimation of quadratic
functions: reference priors for non-centrality parameters. Statistica
Sinica, 8(2):359–375.
Besag, J. and Clifford, P. (1989). Generalized Monte Carlo significance
tests. Biometrika, 76:633–642.
Booth, J. and Hobert, J. (1999). Maximizing generalized linear mixed
model likelihoods with an automated Monte Carlo EM algorithm. Journal of
the Royal Statistical Society Series B, 61:265–285.
Boyles, R. (1983). On the convergence of the EM algorithm. Journal of
the Royal Statistical Society Series B, 45:47–50.
Brooks, S. and Roberts, G. (1998). Assessing convergence of Markov chain
Monte Carlo algorithms. Statistics and Computing, 8:319–335.
Cappé, O., Douc, R., Guillin, A., Marin, J.-M., and Robert, C. (2008).
Adaptive importance sampling in general mixture classes. Statistics and
Computing, 18:447–459.
Casella, G. (1996). Statistical theory and Monte Carlo algorithms (with
discussion). TEST, 5:249–344.
Casella, G. and Berger, R. (2001). Statistical Inference, second
edition. Wadsworth, Belmont, CA.
Casella, G. and George, E. (1992). An introduction to Gibbs sampling.
The American Statistician, 46:167–174.
Casella, G. and Robert, C. (1996). Rao-Blackwellisation of sampling
schemes. Biometrika, 83(1):81–94.
Casella, G. and Robert, C. (1998). Post-processing accept–reject
samples: recycling and rescaling. J. Comput. Graph. Statist.,
7(2):139–157.
Chen, M., Shao, Q., and Ibrahim, J. (2000). Monte Carlo Methods in
Bayesian Computation. Springer–Verlag, New York.
Chib, S. (1995). Marginal likelihood from the Gibbs output. Journal of
the American Statistical Association, 90:1313–1321.
Cowles, M. and Carlin, B. (1996). Markov chain Monte Carlo convergence
diagnostics: a comparative study. Journal of the American Statistical
Association, 91:883–904.
Crawley, M. (2007). The R Book. John Wiley, New York.
Dalgaard, P. (2002). Introductory Statistics with R. Springer–Verlag,
New York.
Del Moral, P. and Miclo, L. (1999). On the convergence and applications
of generalized simulated annealing. SIAM Journal on Control and
Optimization, 37(4):1222–1250.
Dempster, A., Laird, N., and Rubin, D. (1977). Maximum likelihood from
incomplete data via the EM algorithm (with discussion). Journal of the
Royal Statistical Society Series B, 39:1–38.
Dickey, J. (1968). Three multidimensional integral identities with
Bayesian applications. Annals Mathematical Statistics, 39:1615–1627.
Douce t, A., Godsill, S., and Robert, C. (2002). Marginal maximum a
posteriori estimation using Markov chain Monte Carlo. Statistics and
Computing, 12:77–84.
Efron, B. and Morris, C. (1975). Data analysis using Stein’s estimator
and its generalizations. Journal of the American Statistical
Association, 70:311–319.
Efron, B. and Tibshirani, R. (1993). An Introduction to the Bootstrap.
Chapman and Hall, New York.
Evans, M. and Swartz, T. (2000). Approximating Integrals via Monte Carlo
and Deterministic Methods. Oxford University Press, Oxford.
Feller, W. (1971). An Introduction to Probability Theory and its
Applications, volume 2. John Wiley, New York.
Flegal, J., Haran, M., and Jones, G. (2008). Markov chain Monte Carlo:
can we trust the third significant figure? Statistical Science,
23(2):250–260.
Gaetan, C. and Yao, J.-F. (2003). A multiple-imputation Metropolis
version of the EM algorithm. Biometrika, 90:643–654.
Gaver, D. and O’Muircheartaigh, I. (1987). Robust empirical Bayes
analysis of event rates. Technometrics, 29:1–15.
Gelfand, A. and Dey, D. (1994). Bayesian model choice: asymptotics and
exact calculations. Journal of the Royal Statistical Society Series B,
56:501–514.
Gelfand, A. and Smith, A. (1990). Sampling based approaches to
calculating marginal densities. Journal of the American Statistical
Association, 85:398–409.
Gelman, A. and Hill, J. (2006). Data Analysis Using Regression and
Multi-level/Hierarchical Models. Cambridge University Press, Cambridge.
Gelman, A. and Rubin, D. (1992). Inference from iterative simulation
using multiple sequences (with discussion). Statistical Science,
7:457–511.