posterior_samp_check: Posterior predictive check for inhomogenous Poisson process...

Description Usage Arguments Value

View source: R/model_check.R

Description

Posterior predictive check for inhomogenous Poisson process sampling model

Usage

1
2
3
posterior_samp_check(samp_times, n_sampled, logpop, grid, betas,
  cap = NULL, covariates = NULL, cov_betas = NULL,
  pow_covariates = NULL, pow_cov_betas = NULL)

Arguments

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.

betas

matrix posterior sample of log-linear coefficients for sampling model.

cap

integer maximum number of posterior samples to use.

covariates

list of vectors representing covariate values.

cov_betas

numeric coefficients for each element of covariates.

pow_covariates

list of vectors representing interaction covariate values.

pow_cov_betas

numeric coefficients for each element of pow_covariates.

Value

data.frame with two columns: "obs" contains the chi-square discrepancies for the supplied sampling times, "rep" contains the chi-square discrepancies for the replicated sampling times.


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