Hi and thank you both for your suggestions!
My research question is to look at site-specific occupancy for gorillas and chimpanzees within a multi-use landscape (19 camera sites over 12 months, with a detection matrix of 52 sampling occasions of one week, although not all sites have 52 sampling occasions). I am doing a separate occupancy model for each species but I will compare them after.
I know there is monthly variation in site occupancy (i.e both species use different sites during different months, although I don't believe either species leaves or enters the study area entirely during the 12 months). Basically I want to be able to determine which sites specifically are used during which months while accounting for imperfect detection. I am also interested in whether certain sites are used by both species during the same time-frame (month, or season) but for now I want to run two separate occupancy models.
The columns of my dataset (I have 1 dataset for each spp) are currently as follows:
site id [1] n=19
site covs - habitat type (Forest, Road, Trail) , land type (Park, Community, Forestry), # of sampling occasions - [,2:4]
chimp(or gorilla) detection (y) - [,5:56]
obs covs - standardized Julian date [,57:108], ecological season (Rainy, Short dry, Short rainy, Dry) [,109:160], month (June2019-May2020) [ ,161:212]
José, you wrote : "If you don't need to estimate dynamic parameters but you'd like to test for temporal variation in occupancy you could apply a single-season model with random effects (being random effects the camera trap or sampling unit), by stacking months (i.e., your sampling units would be camera-months)."
I believe this is what I want to do, but I'm not sure how to set up my data/unmarked frame.
Instead of my first column being 19 rows of sites, would it be 19*12 rows (i.e stacked site.month; site1.june, site1.july...site19.may)? Could I then make the ecological season a site cov instead? I'm also missing some data (not all sites have functional cameras for all 12 months). I could stack the site.season, however the ecological seasons (Rainy, Dry, etc) are unequal in length, so it might be problematic.
This is what I have so far for my chimpanzee model (obviously if I switch to the stacked version this would be different):
chimpanzee <- read.csv("chimp.detection.4.csv")
DATE <- as.matrix(chimpanzee[,57:108]) ## Julian date of sampling occasion
y.chimp <- as.matrix(chimpanzee[,5:56]) ##detection matrix
## standardize dates
y.chimp[
is.na(DATE) !=
is.na(y.chimp)] <- NA
sd.DATE <- sd(c(DATE), na.rm = TRUE)
mean.DATE <- mean(DATE, na.rm = TRUE)
DATE <- (DATE - mean.DATE) / sd.DATE
# set up site covariates (habitat type, land type, number of sampling occasions)
siteCovs <- chimpanzee[ ,2:4]
# set up obs covariates (season, month)
SEASON <- chimpanzee[,109:160]
MONTH <- chimpanzee[,161:212]
obsCovs <- list(date=DATE, season=SEASON, month= MONTH)
## Now I just need to set up either an unmarkedMultFrame or unmarkedFrameOccu...
Any input would be helpful! I already ran a single-season model which worked fairly well (I think?), but I'm annoyed because I think I must be violating the closure assumption, as I know occupancy varies between the sites each month.
Thank you!
Emily