R/posterior-methods.R

Defines functions as_draws.measrfit

#' @importFrom posterior as_draws
#' @export
posterior::as_draws

#' @export
as_draws.measrfit <- function(x, ...) { #nolint
  if (x$backend == "rstan" && x$method == "optim") {
    posterior::as_draws(t(as.matrix(x$model$par)))
  } else {
    posterior::as_draws(x$model, ...)
  }
}

Try the measr package in your browser

Any scripts or data that you put into this service are public.

measr documentation built on May 29, 2024, 2:50 a.m.