fit-method-inv_metric: Extract inverse metric (mass matrix) after MCMC

fit-method-inv_metricR Documentation

Extract inverse metric (mass matrix) after MCMC

Description

Extract the inverse metric (mass matrix) for each MCMC chain.

Usage

inv_metric(matrix = TRUE)

Arguments

matrix

(logical) If a diagonal metric was used, setting matrix = FALSE returns a list containing just the diagonals of the matrices instead of the full matrices. Setting matrix = FALSE has no effect for dense metrics.

Value

A list of length equal to the number of MCMC chains. See the matrix argument for details.

See Also

CmdStanMCMC

Examples

## Not run: 
fit <- cmdstanr_example("logistic")
fit$inv_metric()
fit$inv_metric(matrix=FALSE)

fit <- cmdstanr_example("logistic", metric = "dense_e")
fit$inv_metric()

## End(Not run)


stan-dev/cmdstanr documentation built on April 21, 2024, 5:38 a.m.