mcmc.SCR: Run MCMC algorithm for basic SCR model.

View source: R/mcmc.SCR.R

mcmc.SCRR Documentation

Run MCMC algorithm for basic SCR model.

Description

This function runs the MCMC algorithm for the basic SCR model. The data list should have the following elements: 1. y, a n x J capture history 2. X, a matrix with the X and Y trap locations in the first two columns 3. either buff or vertices. buff is the fixed buffer for the traps to produce the state space. It is applied to the minimum and maximum X and Y locations, producing a square or rectangular state space. vertices is a matrix with the X and Y coordinates of a polygonal state space.

Usage

mcmc.SCR(data, niter = 1000, nburn = 0, nthin = 1, M = M,
  inits = inits, proppars = list(lam0 = 0.05, sigma = 0.1, sx = 0.2, sy
  = 0.2), storeLatent = TRUE, Rcpp = TRUE, obstype = "bernoulli")

Arguments

data

a list produced by simSCR or in the same format

niter

number of MCMC iterations to run

nburn

number of MCMC iterations to discard as burn in

nthin

MCMC thinning parameter. Record output on every nthin iterations. nthin=1 corresponds to no thinning

M

The size of the augmented superpopulation

inits

a list of user-supplied initial values. inits=list(psi=psi,lam0=lam0,sigma=sigma)

proppars

a list of tuning parameters for the proposal distributions

storeLatent

a logical indicating whether or not to keep the posteriors for z and s

Rcpp

a logical indicating whether or not to use Rcpp

Value

a list with the posteriors for the SCR parameters (out), s, z

Author(s)

Ben Augustine, Andy Royle


benaug/SPIM documentation built on April 28, 2024, 7:27 a.m.