Subset mark.list

Hello,
I'm fitting multistate CMR models in RMark to estimate seasonal mortality of marked individuals based on live-recaptures and dead recoveries following the approach of Gauthier and Lebreton (2008). This method fixes survival parameters so that transition probabilities from live states to dead states become mortality probabilities. I have 2114 individuals in the analysis that covers 20 intervals (10 years; each year has a breeding and non-breeding season). I'm fitting 420 models comprising combinations of detection and psi formulas using the approach in the RMark appendix (i.e., create.model.list followed by mark.wrapper). Everything is working at this point, except that my likelihoods commonly get 'hung-up' in a local minima when fitted. I've started using simulated annealing and that helps immensely, but I still end up having to fit some models more than once to get beyond the local minima. I would like to subset the mark.list results from the model fitting function based on deviances so I can select models that need to be re-fit based on being in a local minima and then (possibly) use 'initial' to provide starting values from the initial model fitting to help the likelihood move beyond the local minima. Long story short, I can't figure out how to successfully subset mark.list in a way that allows me to maintain the subset as a mark.list (and not just a mark.list$model.table) so I can fit the subset of models and provide the initial subset results as starting values.
A bit of script to help explain:
Code: Select all
From here I'd like to subset the mark.list 'lesc.models.results' based on the models identified in the 're.fit' object and run the model fitting function again based on the subsetted list of models using 'initial' to provide starting values.
Any help would be greatly appreciated.
I'm fitting multistate CMR models in RMark to estimate seasonal mortality of marked individuals based on live-recaptures and dead recoveries following the approach of Gauthier and Lebreton (2008). This method fixes survival parameters so that transition probabilities from live states to dead states become mortality probabilities. I have 2114 individuals in the analysis that covers 20 intervals (10 years; each year has a breeding and non-breeding season). I'm fitting 420 models comprising combinations of detection and psi formulas using the approach in the RMark appendix (i.e., create.model.list followed by mark.wrapper). Everything is working at this point, except that my likelihoods commonly get 'hung-up' in a local minima when fitted. I've started using simulated annealing and that helps immensely, but I still end up having to fit some models more than once to get beyond the local minima. I would like to subset the mark.list results from the model fitting function based on deviances so I can select models that need to be re-fit based on being in a local minima and then (possibly) use 'initial' to provide starting values from the initial model fitting to help the likelihood move beyond the local minima. Long story short, I can't figure out how to successfully subset mark.list in a way that allows me to maintain the subset as a mark.list (and not just a mark.list$model.table) so I can fit the subset of models and provide the initial subset results as starting values.
A bit of script to help explain:
Code: Select all
- Code: Select all
lesc.models<-function()
{...formula statements for S [fixed], Psi, and p here...
cml<-create.model.list("Multistrata")
results<-mark.wrapper(cml, data=lesc.process, ddl=lesc.ddl, parm.specific=T, output=F, options="SIMANNEAL")
return(results)
}
#Run the function to create the models and store the results in lesc.model.results, which is a marklist
lesc.models.results <- lesc.models()
#Identify the models in the mark.list model.table based on deviance values
re.fit <- as.numeric(row.names(lesc.models.results$model.table[lesc.models.results$model.table$Deviance>7000,]))
From here I'd like to subset the mark.list 'lesc.models.results' based on the models identified in the 're.fit' object and run the model fitting function again based on the subsetted list of models using 'initial' to provide starting values.
Any help would be greatly appreciated.