by RJDan » Mon Mar 10, 2014 3:16 am
Hey
Thanks for the reply!
RMark has two functions; create.model.list() and mark.wrapper() which can be used to run a set of models using a set of parameter specifications without having to specify the exact combination of parameter settings for each model.
For example, instead of running a model using:
### Preping data
newdipper.proc<-process.data(newdipper, model="CJS", groups="sex", begin.time=1990)
newdipper.ddl<-make.design.data(newdipper.proc)
### Specifying parameters using formulae
Phi.dot=list(formula=~1)
p.dot=list(formula=~1)
### Running the model
modela<-mark(newdipper.proc,newdipper.ddl, model.parameters=list(Phi=Phi.dot, p=p.dot))
You could create a list of the model parameter specifications and then use create.model.list to create combinations of Phi and p parameter specifications, each of which would be used for a single model.
# Define range of models for Phi
#
Phi.dot=list(formula=~1)
Phi.time=list(formula=~time)
Phi.sex=list(formula=~sex)
Phi.Flood=list(formula=~Flood)
#
# Define range of models for p
#
p.dot=list(formula=~1)
p.time=list(formula=~time)
p.Flood=list(formula=~Flood)
#
# Run all pairings of models
#
dipper.model.list=create.model.list("CJS")
dipper.results=mark.wrapper(dipper.model.list,
data=dipper.processed,ddl=dipper.ddl)
I hope this makes sense (?).