Thank you in advance for your response. I am trying to organize my data into an unmarkedMultFrame.
I can succesfully create the unmarkedMultFrame, but when I try to run a simple model, such as:
fm0 <- colext(~1, ~1, ~1, ~1, umf)
I get the following error message:
Error in data.frame(..., check.names = FALSE) :
arguments imply differing number of rows: 1695, 0
Here is some basic info about my study:
number of sites = 91
number of visits per season = 3
number of seasons = 12
In my study, I had 91 unique sites, which I visited 3 times over the course of 6 rounds during the spring of two years 2013-2014.
I am treating each round of sampling as a separate season, so I have 12 seasons total, if I stack the data.
In my attached .csv, each row corresponds to a site, and includes a detection history that is 3 digits long, corresponding to the 3 surveys I performed at that site during that season.
I think my problem is in the obsCovs portion of the umf data frame. If I surveyed a site during a season, I surveyed it 3 times, so I have observation level covariates (e.g. noise level at time of survey) corresponding to each of the zeroes and ones of the detection history. However, I examined the umf data frame in R and I think it is reading each of the three ObsCovs as a separate row (1695 rows instead of 565 rows).
Here is a sample of my code:
library(unmarked)
smbdata <- read.csv("smbdata.csv", header=TRUE)
SORAy <- smbdata[,5:7]
siteCovs <- smbdata[,c(29:42)]
years <- smbdata[,c(2:4)]
obsCovs <- list(Obs=smbdata[,c(14:16)], Start=smbdata[,c(17:19)],
Sky=smbdata[,c(20:22)], Wind=smbdata[,c(23:25)],
Noise=smbdata[,c(26:28)])
SORA <- unmarkedMultFrame(y=SORAy,
siteCovs=siteCovs, yearlySiteCovs=years,
obsCovs=obsCovs,
numPrimary=12)
fm0 <- colext(~1, ~1, ~1, ~1, SORA)
Again, thank you in advance for your response. I'm sorry if this doesn't make a lot of sense, but I'm attempting a space-for-time analysis, but I think I really have a space-AND-time situation. In summary, my main questions are:
1) Have formatted my umf data frame correctly, given my sampling format of 3 surveys per site per season?
2) Do I need to include rows of all NAs for the sites that were not visited at all in a given round?
3) Have I correctly identified my primary and secondary sampling periods? My current understanding is that I have 12 primary and 3 secondary.