Hi there,
Has anyone else been thinking about this issue recently?
My goal is to use POPAN models to evaluate whether abundance [of bumble bee nests, which are hard to detect] differs among sites, years, and species [there are about 80 species of bumble bees in the US!  and two common ones in our study area].  I was getting confusing estimates for "N", which this thread clarified. 
It is clear from this post and my output that the models for "N" (which I thought was population size) are really the models for "f0", the number of undetected nests.  Is there a way (other than examining confidence intervals of derived parameters) to compare models with and without differences in population size?
In case it helps, I'll post a simplified version of the code that inspired me to search this forum.  The comments are from before I read this thread, with lots of questions about "what is N"? 

Thanks!!
Elizabeth
My code:
- Code: Select all
- rm(list = ls(all= T)) #clears environment
 
 library(RMark)
 
 dat<-read.csv("bumble_nests_simple.csv", colClasses = c("character", "factor")) #import capture histories and keep the leading zeroes
 table(dat$ch)
 summary(dat)
 bees.processed <- process.data(dat, model = "POPAN", groups = c("year"), begin.time = 0, time.intervals = rep(1,4))
 
 bees.processed$group.covariates
 bees.ddl <- make.design.data(bees.processed)
 bees.ddl
 
 
 
 ################################################
 # model exploration ############################
 ################################################
 
 # simple models for survival and abundance differ among years
 Phi.dot = list(formula = ~1)
 Phi.year = list(formula = ~0+year)
 N.dot = list(formula = ~1)
 N.year = list(formula = ~0+year)
 
 # constant detection probability
 p.dot = list(formula = ~1)
 
 # The most sensible model for entry is that there is no recruitment during the survey period
 # surveys started after colonies were established
 pent.dot = list(formula = ~1, fixed = 0)
 
 # this code creates all possible combinations of possible predictors of survival, abundance and capture probability
 # it's a little silly to use here (there are only 4 possible combinations!), but it works
 bees.model = create.model.list("POPAN")
 
 # this code runs those models
 bees.results = mark.wrapper(bees.model, data = bees.processed, ddl = bees.ddl)
 
 bees.results
 # the 2nd-best model illustrates some of the difficulties in parameter interpretation
 bees.fit = bees.results$Phi.year.p.dot.pent.dot.N.year
 
 # the "real" (back-transformed) results generally make sense in relation to the data
 bees.fit$results$real # these numbers makes sense; both of the population estimates are slightly higher than the number we saw (9 observed vs. N = 14.7 in 2020, and 20 observed vs. N = 23.8 in 2023)
 # also survival numbers are sensible - we observed fewer nests in late surveys in 2020 (possibly they senesced early due to drought)
 
 # BUT the N's from the beta estimates do _not_ make sense
 bees.fit$results$beta
 bees.fit$links # verifying link functions
 # back-transforming survival
 plogis(c(0.3, 2.25)) # these numbers are exactly the same as consistent with the data and $real estimates
 # back-transforming N, the number of nests - this does not make sense
 exp(c(1.74, 1.34)) # why are these numbers much lower than the back-transformed $real estimate? and also much lower than our counts in each year?
 
 
 # I also find it weird that the gross population size is the same for all models
 # weird in the sense that I can't tell where this is coming from in the model parameterization
 # I feel like it should be constant in the complete "null" model
 popan.derived(bees.processed, bees.results$Phi.year.p.dot.pent.dot.N.year)$NGross
 popan.derived(bees.processed, bees.results$Phi.year.p.dot.pent.dot.N.dot)$NGross
 popan.derived(bees.processed, bees.results$Phi.dot.p.dot.pent.dot.N.year)$NGross
 popan.derived(bees.processed, bees.results$Phi.dot.p.dot.pent.dot.N.dot)$NGross
 
and data for running it:
- Code: Select all
- ch   year
 10000   2020
 11100   2020
 10100   2020
 10000   2020
 10000   2020
 10000   2020
 10100   2020
 00100   2020
 00100   2020
 10100   2023
 10011   2023
 00100   2023
 10000   2023
 10010   2023
 01010   2023
 10001   2023
 01100   2023
 10001   2023
 01000   2023
 10000   2023
 11011   2023
 00100   2023
 00100   2023
 01010   2023
 11000   2023
 01000   2023
 10110   2023
 01111   2023
 00100   2023