calc.concentration.prior: Calculate hyperparameters for Chinese restaurant process with...

Description Usage Arguments Value Examples

View source: R/TIMBR_source.R

Description

Uses optimization to find hyperparameters that approximately yield the specified prior probabilities. May not work well when J is large or target prior probabilities are extreme.

Usage

1
calc.concentration.prior(J, p.1.target, p.J.target, stop.on.error = F)

Arguments

J

number of customers (haplotypes) to be partitioned

p.1.target

prior probability of 1 partition

p.J.target

prior probability of J partitions

stop.on.error

stop function if error is encountered when using 'integrate'. errors related to roundoff and small values may occur during edge cases

Value

vector of c(shape, rate) hyperparamters for the gamma distribution

Examples

1
calc.concentration.prior(8, 0.05, 0.01)

wesleycrouse/TIMBR documentation built on Feb. 19, 2021, 7:31 a.m.