posterior_coal_check: Posterior predictive check for coalescent model

Description Usage Arguments Value

View source: R/model_check.R

Description

Posterior predictive check for coalescent model

Usage

1
2
posterior_coal_check(coal_times, samp_times, n_sampled, logpop, grid,
  cap = NULL)

Arguments

coal_times

numeric vector (for fixed-tree) or numeric vector (for inferred-tree) of coalescent times.

samp_times

numeric vector of sampling times.

n_sampled

integer vector of lineages sampled at each sampling time.

logpop

matrix posterior sample of log-effective population sizes.

grid

numeric grid of time points.

cap

integer maximum number of posterior samples to use.

Value

data.frame with two columns: "obs" contains the KS discrepancies for the supplied coalescent times, "rep" contains the KS discrepancies for the replicated coalescent times.


mdkarcher/phylodyn documentation built on Nov. 24, 2021, 12:20 a.m.