multiple_metropolis: Generate independent data from a set of binary chains.

Description Usage Arguments Details

Description

multiple_metropolis takes a set of binary chains of data in the form of an integer matrix and returns a three dimensional integer vector with with the first entry of the first dimension filled with the original set of binary chains and the rest filled with independent chains generated by multiple_metropolis.

Usage

1
multiple_metropolis(bin_chains, m, b)

Arguments

bin_chains

An integer matrix whose rows represent separate binary chains of data.

m

An integer value representing the number of swaps to be attempted.

b

An integer value representing the number of new sets of data to be generated.

Details

multiple_metropolis works by taking a supplied set of binary chains bin_chains and attempting a number m swaps on entries of those chains, only swapping if doing so maintains the number of transitions between states that existed in the initial set of chains bin_chains. After it does this, it repeats the process on the newly generated set of binary chains of data b times, each time saving the new set of chains in a three dimensional vector of data. The first entry of the first dimension of this vector is used to store the original set of binary chains bin_chains.


cwcartmell/maRkov documentation built on May 14, 2019, 1:37 p.m.