convertToCodaObject: convertToCodaObject

View source: R/convertToCodaObject.r

convertToCodaObjectR Documentation

convertToCodaObject

Description

Converts the Hmsc posterior into a named list of mcmc.list objects

Usage

convertToCodaObject(
  hM,
  start = 1,
  spNamesNumbers = c(TRUE, TRUE),
  covNamesNumbers = c(TRUE, TRUE),
  trNamesNumbers = c(TRUE, TRUE),
  Beta = TRUE,
  Gamma = TRUE,
  V = TRUE,
  Sigma = TRUE,
  Rho = TRUE,
  Eta = TRUE,
  Lambda = TRUE,
  Alpha = TRUE,
  Omega = TRUE,
  Psi = TRUE,
  Delta = TRUE
)

Arguments

hM

a fitted Hmsc model object

start

index of first MCMC sample included

spNamesNumbers

logical of length 2, where first entry controls whether species names are printed, and second entry controls whether species numbers are printed

covNamesNumbers

Logical of length 2, where first entry controls whether covariate names are printed, and second entry controls whether covariate numbers are printed

trNamesNumbers

Logical of length 2, where first entry controls whether trait names are printed, and second entry controls whether traits numbers are printed

Beta

logical indicating whether posterior of Beta is included

Gamma

logical indicating whether posterior of Gamma is included

V

logical indicating whether posterior of V is included

Sigma

logical indicating whether posterior of Sigma is included

Rho

logical indicating whether posterior of Rho is included

Eta

logical indicating whether posterior of Eta is included

Lambda

logical indicating whether posterior of Lambda is included

Alpha

logical indicating whether posterior of Alpha is included

Omega

logical indicating whether posterior of Omega is included

Psi

logical indicating whether posterior of Psi is included

Delta

logical indicating whether posterior of Delta is included

Value

A named list that can be analysed with coda functions.

Examples

# Convert recorded posterior samples in \code{Hmsc} object to coda object
codaObject = convertToCodaObject(TD$m)

# Convert recorded posterior samples, starting from sample 100, in m object to coda object
codaObject = convertToCodaObject(TD$m, start=100)


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