Skip to contents

Method for extracting model fitted values and detection probability values from a fitted spatial factor multi-species N-mixture (sfMsNMix) model.

Usage

# S3 method for sfMsNMix
fitted(object, type = 'marginal', ...)

Arguments

object

object of class sfMsNMix.

type

a character string indicating whether fitted values should be generated conditional on the estimated latent abundance values (type = 'conditional') estimated during the model or based on the marginal expected abundance values (type = 'marginal').

...

currently no additional arguments

Details

A method to the generic fitted function to extract fitted values and detection probability values for fitted model objects of class sfMsNMix.

Value

A list comprised of:

y.rep.samples

A four-dimensional numeric array of fitted values for use in Goodness of Fit assessments. Array dimensions correspond to MCMC samples, species, sites, and replicates.

p.samples

A four-dimensional numeric array of detection probability values. Array dimensions correspond to MCMC samples, species, sites, and replicates.