Greg
This is a known blindspot in 'secr', and I haven't a complete solution, I'm sorry. So that we're on the same wavelength, I concocted an example by extending the built-in dataset captdata.
- Code: Select all
## make up some ages and fit model
randomages <- sample(c('J','A'), size = 76, replace = TRUE)
covariates(captdata) <- data.frame(ageclass = randomages)
secrdemo.CL.age <- secr.fit(captdata, model = g0~ageclass, CL = TRUE)
# Horvitz-Thompson-like estimates for each ageclass
> derived(secrdemo.CL.age, se.esa = TRUE, groups = 'ageclass')
$A
estimate SE.estimate lcl ucl CVn CVa CVD
esa 14.14379 0.4376568 13.311684 15.027908 NA NA NA
D 2.33318 0.4125212 1.654272 3.290709 0.1740777 0.03094329 0.1768064
$J
estimate SE.estimate lcl ucl CVn CVa CVD
esa 13.696891 0.3897986 12.953963 14.482428 NA NA NA
D 3.139399 0.4870190 2.320506 4.247273 0.1524986 0.02845882 0.1551313
So far so good: we have an estimate of the effective sampling area (esa) or each ageclass under the ageclass model, and an indication of its (small) contribution to the overall CVD (CVa = SE(esa-hat)/esa-hat). However, I'm not clear on what should happen next, which is why it hasn't appeared as an option in the package! model.average() works only for real parameters (which are not group-specific - see code snippet below) and for beta parameters common to all models. Unfortunately that means you have to do the model averaging and H-T estimates by hand. It should be possible to automate this once I figure out the right way. There has been some useful discussion of model averaging on the MARK and Presence forums - they're worth searching, and someone else may have some advice.
Of course, separate full or CL models for the two groups are feasible, depending on sample size, as is a non-averaged 2-group model (see above). I think I would look hard at the AIC table and probably go for the latter (averaging is attractive but maybe not necessary).
Murray
- Code: Select all
## model-averaged real parameters
MA <- model.average(secrdemo.CL, secrdemo.CL.age)
MA
estimate SE.estimate lcl ucl
g0 0.2865205 0.0375354 0.2188776 0.3652919
sigma 29.3849996 1.3080058 26.9311659 32.0624144
esa(secrdemo.CL.age, real = MA[,1])[1]
[1] 13.98377