R/extract.R
extract_parameters.Rd
Extract the estimates of the model parameters (observation, transition, and initial models).
extract_parameters(fit, observation = TRUE, initial = TRUE, transition = TRUE, ...)
fit | An object returned by either |
---|---|
observation | A boolean indicating whether the observation model parameters should be returned. |
initial | A boolean indicating whether the initial model parameters should be returned. |
transition | A boolean indicating whether the transition model parameters should be returned. |
... | Arguments to be passed to rstan's |
A named list with as many elements as model parameters. Each element is a numeric array with dimensions [N, M, ...]: number of iterations N, number of chains M, and one or more dimensions related to the characteristics of the parameter. If the argument chain was set, the chain dimension is dropped and the function returns a numeric array with dimensions [N, ...]. If the argument reduce was set to a function returning a vector of size n, the returned array has dimension [n, M, ...]. When n is simply one (e.g. median
), the number-of-iterations dimension is dropped and the function returns a three-dimensional numeric array [M, ...].