Hi,
I’m running secr 1.4.0 in R 2.11.1 on Windows XP and I’m having trouble including individual covariates in the model argument for secr.fit. To eliminate the possibility of data entry errors, I also ran models using the “housemouse” data. As with my data set, models without individual covariates ran fine; however, the following did not:
>secr.fit(housemouse,model=list(D~1, g0~sex, sigma~1), detectfn=0)
Checking data
Preparing detection design matrices
Error in secr.design.MS(capthist, model, timecov, sessioncov, groups, :
Covariate(s) sex not found
I also tried alternative model statements such as g0~covariates(housemouse)$sex.
From examining the function “serc.design.MS”, it appears that the function “findvars.MS” is not finding the covariate “sex” in object “vars”. As with my data, str(capthist) indicates that the covariate was incorporated into the capture history object and because covariates(capthist) returns the proper covariate values, I’m assuming that the object zcov (in serc.design.MS) was properly assigned.
I searched for further details and examples but found no solution.
Any suggestions?
Thank you,
Brian