Learn R Programming

eDNAjoint (version 0.3.3)

joint_summarize: Summarize posterior distributions of model parameters.

Description

This function summarizes the posterior distributions of specified parameters from a model fit. Summary includes mean, sd, and specified quantiles, as well as effective sample size (n_eff) and Rhat for estimated parameters. See more examples in the Package Vignette.

Usage

joint_summarize(model_fit, par = "all", probs = c(0.025, 0.975), digits = 3)

Value

A summary table of parameter estimates.

Arguments

model_fit

An object of class stanfit.

par

A character vector of parameter names. The default is 'all'.

probs

A numeric vector of quantiles of interest. The default is c(0.025,0.975).

digits

An integer indicating the number of decimal places to round values in summary table. Default value is 3.

Examples

Run this code
# \donttest{
data(green_crab_data)

# Fit a model
model_fit <- joint_model(data = green_crab_data, family = "negbin", q = TRUE,
                         multicore = FALSE)

# Create summary table of all parameters
joint_summarize(model_fit$model)

# Summarize just 'p10' parameter
joint_summarize(model_fit$model, par = "p10", probs = c(0.025, 0.975),
                digits = 3)
# }

Run the code above in your browser using DataLab