lcmCR_PostSampl | R Documentation |

Convenience function for generate samples from the posterior distribution of the population size using an initialized `lcm_CR_Basic`

object.

```
lcmCR_PostSampl(object, burnin = 10000, samples = 1000, thinning = 10,
clear_buffer = FALSE, output = TRUE)
```

`object` |
an initialized |

`burnin` |
number of burn in iterations. |

`samples` |
Nnmber of samples to be generated. Note that this is not the same as the number of iterations for the sampler. Samples are saved one every |

`thinning` |
subsampling interval. Samples are saved one every |

`clear_buffer` |
logical. Clear the tracing buffer before sampling? |

`output` |
logical. Print messages? |

A vector with the `samples`

posterior samples of the population size parameter.

Invoking this function deletes the content of the object's tracing buffer.

To create and initialize the lcm_CR_Basic object use `lcmCR`

or `lcm_CR_Basic_generator`

. The user is responsible to check whether the chain has reached the stationary distribution or not.

Daniel Manrique-Vallier

```
data(kosovo_aggregate)
sampler <- lcmCR(captures = kosovo_aggregate, tabular = FALSE, in_list_label = '1',
not_in_list_label = '0', K = 10, a_alpha = 0.25, b_alpha = 0.25, seed = 'auto')
N <- lcmCR_PostSampl(sampler, burnin = 10000, samples = 1000, thinning = 100, output = FALSE)
quantile(N, c(0.025, 0.5, 0.975))
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.