Hello,
I'm working on an analysis of nest site selection as influenced by habitat variables and would love some insight on model choices.
Study design: each nest has a paired random site within 25m of the nest. Identical variables gathered at nest and random. Individual identity not considered (insufficiently marked population, so cannot assign the few repeat nests to individuals). Study includes three regions.
Question of interest: influence of habitat variables between nest site and random, allowing for random effect of region (summarize at regional population level) and individual level effect (paired nest and random site, therefore not independent).
One way I have run it is:
model{
for (r in 1:3) {
psi.reg[r] ~ dlogis(0, 1)
beta.meanTotHits[r] ~ dnorm(0, 0.001)
}
for(i in 1:n.obs){
y[i] ~ dbern(psi[i])
logit(psi[i]) <- psi.reg[region[i]] + beta.meanTotHits[region[i]]*meanTotHits[i]
}
}
- there are 3 regions, hence the psi.reg intercept
-n.obs is total observations, aka 2x number of actual nests (nest + paired random)
- habitat variable here is centered and scaled "meanTotHits" (vegetation density metric)
-this allows for intercept and slope of "meanTotHits" to vary by region
-parameters I pull to predict probability of nest site are psi.reg and beta.meanTotHits
Alternatively, allowing for random effect of individual nests:
model{
tau_region ~ dgamma(0.01, 0.01)
tau_nest ~ dgamma(0.01, 0.01)
beta.meanTotHits ~ dnorm(0, 0.001)
for (r in 1:3) {
psi.reg[r] ~ dnorm(0, tau_region)
}
for (n in 1:n.nest) {
mu_nest[n] ~ dnorm(0, tau_nest)
}
for(i in 1:n.obs){
y[i] ~ dbern(psi[i])
logit(psi[i]) <- psi.reg[region[i]] + mu_nest[NestID_num[i]] + beta.meanTotHits*meanTotHits[i]
}
}
-This is basically the same as above but NestID_num links the paired nest and random sites
Alternative 3, and what I think I was initially going for, is more of a discrete-choice model, where I would get relative probability of a site being used vs. available; in theory, this should have an inflection point in the predicted probability at p = 0.5 where there is no uncertainty, because given the choice between two sites that are identical with regards to the variable of interest, there should be no uncertainty. But I haven't gotten that outcome, and I think it's an issue which how I'm trying to include the random region effect.
model{
for (r in 1:3) {
psi.reg[r] ~ dlogis(0, 1)
beta.meanTotHits[r] ~ dnorm(0, 0.001)
}
for(i in 1:n.obs){
y[i] ~ dbern(psi[i])
used[i] <- psi.reg[region[i]] + beta.meanTotHits[region[i]]*meanTotHits.u[i]
avail[i] <- psi.reg[region[i]] + beta.meanTotHits[region[i]]*meanTotHits.a[i]
psi[i] <- exp(used[i])/(exp(used[i]) + exp(avail[i]))
}
}
-in this case, n.obs is the actual number of nests, and the data has been structured slightly differently to allow for two different vectors of meanTotHits.u and meanTotHits.a.
-when I tried running this and using psi.reg and beta.meanTotHits to make predicted probability of nest use, there was no inflection point and the results don't make sense.
Any help or insight would be appreciated!
Thank you,
Stephanie