View source: R/abapToUnmarked_multi.R
abapToUnmarked_multi | R Documentation |
This function transforms a raw ABAP data frame (returned by getAbapData
)
into an unmarkedMultFrame
object which can be used to
fit dynamic occupancy models using colext
(MacKenzie et. al 2003)
and stan_colext
from the ubms
package (which fits
Unmarked Bayesian Models with Stan).
abapToUnmarked_multi(abap_data, pentads = NULL)
abap_data |
multi-season ABAP data downloaded using |
pentads |
an |
In addition to reformatting the detection/non-detection ABAP data for
use in unmarked
and ubms
occupancy models, this function also extracts two
survey-level covariates: hours
and jday
. The hours
variable is the total
number of hours spent atlassing which is recorded on the pentad card and jday
is the Julian day corresponding to the first day of atlassing for that card.
The function also adds the sampling year as a yearlySiteCovs
which allows
year to be used in the formula for colonization, extinction and detection
probability.
If pentads
are provided the unmarked
frame will add the X and Y coordinates
as site-level covariates (siteCovs
).
an object of class unmarkedMultFrame
The processing time of abapToUnmarked_multi
can be considerably long
if the number of cards and pentads of the focal species is high, so patience
may be required.
Dominic Henry dominic.henry@gmail.com
Pachi Cervantes
MacKenzie, D. I., J. D. Nichols, J. E. Hines, M. G. Knutson, and A. B. Franklin. 2003. Estimating site occupancy, colonization, and local extinction when a species is detected imperfectly. Ecology 84:2200-2207.
colext
, stan_colext
## Not run:
library(unmarked)
abap_multi <- getAbapData(.spp = 212,
.region_type = "province",
.region = "Eastern Cape",
.years = c(2009,2010,2011,2012))
abap_pentads <- getRegionPentads(.region_type = "province",
.region = "Eastern Cape")
## Return unmarked frame no site covariates
um_df <- abapToUnmarked_multi(abap_multi)
summary(um_df)
## Return unmarked frame with Pentad coordinates as site covariates
um_df <- abapToUnmarked_multi(abap_data = abap_multi, pentads = abap_pentads)
summary(um_df)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.