Learn R Programming

mcsm (version 1.0)

mochoice: An MCMC model choice illustration for the linear model

Description

Using a Gibbs sampling strategy of changing one indicator at a time, this function explores the space of models and returns the most likely models among those visited. The data used in this example is swiss, with four explanatory variables.

Usage

mochoice(Niter = 10^4)

Arguments

Niter
Number of MCMC iterations

Value

model
Sequence of model indicators visited by the MCMC algorithm
top
Five most likely models

References

From Chapter 6 of EnteR Monte Carlo Statistical Methods

Examples

Run this code
mochoice(10^3)

Run the code above in your browser using DataLab