extract_parameters: Extract the estimates of the model parameters (observation,...

Description Usage Arguments Value See Also

Description

Extract the estimates of the model parameters (observation, transition, and initial models).

Usage

1
2
extract_parameters(fit, observation = TRUE, initial = TRUE,
  transition = TRUE, ...)

Arguments

fit

An object returned by either draw_samples or optimizing.

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 extract if the object fit was returned by fit or draw_samples.

Value

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, ...].

See Also

Other extract: extract_K, extract_R, extract_T, extract_alpha, extract_data, extract_filename, extract_gamma, extract_model, extract_obs_parameters, extract_spec, extract_ypred, extract_ysim, extract_y, extract_zpred, extract_zsim, extract_zstar, extract


luisdamiano/BayesHMM documentation built on May 20, 2019, 2:59 p.m.