I'm new to the group, and although I have searched to find an answer to this question, I haven't been able to do so (I apologize if I've overlooked this somewhere).
In short, I have a study with 3 visits to 45 sites (20 in habitat A and 25 in habitat B). I want to compare Prothonotary Warbler density between the two habitats, and adjust for visit-level covariates (observer and wind, for starters). I am using three distance bins: 0-25, 26-50, and 51-100 m.
In trying to build the unmarkedFrameGDS, I am running into issues, particularly associated with yearlySiteCovs. The code below seems to be
y <- PROW.GDISTSAMP[,2:10] # columns 2-10 contain observations in 3 distance intervals from 3 survey periods
breaks <- c(25,50,100)
R <- 45 # survey points
T <- 3 # number of survey visits
# site-level covariates
covs <- data.frame(habitat=PROW.GDISTSAMP[,11]) # Habitat A vs Habitat B
# survey-level covariates: called "yearlySiteCovs" in this R package
wind1 <- PROW.GDISTSAMP[,12]
wind1.f <- as.factor(wind1)
wind2 <- PROW.GDISTSAMP[,13]
wind2.f <- as.factor(wind2)
wind3 <- PROW.GDISTSAMP[,14]
wind3.f <- as.factor(wind3)
wind.df <- data.frame(wind1.f, wind2.f, wind3.f)
surveyor1 <- PROW.GDISTSAMP[,15]
surveyor1.f <- as.factor(surveyor1)
surveyor2 <- PROW.GDISTSAMP[,16]
surveyor2.f <- as.factor(surveyor2)
surveyor3 <- PROW.GDISTSAMP[,17]
surveyor3.f <- as.factor(surveyor3)
surveyor.df <- data.frame(surveyor1.f, surveyor2.f, surveyor3.f)
# Organize data into an Unmarked Data frame for Generalized Distance Sampling
umf <- unmarkedFrameGDS(y=y, siteCovs=covs, yearlySiteCovs=list(Obs=surveyor.df, Wind=wind.df), survey="point", unitsIn="m", dist.breaks=breaks, numPrimary=T)
in viewing "umf" it appears that the survey-level covariates have been duplicated (6 columns for Wind and 6 columns for Observer, whereas there should be three each, i.e., one for each of three site visits).