# Sampling data using Gibbs sampling for use in the examples

### Description

Sampling from pairwise binary Markov model using Gibbs sampling. This function is not efficient and only intended to be used in the examples.

### Usage

1 | ```
BMNSamples(Theta, numSamples, burnIn, skip)
``` |

### Arguments

`Theta` |
Parameter matrix for the model from which the data is being generated. |

`numSamples` |
Number of samples to return. |

`burnIn` |
Number of samples to discard as burn in. |

`skip` |
Number of samples to discard in-between returned samples. |

### Details

`BMNSamples`

generates `numSamples`

by using Gibbs sampling. When using Gibbs sampling, it is necessary to discard the initial samples, which is controlled by the parameter `burnIn`

. In order for the drawn samples to be independent, samples in-between also have to be discarded, which is controlled by `skip`

.

### Value

Returns a matrix of 0 and 1 of size `numSamples`

times `p`

where `p`

is the number of rows of `Theta`

.

### Author(s)

Holger Hoefling

### See Also

`BMNPseudo`

, `BMNExact`