c.Hmsc: Combine Posterior Samples of Several Hmsc Models

c.HmscR Documentation

Combine Posterior Samples of Several Hmsc Models

Description

Function combines posterior samples of several sampled Hmsc models (see sampleMcmc) as new chains in the first fitted model. The combined models must be comparable, and there are some tests for detecting non-equal models. These tests will only give warning, and it is at user deliberation to decide which models and which posterior samples can be combined. You should be careful not start two models from the same random number seed, because these will only duplicate your data instead of providing new independent samples.

Usage

## S3 method for class 'Hmsc'
c(...)

Arguments

...

Sampled Hmsc models with posterior samples that will be added as new chaings in the first listed model.

Value

An Hmsc model with chains of posterior samples.

Examples

## Fit a toy model with two chains
m1 <- sampleMcmc(TD$m, samples=10, transient=5, nChains=2, verbose=0)
## Need more data? Add chains: check carefully that these are
## sampled exactly like the previous model
m2 <- sampleMcmc(TD$m, nChains=2, samples=10, transient=5, verbose=0)
## Now four chains
m4 <- c(m1, m2)
m4


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