Construct appropriate Dirichlet vector to pass to JAGS, based on which branches had observed tags, and which did not.

createDirichletVector(
  n_branches = NULL,
  init_vals = NULL,
  initial_one = T,
  final_one = F
)

Arguments

n_branches

How many paths could a tag travel from this branching node?

init_vals

The initial values, based on observations

initial_one

Should the first value of the Dirichlet vector be fixed to 1? Default value is FALSE.

final_one

Should the last value of the Dirichlet vector be fixed to 1? Default value is FALSE.

Author

Kevin See

Examples

createDirichletVector(3)
#> [1] 1 0 0