combine_TOP_samples: Combines and takes the average of TOP posterior samples from...

View source: R/postfit_coef_samples.R

combine_TOP_samplesR Documentation

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

Description

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

Usage

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

## Not run: 
# 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)

## End(Not run)

HarteminkLab/TOP documentation built on July 27, 2023, 6:14 p.m.