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 iterations.
thinning
subsampling interval. Samples are saved one every thinning iterations.
clear_buffer
logical. Clear the tracing buffer before sampling?
output
logical. Print messages?
Value
A vector with the samples posterior samples of the population size parameter.
Warning
Invoking this function deletes the content of the object's tracing buffer.
Note
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.
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(LCMCR)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/LCMCR/lcmCR_PostSampl.Rd_%03d_medium.png", width=480, height=480)
> ### Name: lcmCR_PostSampl
> ### Title: Generate Samples from the Posterior Distribution of Population
> ### Size under a LCMCR Model
> ### Aliases: lcmCR_PostSampl
>
> ### ** Examples
>
> 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')
WARMING UP...
> N <- lcmCR_PostSampl(sampler, burnin = 10000, samples = 1000, thinning = 100)
> quantile(N, c(0.025, 0.5, 0.975))
2.5% 50% 97.5%
8548.825 10270.000 13433.475
>
>
>
>
>
> dev.off()
null device
1
>