lcmCR {LCMCR}R Documentation

Bayesian Nonparametric Latent Class Capture-Recapture

Description

Create and initialize an object of class lcm_CR_Basic.

Usage

lcmCR(captures, tabular = FALSE, in_list_label = "1", not_in_list_label = "0", 
  K = 5, a_alpha = 0.25, b_alpha = 0.25, buffer_size = 10000, thinning = 10, 
  seed = "auto", verbose = TRUE)

Arguments

captures

input dataset. A data frame with the multiple-recapture data. See 'Details' for input formats.

tabular

a logical value indicating whether or not the data is tabulated. See 'Details'.

in_list_label

factor label that indicates that individual is in list (e.g. 'Yes')

not_in_list_label

factor label that indicates that individual is in not list (e.g. 'No')

K

maximum number of latent classes. Indicates the truncation level of the stick-breaking process.

a_alpha

shape parameter of the prior distribution of concentration parameter of the stick-breaking process.

b_alpha

inverse scale parameter of the prior distribution of concentration parameter of the stick-breaking process.

buffer_size

size of the tracing buffer.

thinning

thinning interval for the tracing buffer

seed

integer seed of the internal RNG.

verbose

Generate progress messages?

Details

Input data must be provided as a data frame. The first J columns are two-level factors representing the multiple-recapture lists. Arguments in_list_label and not_in_list_label indicate the labels that represent inclusion and exclusion from the lists. This function supports two input formats:

Value

An object of class lcm_CR_Basic initialized and ready to use.

Author(s)

Daniel Manrique-Vallier

See Also

lcm_CR_Basic, lcm_CR_Basic_generator

Examples

require('LCMCR')
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', buffer_size = 10000, thinning = 100)
sampler
N <- lcmCR_PostSampl(sampler, burnin = 10000, samples = 1000, thinning = 100, output = FALSE)
quantile(N, c(0.025, 0.5, 0.975))

[Package LCMCR version 0.4.14 Index]