View source: R/abapToUnmarked_single.R
abapToUnmarked_single | R Documentation |
This function transforms a raw ABAP data frame (returned by getAbapData
)
into an unmarkedFrameOccu
object which can be used to
fit single-season occupancy models using occu
(MacKenzie et. al 2002)
or occuRN
(Royle and Nichols, 2003) in unmarked
.
unmarkedFrameOccu
objects can also be used to fit stan_occu
or stan_occuRN
models from the ubms
package (which fits
Unmarked Bayesian Models with Stan).
abapToUnmarked_single(abap_data, pentads = NULL)
abap_data |
single-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. If pentads
are provided the unmarked
frame will add the x and y
coordinates as site covariates (siteCovs
). The spatial data can be used as
random effects to run a restricted spatial regression (RSR) occupancy model
in ubms
. See RSR
for more details.
an object of class unmarkedFrameOccu
It's important to make sure that the .region_type
and .region
are
the same when extracting abap_data
and pentads
(see example below). The
processing time of abapToUnmarked_single
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, G. B. Lachman, S. Droege, J. Andrew Royle, and C. A. Langtimm. 2002. Estimating Site Occupancy Rates When Detection Probabilities Are Less Than One. Ecology 83: 2248-2255.
Royle, J. A. and Nichols, J. D. (2003) Estimating Abundance from Repeated Presence-Absence Data or Point Counts. Ecology, 84(3) pp. 777-790.
occu
, occuRN
,
stan_occu
, stan_occuRN
## Not run:
abap_single <- getAbapData(.spp_code = 212,
.region_type = "province",
.region = "Eastern Cape",
.years = 2012)
abap_pentads <- getRegionPentads(.region_type = "province",
.region = "Eastern Cape")
## Return unmarked frame no site covariates
um_df <- abapToUnmarked_single(abap_single)
## Return unmarked frame with Pentad coordinates as site covariates
um_df <- abapToUnmarked_single(abap_single, abap_pentads)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.