Skip to contents

Get distribution stan ID by name

Usage

pcd_stan_dist_id(name, type = c("delay", "primary"))

Arguments

name

String. Distribution name or alias

type

String. "delay" or "primary" corresponding to the type of distribution to use as the look up. If delay then pcd_distributions() is used, if primary then pcd_primary_distributions() is used.

Value

Numeric distribution ID

See also

Tools for working with package Stan functions pcd_load_stan_functions(), pcd_stan_files(), pcd_stan_functions(), pcd_stan_path()

Examples

pcd_stan_dist_id("lnorm")
#> [1] 1
pcd_stan_dist_id("lognormal")
#> [1] 1
pcd_stan_dist_id("gamma")
#> [1] 2
pcd_stan_dist_id("weibull")
#> [1] 3
pcd_stan_dist_id("exp")
#> [1] 4
pcd_stan_dist_id("unif", type = "primary")
#> [1] 1