get_unmarked: Retrieve nimbleCode for spatial count models

View source: R/localSCR.R

get_unmarkedR Documentation

Retrieve nimbleCode for spatial count models

Description

Creates model code using the nimbleCode function.

Usage

get_unmarked(occ_specific = FALSE, hab_mask = FALSE, trapsClustered = FALSE)

Arguments

occ_specific

Logical. If FALSE, the encounter rate will not include an occasion-specific loop in the detection function; otherwise, the model will include a for loop for occasions (K) in the detection function. Default is FALSE.

hab_mask

A logical value indicating whether a habitat mask will be used. Default is FALSE.

trapsClustered

A logical value indicating if traps are clustered in arrays across the sampling area.

Details

This function provides templates for unmarked models that can be easily modified to include further model complexity such as covariates explaining detection probability. The models include habitat masking.

Value

Model code created from nimbleCode.

Author(s)

Daniel Eacker

Examples

# get spatial count model with non-occasion-specific detection
# function, single scaling parameter, no habitat mask, and no clustering
unmarked_model = get_unmarked(occ_specific=FALSE,hab_mask = FALSE, 
                              trapsClustered = FALSE)

# inspect model
unmarked_model

sitkensis22/localSCR documentation built on May 15, 2022, 5:26 p.m.