mcmc.SCR | R Documentation |
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.
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")
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 |
a list with the posteriors for the SCR parameters (out), s, z
Ben Augustine, Andy Royle
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.