Hey Bryan,
Other people can jump in if I am wrong, but I believe in a perfect world the staggered site-entry you describe should not bias your parameter estimates. That being said, I imagine that if there is substantial amount of variation in detection or survival among sites and across time that is not being adequately accounted for with your model, you may observed the patterns you are describing.
Here is a little code that I had lying around that may help you come to a resolution about what is going on under the hood. As it stands, this simulates a capture history based on two sites, one of which entering in at the third year. The sim.data dataframe can be sent directly to rmark, or you can make a few modifications and export it into mark. I haven't spent too much time with it, but I was getting estimates that were in the ballpark for the few scenarios I cooked up.
-Dan
- Code: Select all
library(RMark)
rm(list=ls())
#simulate CJS data for 1 group
simul.cjs<-function(phi,p,marked)
{
n.occasions<-length(p)+1
Phi<-matrix(phi,n.occasions-1,nrow=sum(marked),byrow=T)
P<-matrix(p,n.occasions-1,nrow=sum(marked),byrow=T)
#n.occasions<-dim(Phi)[2]+1
CH<-matrix(0,ncol=n.occasions,nrow=sum(marked))
#define a vector with marking occasion
mark.occ<-rep(1:length(marked),marked[1:length(marked)])
#fill in CH
for (i in 1:sum(marked))
{
CH[i,mark.occ[i]]<-1
if (mark.occ[i]==n.occasions) next
for(t in (mark.occ[i]+1):n.occasions)
{
#survive?
sur<-rbinom(1,1,Phi[i,t-1])
if(sur==0) break #move to next
#recaptured?
rp<-rbinom(1,1,P[i,t-1])
if(rp==1) CH[i,t]<-1
} #t
} #i
return(CH)
}
###function to create capture history character strings (need for input to RMARK)
pasty<-function(x)
{
k<-ncol(x)
n<-nrow(x)
out<-array(dim=n)
for (i in 1:n)
{
out[i]<-paste(x[i,],collapse="")
}
return(out)
}
#call simulation for a 2-group example
n.occasions<-10
marked.1<-rep(50,n.occasions-1) #Release individuals for first site
marked.2<-c(0,0,rep(50, n.occasions-3)) #Release individuals for second site starting in year 3
phi.1<-rep(0.8,n.occasions-1) #Mean phi for site 1
phi.2<-c(0,0,rep(.6, n.occasions-3)) #Mean phi for site 2
p.1<-rep(0.4,n.occasions-1) #Mean p for site 1
p.2<-c(1,1,rep(.4, n.occasions-3)) #Mean p for site 2
sim.1<-simul.cjs(phi.1,p.1,marked.1)
sim.2<-simul.cjs(phi.2,p.2,marked.2)
#put togther in format needed for RMark
first.hist<-data.frame(ch=pasty(sim.1),Site="A")
second.hist<-data.frame(ch=pasty(sim.2),Site="B")
sim.data<-rbind(first.hist,second.hist)
sim.processed=process.data(sim.data,model="CJS",groups="Site")
sim.ddl=make.design.data(sim.processed)