- age_grid
Numeric vector, listing discrete ages (time before present) on which the various model variables (e.g., \(\lambda\), \(\mu\) etc) are specified. Listed ages must be strictly increasing, and must include the present-day (i.e. age 0).
- PSR
Numeric vector, of the same size as age_grid
, specifying the pulled speciation rate (PSR) (in units 1/time) at the ages listed in age_grid
. The PSR is assumed to vary polynomially between grid points (see argument splines_degree
). Can also be a single number, in which case PSR
is assumed to be time-independent.
- PDR
Numeric vector, of the same size as age_grid
, specifying the pulled diversification rate (PDR) (in units 1/time) at the ages listed in age_grid
. The PDR is assumed to vary polynomially between grid points (see argument splines_degree
). The PDR of a HBDS model is defined as \(PDR=\lambda-\mu-\psi+(1/\lambda)d\lambda/dt\) (where \(t\) denotes age). Can also be a single number, in which case PDR
is assumed to be time-independent.
- lambda_psi
Numeric vector, of the same size as age_grid
, specifying the product of speciation rate and sampling rate (\(\lambda\psi\), in units 1/time^2) at the ages listed in age_grid
. \(\lambda\psi\) is assumed to vary polynomially between grid points (see argument splines_degree
). Can also be a single number, in which case \(\lambda\psi\) is assumed to be time-independent.
- lambda
Numeric vector, of the same size as age_grid
, specifying the speciation rate (\(\lambda\), in units 1/time) at the ages listed in age_grid
. The speciation rate is assumed to vary polynomially between grid points (see argument splines_degree
). Can also be a single number, in which case \(\lambda\) is assumed to be time-independent. By providing \(\lambda\), one can select a specific model from the congruence class. Note that exactly one of lambda
, mu
, psi
, Reff
or removal_rate
must be provided.
- mu
Numeric vector, of the same size as age_grid
, specifying the extinction rate (\(\mu\), in units 1/time) at the ages listed in age_grid
. The extinction rate is assumed to vary polynomially between grid points (see argument splines_degree
). Can also be a single number, in which case \(\mu\) is assumed to be time-independent. In an epidemiological context, \(\mu\) typically corresponds to the recovery rate plus the death rate of infected individuals. By providing \(\mu\) (together with lambda0
, see below), one can select a specific model from the congruence class. Note that exactly one of lambda
, mu
, psi
, Reff
or removal_rate
must be provided.
- psi
Numeric vector, of the same size as age_grid
, specifying the (Poissonian) sampling rate (\(\psi\), in units 1/time) at the ages listed in age_grid
. The sampling rate is assumed to vary polynomially between grid points (see argument splines_degree
). Can also be a single number, in which case \(\psi\) is assumed to be time-independent. By providing \(\psi\), one can select a specific model from the congruence class. Note that exactly one of lambda
, mu
, psi
, Reff
or removal_rate
must be provided.
- Reff
Numeric vector, of the same size as age_grid
, specifying the effective reproduction ratio (\(R_e\), unitless) at the ages listed in age_grid
. The \(R_e\) is assumed to vary polynomially between grid points (see argument splines_degree
). Can also be a single number, in which case \(R_e\) is assumed to be time-independent. By providing \(R_e\) (together with lambda0
, see below), one can select a specific model from the congruence class. Note that exactly one of lambda
, mu
, psi
, Reff
or removal_rate
must be provided.
- removal_rate
Numeric vector, of the same size as age_grid
, specifying the removal rate (\(\mu+\psi\), in units 1/time) at the ages listed in age_grid
. IN an epidemiological context this is also known as "become uninfectious" rate. The removal rate is assumed to vary polynomially between grid points (see argument splines_degree
). Can also be a single number, in which case the removal rate is assumed to be time-independent. By providing \(\mu+\psi\) (together with lambda0
, see below), one can select a specific model from the congruence class. Note that exactly one of lambda
, mu
, psi
, Reff
or removal_rate
must be provided.
- lambda0
Numeric, specifying the speciation rate at the present-day (i.e., at age 0). Must be provided if and only if one of mu
, Reff
or removal_rate
is provided.
- CSA_ages
Optional numeric vector, listing the ages of concentrated sampling attempts, in ascending order. Concentrated sampling is assumed to occur in addition to any continuous (Poissonian) sampling specified by psi
.
- CSA_pulled_probs
Optional numeric vector of the same size as CSA_ages
, listing pulled sampling probabilities at each concentrated sampling attempt (CSA). Note that in contrast to the sampling rates psi
, the CSA_pulled_probs
are interpreted as probabilities and must thus be between 0 and 1. CSA_pulled_probs
must be provided if and only if CSA_ages
is provided.
- CSA_PSRs
Optional numeric vector of the same size as CSA_ages
, specifying the pulled sampling rate (PSR) during each concentrated sampling attempt. While in principle the PSR is already provided by the argument PSR
, the PSR may be non-continuous at CSAs, which makes a representation as piecewise polynomial function difficult; hence, you must explicitly provide the correct PSR at each CSA. CSA_PSRs
must be provided if and only if CSA_ages
is provided.
- splines_degree
Integer, either 0,1,2 or 3, specifying the polynomial degree of the provided time-dependent variables between grid points in age_grid
. For example, if splines_degree==1
, then the provided PDR, PSR and so on are interpreted as piecewise-linear curves; if splines_degree==2
they are interpreted as quadratic splines; if splines_degree==3
they are interpreted as cubic splines. The splines_degree
influences the analytical properties of the curve, e.g. splines_degree==1
guarantees a continuous curve, splines_degree==2
guarantees a continuous curve and continuous derivative, and so on.
- ODE_relative_dt
Positive unitless number, specifying the default relative time step for internally used ordinary differential equation solvers. Typical values are 0.01-0.001.
- ODE_relative_dy
Positive unitless number, specifying the relative difference between subsequent simulated and interpolated values, in internally used ODE solvers. Typical values are 1e-2 to 1e-5. A smaller ODE_relative_dy
increases interpolation accuracy, but also increases memory requirements and adds runtime.