Combines and takes the average of TOP posterior samples from all partitions.

combine_TOP_samples(TOP_samples_files, thin = 1, n_samples = 1000)

Arguments

TOP_samples_files

Files of TOP posterior samples from all partitions.

thin

Thinning rate of extract the posterior samples, must be a positive integer (default = 1, no thinning performed).

n_samples

Keeps n posterior samples (randomly choose), when the number of posterior samples is greater than n.

Value

A data frame of combined and averaged posterior samples.

Examples

if (FALSE) {
# Randomly selects 1000 posterior samples from each partition.
# Then, combines and takes the average of the posterior samples from all partitions.
TOP_samples <- combine_TOP_samples(TOP_samples_files, n_samples = 1000)
}