View source: R/unmarkedFrame.R
unmarkedFrameOccuMulti | R Documentation |
Organizes detection, non-detection data for multiple species along
with the covariates. This S4 class is required by the data argument
of occuMulti
unmarkedFrameOccuMulti(y, siteCovs=NULL, obsCovs=NULL,
maxOrder, mapInfo)
y |
A list (optionally a named list) of length S where each element is an MxJ matrix of the detection, non-detection data for one species, where M is the number of sites, J is the maximum number of sampling periods per site, and S is the number of species in the analysis. |
siteCovs |
A |
obsCovs |
Either a named list of |
maxOrder |
Optional; specify maximum interaction order. Defaults to number of species (all possible interactions). Reducing this value may speed up creation of unmarked frame if you aren't interested in higher-order interactions. |
mapInfo |
Currently ignored |
unmarkedFrameOccuMulti is the S4 class that holds data to be passed
to the occuMulti
model-fitting function.
an object of class unmarkedFrameOccuMulti
Ken Kellner contact@kenkellner.com
unmarkedFrame-class
, unmarkedFrame
,
occuMulti
# Fake data
S <- 3 # number of species
M <- 4 # number of sites
J <- 3 # number of visits
y <- list(matrix(rbinom(M*J,1,0.5),M,J), # species 1
matrix(rbinom(M*J,1,0.5),M,J), # species 2
matrix(rbinom(M*J,1,0.2),M,J)) # species 3
site.covs <- data.frame(x1=1:4, x2=factor(c('A','B','A','B')))
site.covs
umf <- unmarkedFrameOccuMulti(y=y, siteCovs=site.covs,
obsCovs=NULL) # organize data
umf # look at data
summary(umf) # summarize
plot(umf) # visualize
#fm <- occu(~1 ~1, umf) # fit a model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.