Extract parameters posterior summary statistics
Arguments
- fit
Stanfit object
- pars
Named list of parameters to extract. See
list_parameters()
. IfNULL
, it extracts all parameters of the model.- id
Dataframe associating Index to (Patient, Time) pairs. See
get_index()
.id
is not used whenpars = NULL
orpars
does not contain an elementPatientTime
.- ...
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)
}