Bayesian Statistics Group 8th March Slice samplers. (A very brief introduction) The basic idea

Similar documents
MCMC Diagnostics. Yingbo Li MATH Clemson University. Yingbo Li (Clemson) MCMC Diagnostics MATH / 24

MCMC Methods for data modeling

Clustering Relational Data using the Infinite Relational Model

Chapter 1. Introduction

Markov Chain Monte Carlo (part 1)

Overview. Monte Carlo Methods. Statistics & Bayesian Inference Lecture 3. Situation At End Of Last Week

Nested Sampling: Introduction and Implementation

Optimization Methods III. The MCMC. Exercises.

Linear Modeling with Bayesian Statistics

Markov chain Monte Carlo methods

Slice sampler algorithm for generalized Pareto distribution

Bayesian Estimation for Skew Normal Distributions Using Data Augmentation

A Short History of Markov Chain Monte Carlo

Monte Carlo for Spatial Models

Bayesian Spatiotemporal Modeling with Hierarchical Spatial Priors for fmri

STAT 725 Notes Monte Carlo Integration

Bayesian Modelling with JAGS and R

Image analysis. Computer Vision and Classification Image Segmentation. 7 Image analysis

INTRO TO THE METROPOLIS ALGORITHM

An Introduction to Markov Chain Monte Carlo

Approximate Bayesian Computation. Alireza Shafaei - April 2016

Convexization in Markov Chain Monte Carlo

Monte Carlo Techniques for Bayesian Statistical Inference A comparative review

AMCMC: An R interface for adaptive MCMC

Parallel Multivariate Slice Sampling

Analysis of Incomplete Multivariate Data

Markov Chain Monte Carlo on the GPU Final Project, High Performance Computing

Simulating from the Polya posterior by Glen Meeden, March 06

Bayesian data analysis using R

Quantitative Biology II!

Monte Carlo sampling

MRF-based Algorithms for Segmentation of SAR Images

Level-set MCMC Curve Sampling and Geometric Conditional Simulation

Stochastic Simulation: Algorithms and Analysis

1 Methods for Posterior Simulation

Approximate Bayesian Computation methods and their applications for hierarchical statistical models. University College London, 2015

Short-Cut MCMC: An Alternative to Adaptation

10.4 Linear interpolation method Newton s method

Monte Carlo Methods and Statistical Computing: My Personal E

Stochastic Function Norm Regularization of DNNs

Package HKprocess. R topics documented: September 6, Type Package. Title Hurst-Kolmogorov process. Version

Package gibbs.met documentation

MCMC GGUM v1.2 User s Guide

CS281 Section 9: Graph Models and Practical MCMC

Exam Issued: May 29, 2017, 13:00 Hand in: May 29, 2017, 16:00

A noninformative Bayesian approach to small area estimation

SNAP Haskell. Abraham Starosta March 18, 2016 Code: Abstract

An Efficient Model Selection for Gaussian Mixture Model in a Bayesian Framework

An Analysis of a Variation of Hit-and-Run for Uniform Sampling from General Regions

Package batchmeans. R topics documented: July 4, Version Date

The Pennsylvania State University The Graduate School PARALLEL MULTIVARIATE SLICE SAMPLING. A Thesis in Statistics by Matthew M.

Approximate (Monte Carlo) Inference in Bayes Nets. Monte Carlo (continued)

From Bayesian Analysis of Item Response Theory Models Using SAS. Full book available for purchase here.

Debugging MCMC Code. Charles J. Geyer. April 15, 2017

Dynamic Thresholding for Image Analysis

Modified Metropolis-Hastings algorithm with delayed rejection

Multiple Imputation for Multilevel Models with Missing Data Using Stat-JR

Bayesian Computation: Overview and Methods for Low-Dimensional Models

Statistical Matching using Fractional Imputation

Markov Random Fields and Gibbs Sampling for Image Denoising

Package binomlogit. February 19, 2015

Probabilistic Graphical Models

Case Study IV: Bayesian clustering of Alzheimer patients

A guided walk Metropolis algorithm

Using the package glmbfp: a binary regression example.

Issues in MCMC use for Bayesian model fitting. Practical Considerations for WinBUGS Users

Image Restoration using Markov Random Fields

A stochastic approach of Residual Move Out Analysis in seismic data processing

Network-based auto-probit modeling for protein function prediction

The Multi Stage Gibbs Sampling: Data Augmentation Dutch Example

