I ran three closed capture models to estimate p, c, and N in R and then used the same data set in Program MARK. All of the model averaged estimates are equal between the two methods, except for N. The model averaged estimate in R is less than half of the true model averaged estimate. I have RTFM and then RTFM, again. I can't figure out why every other estimate is equal between the two methods. N is estimated as 58, 46, and 46 in the individual models in both R and MARK, so why would R return a model averaged estimate of 23, which is lower than any of the individual model estimates?
If this should happen to catch anyone's interest to the point that they'd like to see the .inp and my MARK files, I'd be glad to share them.
Here's the code:
- Code: Select all
library(RMark)
test2<-convert.inp("C:/Documents and Settings/weganm/My Documents/tests/test2.inp")
#p.c.N
constant=mark(test2,model="Closed")
#estimate of p for final interval of time dependent models
p=constant$results$real$estimate[1]
cdot=list(formula=~1)
ctime=list(formula=~time)
pdot=list(formula=~1)
ptime.fixed=list(formula=~time,fixed=list(time=7,value=p))
Nhat=list(formula=~1)
c.ptN=mark(test2,model="Closed",model.parameters=list(c=cdot,p=ptime.fixed,N=Nhat))
ctptN=mark(test2,model="Closed",model.parameters=list(c=ctime,p=ptime.fixed,N=Nhat))
m.r.models<-collect.models()
m.r.models
p.avg<-model.average(m.r.models,"p",vcv=T)
p.avg$estimates$estimate
c.avg<-model.average(m.r.models,"c",vcv=T)
c.avg$estimates$estimate
n.avg<-model.average(m.r.models,"N",vcv=T)
n.avg$estimates$estimate