Estimates the IFM with imperfect detection and missing data.
ifm.robust.MCMC(niter = 1000, init, det.data, site.distance, site.area, sd.prop.p = 0.1,
sd.prop.mupsi1 = 0.1, sd.prop.e = 0.2, sd.prop.x = 0.2, sd.prop.y = 0.2, sd.prop.b = 0.2,
sd.prop.alpha = 0.2, nthin = 1, nsite.subset = 5, print.by = 100)nsite x nyear x niter array sampled from the posterior distribution of occupancy in each year (if detection occurred at a given year and site, then the value is identically equal to one for all iterations).
nyear x niter matrix posterior sample of the proportion of sites occupied in each year.
nyear x niter matrix posterior sample of the proportion of sites occupied for sites with missing data.
Extinction rate for all sites.
Colonization rate.
nyear x niter sample of detection probabilities.
posterior sample of parameter for occupancy in year 1.
posterior sample of e
posterior sampmle of x
posterior sample of y
posterior sample of b
posterior sample of alpha
posterior sample of -2*loglik
Number of iterations in the MCMC chain.
Named list with values to initialize the chain. E.g.:
init1=list(z.data=initocc,z.missing=runif(nmissing),p=runif(nyear,
0.1,1),mupsi1=runif(1),alpha=runif(1,1,30), b=runif(1,0,5),y=runif(1,0,20),
e=runif(1,0,1),x=runif(1,0,5)).
z.data: a matrix with nrows = number of sites and ncol = number of years. Contains NAs for missing values. Contains naive estimates of occupancy elsewhere.
z.missing: z.missing: a vector of initial occupancy states for the missing data with length equal to the number of NAs in z.data (i.e., vectorized across years). Can use runif(nmissing).
p: vector of length nyears with inital probability of detection in each year
mupsi1: probability of initial occupancy in year 1; runif(1) suffices
alpha: initial value for alpha in dispersal model; described as 1 / average dispersal distance
b: initial value for parameter b in colonization model
y: initial value for parameter y in colonization model
e: initial value for e in extinction model
x: initial value for x in extinction model
Detection data in an array with dimensions nsites x nyears x nvisits. For removal design, set all values after a detection equal to NA. For missing data in a given year, set all visits to NA.
nsite x nsite matrix of distances between sites. The tuning parameters in the example are set for distances less than one, with max distance approximately 0.5. Input data should have a similar scaling.
Vector of length nsite with areas. The tuning parameters in the example are set for average area approximately equal to 1. Input data should have a similar scaling.
Scalar equal to the standard deviation of the proposal distribution for probability of detection, which is a normal distribution centered at current value in the mcmc chain. The same standard deviation is used for all years.
Standard deviation of the proposal distribution for occupancy in year 1.
Standard deviation of the proposal distribution for parameter e.
Standard deviation of the proposal distribution for parameter x.
Standard deviation of the proposal distribution for parameter y.
Standard deviation of the proposal distribution for parameter b.
Standard deviation of the proposal distribution for parameter alpha.
If specified, keeps only every nthin^th sample from the MCMC chain. Use to save memory or when the chain is moving slowly.
The number of sites to include in the block sampling, where nsite.subset is equal to the number of sites updated in the same step. Larger values decrease the probability of acceptance.
Specifies how often to print the number of the current iteration.
Benjamin Risk
Risk, B. B., De Valpine, P., Beissinger, S. R. (2011). A robust design formulation of the incidence function model of metapopulation dynamics applied to two species of rails. Ecology, 92(2), 462-474.