# MCMC simulation to sample configurations

### Description

MCMC simulation to estimate prior and posterior quantities by sampling configurations.

### Usage

1 2 | ```
MCMC_simulation(n_sim, pattern, theta_init, overlap, cluster_coords,
p_moves_orig, J, lkhd_z, lambda)
``` |

### Arguments

`n_sim` |
number of MCMC iterations |

`pattern` |
alternating pattern between unif and prop prior on single zones |

`theta_init` |
initial configuration |

`overlap` |
output of |

`cluster_coords` |
output of |

`p_moves_orig` |
probability of sampling each of the 5 possible moves to explore sample space |

`J` |
maximum number of clusters/anti-clusters to consider |

`lkhd_z` |
values associated with each single zone to use in Metropolis-Hastings ratio |

`lambda` |
lambda from definition of prior on single zones |

### Value

`sample` |
sampled configurations |

`move_trace` |
trace of moves (1 = growth, 2 = trim, 3 = recenter, 4 = death, 5 = birth) |

`accpt_trace` |
trace of acceptance (0 = not accepted) |

`ratio_trace` |
trace of Metropolis-Hastings ratio |

### Author(s)

Albert Y. Kim

### References

Wakefield J. and Kim A.Y. (2013) A Bayesian model for cluster detection. *Biostatistics*, **14**, 752–765.

### See Also

`create_geo_objects`

, `process_MCMC_sample`