Automatic Markov chain Monte Carlo Procedures for Sampling from Multivariate Distributions

STAT 203 SOFTWARE TUTORIAL

A Bayesian approach to artificial neural network model selection

Graphical Models, Bayesian Method, Sampling, and Variational Inference

A GENERAL GIBBS SAMPLING ALGORITHM FOR ANALYZING LINEAR MODELS USING THE SAS SYSTEM

Reservoir Modeling Combining Geostatistics with Markov Chain Monte Carlo Inversion

Package atmcmc. February 19, 2015

Introduction to Bayesian Analysis in Stata

Missing Data Analysis for the Employee Dataset

AN ADAPTIVE POPULATION IMPORTANCE SAMPLER. Luca Martino*, Victor Elvira\ David Luengcfi, Jukka Corander*

Dolphins Who s Who: A Statistical Perspective

Edinburgh Research Explorer

MSA101/MVE Lecture 5

A Nonparametric Bayesian Approach to Detecting Spatial Activation Patterns in fmri Data

Convergence and Efficiency of Adaptive MCMC. Jinyoung Yang

Discussion on Bayesian Model Selection and Parameter Estimation in Extragalactic Astronomy by Martin Weinberg

winbugs and openbugs

Laboratorio di Problemi Inversi Esercitazione 4: metodi Bayesiani e importance sampling

PolyEDA: Combining Estimation of Distribution Algorithms and Linear Inequality Constraints

Bayesian Inference for Exponential Random Graph Models

An Adaptive Markov Chain Monte Carlo Method for Bayesian Finite Element Model Updating

EXTRA-CREDIT PROBLEMS ON SURFACES, MULTIVARIABLE FUNCTIONS AND PARTIAL DERIVATIVES

Warm-up as you walk in

BAYESIAN OUTPUT ANALYSIS PROGRAM (BOA) VERSION 1.0 USER S MANUAL

CHAPTER 1 INTRODUCTION

Modeling Criminal Careers as Departures From a Unimodal Population Age-Crime Curve: The Case of Marijuana Use

Package gibbs.met. February 19, 2015

GRAPHAM: GRAPHICAL MODELS WITH ADAPTIVE RANDOM WALK METROPOLIS ALGORITHMS

ADAPTIVE METROPOLIS-HASTINGS SAMPLING, OR MONTE CARLO KERNEL ESTIMATION

Bayesian Robust Inference of Differential Gene Expression The bridge package

Transcription:

Bayesian Statistics Group 8th March 2000 Slice samplers (A very brief introduction) The basic idea lacements To sample from a distribution, simply sample uniformly from the region under the density function and consider only the horizontal coordinates. f(x) One way to do this is to x introduce latent (auxiliary) variables, then use Gibbs sampling on the area beneath the density. x 1

The simple slice sampler Suppose we wish to sample from f(x) where x X R. To do this we sample uniformly from the 2-dimensional region under f(x) or g(x) = cf(x). This is implemented as follows: introduce a latent variable y with y x U(0, g(x)); this defines a uniform distribution for x and y over the region {(x, y) : 0 y g(x)} with density f(x, y) = f(y x)f(x) 1 = g(x) f(x) if 0 y g(x), 0 otherwise = 1 c if 0 y g(x), 0 otherwise; 2

the conditional distribution for x y has density that is, f(x y) f(x, y) 1 c if 0 y g(x), 0 otherwise, x y U ( S(y) ), where S(y) = {x : g(x) y}. Here S(y) is the union of intervals that constitute the slice through the density defined by y. 3

To obtain a sample for x, we first sample (x i, y i ) from f(x, y), then ignore the y i s. The structure of this model leads us (naturally) to simulation using Gibbs sampling. The ith iteration of the algorithm is: simulate y i f(y x i 1 ) = U ( 0, g(x i 1 ) ), simulate x i f(x y i ) = U ( S(y i ) ), where S(y) = {x : g(x) y}. A key aspect to slice sampling is that only uniform random variates need be simulated. N.B. Determining the slice S(y) may be tricky! 4

A simple example Standard normal slice sampler Suppose x N (0, 1), so f(x) g(x) = exp( x 2 /2), then the slice through the density is S(y) = { x : 2 log(y) x 2 log(y) }. Therefore, the conditional distribution of the latent variable y is ( ) y x U 0, e x2 /2, and the distribution of x conditional on y is ( ) x y U 2 log(y), 2 log(y). Simulation from these conditional distributions is trivial. 5

