Skip to contents

Extract parameters posterior summary statistics

Usage

extract_parameters(fit, pars = NULL, id = NULL, ...)

Arguments

fit

Stanfit object

pars

Named list of parameters to extract. See list_parameters(). If NULL, it extracts all parameters of the model.

id

Dataframe associating Index to (Patient, Time) pairs. See get_index(). id is not used when pars = NULL or pars does not contain an element PatientTime.

...

Arguments to pass to HuraultMisc::summary_statistics().

Value

Tibble dataframe containing posterior summary statistics. See details in HuraultMisc::summary_statistics(). Additional columns Patient and Time if id is not NULL.

Examples

if (FALSE) {
model <- EczemaModel("BinRW", max_score = 100)
id <- get_index2(rpois(10, 20))
train <- id %>% mutate(Score = rbinom(nrow(.), 100, .5))
fit <- EczemaFit(model, train)
extract_parameters(fit, pars = list_parameters("BinRW"), id = id)
}