getPostEstimate function

getPostEstimate

getPostEstimate

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

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

Returns

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)
  • Maintainer: Otso Ovaskainen
  • License: GPL-3 | file LICENSE
  • Last published: 2022-08-11