get_est: Get Parameter Estimates from Stan Model Fit

View source: R/get_est.R

get_estR Documentation

Get Parameter Estimates from Stan Model Fit

Description

Extracts parameter estimates from a Stan model fit, including mean, median, standard deviation, and HPD intervals.

Usage

get_est(distri, stan_fit)

Arguments

distri

Character string specifying the distribution. Options are "poi", "nb", "gp", or "cmp".

stan_fit

A stanfit object returned by get_stanfit.

Value

A summary of the parameter estimates.

Examples


  # Generate toy data
  y_data <- data_simu(n = 60, alpha = 0.5, rho = 0.3, lambda = 5,
                      mod_type = "zi", distri = "poi")

  # Fit a small Stan model (may take > 5s on first compile)
  stan_fit <- get_stanfit(mod_type = "zi", distri = "poi", y = y_data)

  # Get parameter estimates from the Stan model fit
  get_est(distri = "poi", stan_fit = stan_fit)



ZIHINAR1 documentation built on Nov. 10, 2026, 9:07 a.m.