First I am sorry for my English.

I am, only until recently, working on the RMark package to calculate the survival of birds. I have little trouble to understand the documentation on it. I followed (and I think understandood) the steps of the “Workshop notes” (see below) because I want to compare several models. This gives me satisfactory results. But I want to improve some things.
First I would like that the function does not return phi for all sites but an average, but still integrate the effect of the site in the models for p. Is it possible ?
Then I want to put the effect of site in random effect, but I do not understand how to do this. Is this possible with this function ?
Thank you in advance

- Code: Select all
TURMER.proc <- process.data (TURMER, model="CJS", begin.time=1989, groups= c("sexe","espece","site"))
TURMER.ddl<-make.design.data(TURMER.proc)
# Creation de la fonction do.analysis
do.analysis<-function(data.proc,data.ddl) {
Phi.Time=list(formula=~Time)
p.dot=list(formula=~1)
p.sexe=list(formula=~sexe)
p.sexe.espece=list(formula=~espece+sexe)
p.sexe.iespece=list(formula=~sexe*espece)
p.sexe.site=list(formula=~site+sexe)
p.sexe.espece.site=list(formula=~espece+sexe+site)
p.sexe.iespece.site=list(formula=~espece*sexe+site)
cml<-create.model.list("CJS")
model.list<-mark.wrapper(cml,data=data.proc,ddl=data.ddl)
return(model.list)
}
results_TURMER<-do.analysis(TURMER.proc,TURMER.ddl)