I am working on a research project on killerwhales. My data are based on a 10 year photo ID monitoring program, based on opportunistic observation from fisheries (non regular time interval). I have temporary migration and I am consequently using a Robust design. Unfortunatly I have some issues with the data formating of individual time varying covariates. I want to add my level of marking as a covariates for p because it is is changing depending of the year ( new scarf on the dorsal fin for example).

I added it to my database before processing it. I obtain this database with different Mk for each individuals by occasion (Mk1, Mk2,....Mk102) ,following the trap dependance individual covariates example.

Then I prepare my database FD

- Code: Select all
`time.intervals<-c(0,3,0,0,5,0,0,0,5,0,0,8,0,0,5,0,0,0,0,0,0,0,1,`

0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,3,0,0,0,4,

0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,

M.proc<-process.data(FD,model="Robust", time.intervals=time.intervals)

design.p=list(time.varying=c("Mk"))

design.parameters=list(p=design.p)

M.ddl=make.design.data(M.proc,parameter=design.parameters)

p.effort2.ind<-list(formula=~Mk, share=TRUE)

model.2.ind=mark(M.proc,M.ddl, model = "Robust",

time.intervals=time.intervals,

design.parameters = design.parameters,

model.parameters=list(S=list(formula=~1),

GammaDoublePrime=list(formula=~1),

p=p.effort2.ind),threads=2)

And I got this erros message:

- Code: Select all
`Error in make.mark.model(data.proc, title = title, parameters = model.parameters, :`

The following individual covariates are not allowed because they are factor variables: Mk1,Mk4,Mk9,Mk14,Mk22,Mk27,Mk28,Mk29,Mk32,Mk36,Mk37,Mk38,Mk39,Mk41,Mk43,Mk45

Error in mark(M.proc, M.ddl, model = "Robust", time.intervals = time.intervals, :

Misspecification of model or internal error in code

Indeed this number are used as session factors when I'm looking in M.design.

I was trying to change the indexation of Mk, but I didn't find any that is recognised when I run my model.

- Code: Select all
`Error in make.mark.model(data.proc, title = title, parameters = model.parameters, :`

Error: Variable Mk used in formula is not defined in data

Error in mark(M.proc, M.ddl, model = "Robust", time.intervals = time.intervals, :

Misspecification of model or internal error in code

Do you have any idea of how I label my covariates to be able to run it ?

Regards