getPostEstimate: getPostEstimate

View source: R/getPostEstimate.R

getPostEstimateR Documentation

getPostEstimate

Description

Calculates mean, support and other posterior quantities for a specified model parameter

Usage

getPostEstimate(
  hM,
  parName,
  r = 1,
  x = NULL,
  q = c(),
  chainIndex = 1:length(hM$postList),
  start = 1,
  thin = 1
)

Arguments

hM

a fitted Hmsc model object

parName

name of the parameter to be summarized. Can take value of model's baseline parameters, "Omega" or "OmegaCor".

r

the random level for which to calculate the parameter. Has effect only for Eta, Lambda, Omega and OmegaCor.

x

values of covariates for covariate dependent omega

q

vector of quantiles to calculate.

chainIndex

which posterior chains to use for summarization (defaults to all)

start

index of first MCMC sample included

thin

thinning interval of posterior distribution

Value

A named list of posterior quantities.

Examples

# Get posterior mean and support for species' responses to environmental covariates
postBeta = getPostEstimate(TD$m, parName='Beta')

# Get posterior mean and support for species' responses to latent factors for the first random level
postLambda = getPostEstimate(TD$m, parName='Lambda', r=1)


Hmsc documentation built on Aug. 11, 2022, 5:11 p.m.