I am analysing capture recapture data from a study with bats, with a main purpose to determine the influence of individual asymmetry (Left-Right forearm length) in survival probability. We have 904 marked individuals over a period of two years and 10 capture sessions.

I have been using the package marked for a while with smaller similar data sets and find it excellent. Lately, I have stumbled on some errors (certainly due to my inexperience with the package) and would like to ask for some help. In my study, I found that the model with by far the best fit has the following parameters = Phi=list(formula=~cohort+time+AF+Sex),p=list(formula=~Sex+time). I am having a difficulty predicting values to estimate Phi and p with the following commands:

- Code: Select all
`> newaf<-expand.grid(Sexo=c("F","M"),AF=seq(0,1,by=0.01))`

> mr.asy.pred<-predict(mrasy.crm,newdata=newaf,se=TRUE)

Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) :

contrasts can be applied only to factors with 2 or more levels

I was wondering if the error above has something to do with the fact that there are missing interactions, such as no females in cohort 6, or it could be caused by something else. I get no error if cohort is left out of the model.

A second related question is that it might be better to create bins and group cohorts according to season. I could not find an example in the documentation on how to define the bins and would greatly appreciate any tips that might help.

Thanks a lot for the attention.

Leandro