cull_posterior_samples: Cull early posterior samples from a hdpSampleChain object

Description Usage Arguments Value See Also Examples

View source: R/cull_posterior_samples.R

Description

Extend the 'burn-in' period and reduce the number of posterior samples taken from a sampling chain by culling the first ncull posterior samples. If components have been previously calculated for this sampling chain, they will be removed and must be recalculated.

Usage

1
cull_posterior_samples(chain, ncull)

Arguments

chain

A hdpSampleChain object

ncull

The number of posterior samples to cull

Value

A hdpSampleChain object with the designated 'burn-in' period extended, and the number of posterior samples reduced by ncull

See Also

plot_lik, plot_numcluster, plot_data_assigned

Examples

1
2
3
4
5
6
mut_example_chain <- chains(mut_example_multi)[[2]]
plot_lik(mut_example_chain)
plot_numcluster(mut_example_chain)
chain_adj <- cull_posterior_samples(mut_example_chain, 20)
plot_lik(chain_adj)
plot_numcluster(chain_adj)

nicolaroberts/hdp documentation built on May 23, 2019, 5:09 p.m.