Last chance! 50% off unlimited learning
Sale ends in
unmarkedFrame(y, siteCovs=NULL, obsCovs=NULL, mapInfo, obsToY)
data.frame
of covariates that vary at the
site level. This should have M rows and one column per covariatedata.frame
s of covariates
that vary within sites, or a data.frame
with MxJ rows in
site-major order.y
), covariates measured at
the observation level (obsCovs
), and covariates measured at the site
level (siteCovs
).
For a data set with M sites and J observations at each site, y is an
M x J matrix. obsCovs
and siteCovs
are both data frames
(see data.frame). siteCovs
has M rows so that each row
contains the covariates for the corresponding sites.
obsCovs
has M*obsNum rows so that each covariates is ordered by site
first, then observation number. Missing values are coded with NA
in any
of y, siteCovs, or obsCovs.
Additionally, unmarkedFrames contain metadata: obsToY, mapInfo.
obsToY is a matrix describing relationship between response matrix and
observation-level covariates. Generally this does not need to be supplied by
the user; however, it may be needed when using multinomPois
. For
example, double observer sampling, y has 3 columns corresponding the observer 1,
observer 2, and both, but there were only two independent observations.
In this situation, y has 3 columns, but obsToY must be specified.
Several child classes of unmarkedFrame
require addional metadata. For
example, unmarkedFrameDS
is used to organize distsance sampling data
for the distsamp
function, and it has arguments dist.breaks,
tlength, survey, and unitsIn, which specify the distance interval cut points,
transect lengths, "line" or "point" transect, and units of measure,
respectively.
All site-level covariates are automatically copied to obsCovs so that site level
covariates are available at the observation level.unmarkedFrame-class
# Set up data for pcount()
data(mallard)
mallardUMF <- unmarkedFramePCount(mallard.y, siteCovs = mallard.site,
obsCovs = mallard.obs)
summary(mallardUMF)
# Set up data for occu()
data(frogs)
pferUMF <- unmarkedFrameOccu(pfer.bin)
# Set up data for distsamp()
data(linetran)
ltUMF <- with(linetran, {
unmarkedFrameDS(y = cbind(dc1, dc2, dc3, dc4),
siteCovs = data.frame(Length, area, habitat),
dist.breaks = c(0, 5, 10, 15, 20),
tlength = linetran$Length * 1000, survey = "line", unitsIn = "m")
})
summary(ltUMF)
# Set up data for multinomPois()
data(ovendata)
ovenFrame <- unmarkedFrameMPois(ovendata.list$data,
siteCovs=as.data.frame(scale(ovendata.list$covariates[,-1])),
type = "removal")
summary(ovenFrame)
# Set up data for colext()
frogUMF <- formatMult(masspcru)
summary(frogUMF)
Run the code above in your browser using DataLab