Description Usage Arguments Value
This function can calulate select derived quantites using the output from
tempo_mcmc()
for observations chosed by the user. Derived quantities
include the pmf and/or cdf of transition time, the transition probabilities
for each time step (i.e. the parameter for the tvgeom distribution),
the mean predicted transition time, and the standard deviation
of the transition time distribution.
1 2 3 4 5 6 7 8 | tempo_derive(
draws,
quantity,
obs_idx,
max_samples = 1000,
parallelize = TRUE,
n_cores = NULL
)
|
draws |
output from |
quantity |
character vector; one or more of "probabilities", "pmf",
"cdf", "mean", and "sd", specifying which quantities to calculate. Note that
if your model included random effects, you must run |
obs_idx |
integer vector; specifies the observations for which derived
quantities will be calculated. Indices in |
max_samples |
integer; specify the number of samples for which to
calculate derived quantites for each chain. Defaults to |
parallelize |
Boolean, should the function be run in parallel. Defaults
to |
n_cores |
Integer, number of cores to use for parallel processing.
Defaults to |
list of posterior distributions for the derived quantities.
"probabilities", "pmf", and "cdf" each return a 3D array with mcmc
iterations as rows, time steps as columns, and observations along the
3rd margin. "mean" and "sd" return matrices with mcmc iterations as rows and
observations as columns. All objects are returned with named dimensions. The
dimension names for observations match the dimention names of the rows for
matrices in the list of covariates supplied to tempo_mcmc()
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.