Extract Samples for a Parameter from a Stan model
Extracts a single from a list of stan output and returns it as a <data.table>
.
extract_parameter(param, samples, dates)
param
: Character string indicating the parameter to extractsamples
: Extracted stan model (using rstan::extract()
)dates
: A vector identifying the dimensionality of the parameter to extract. Generally this will be a date.A <data.frame>
containing the parameter name, date, sample id and sample value.
Useful links