The figure below shows the first 5 iterations of the slice sampler for the standard normal example. PSfrag replacements Slice sampler in action y 0.0 0.2 0.4 0.6 0.8 1.0 g(x) (x 5, y 5 ) (x 1, y 1 ) (x 3, y 3 ) (x 2, y 2 ) (x 4, y 4 ) 3 2 1 0 1 2 3 x The slice sampler carries out a Gibbs sampler on the area beneath the curve of the density g(x). 6

4 2 0 2 4 3 2 1 0 1 2 3 0.0 0.1 0.2 0.3 0.4 0 1000 2000 3000 4000 0 20 40 60 80 100 lacements 0.03 0.01 0.01 0.03 3 2 1 0 1 2 3 0.0 0.2 0.4 0.6 0.8 1.0 y Plot of (xi, yi) x Histogram of sampled values x Density xi acf Trace plot i Autocorrelations lag 7

Generalisations More complex distributions Determining the slice S(y) can be difficult when f(x) has a complex structure. Possible solution: sampler. use the product slice Suppose positive functions f i such that f(x) = c k i=1 f i (x). Then augment the model with latent variables y = (y 1, y 2,..., y k ) where y i x U(0, f i (x)), independent so that (again) we have a uniform distribution under the functions f i : f(x, y) = c k i=1 I(y i f i (x)). 8

The conditional distribution for x y has density f(x y) f(x, y) 1 if 0 y i f i (x), 0 otherwise, i = 1, 2,..., k, that is, where x y U ( S(y) ), and S(y) = k i=1 S i (y i ) S i (y i ) = {x : f i (x) y i }. Here S(y) is the intersection of the slices S i (y i ) through the each of the functions f i defined by the y i. 9

Implementation The jth iteration of the algorithm is: simulate (independently) y (j) i U ( 0, f i (x (j 1) ) ), i = 1, 2,..., k simulate x (j) U ( S ( y (j))), where S ( y (j)) = k i=1 { x : f i (x) y (j) i }. Multivariate case: x X R p. Sample uniformly from the p + 1-dimensional region under g(x) using either the simple slice sampler or the product slice sampler (x x). 10

An application in Bayesian statistics Random sample x = (x 1, x 2,..., x n ) from f(x θ), prior density π(θ). From Bayes theorem, the posterior density is cf. π(θ x) π(θ) n i=1 f(x i θ) f(x) k i=1 f i (x) Conjugate updates simple slice sampler. Non-conjugate updates product slice sampler. 11

Another simple example Suppose X i θ Exp(θ) and we take a random sample of size n = 2, i.e. x = (x 1, x 2 ). Our prior for θ is π(θ) = const. (i.e. an improper prior). From Bayes theorem, the posterior density for θ is π(θ x) θe θx 1 θe θx 2 f 1 (θ) f 2 (θ) We can simulate from this posterior density using a product slice sampler with 2 latent variables y = (y 1, y 2 ). The jth iteration of the algorithm is: simulate y (j) 1 U ( 0, f 1 (θ (j 1) ) ) simulate y (j) 2 U ( 0, f 2 (θ (j 1) ) ) simulate θ (j) U ( S(y (j) ) ), where S(y (j) ) = { θ : f 1 (θ) y (j) 1, f 2(θ) y (j) } 2. 12

lacements y f 1 (θ) y (j) 1 y (j) 2 f 2 (θ) 0 S(y (j) ) θ (j 1) S 2 (y (j) 2 S 1 (y (j) ) 1 ) θ 13

Why use the slice sampler? Almost automatic method to simulate from new densities just simulate uniforms. Applies to most distributions. Easier to implement than a Gibbs sampler no need to devise methods to simulate from non-standard distributions. Can be more efficient than Metropolis- Hastings algorithms these also need the specification of a proposal. Determination of S( ) can be tricky. Some models require lots of latent variables. 14

For more details, see, for example, Damien, Wakefield and Walker (1999) Gibbs sampling for non-conjugate and hierarchical models by using auxiliary variables. JRSSB. Neal (1997) Markov chain Monte Carlo methods based on slicing the density function. Technical report (U. Toronto). Robert and Casella (1999) Monte Carlo Statistical Methods. Springer. Roberts and Rosenthal (1999) Convergence of slice sampler Markov chains. JRSSB. 15