individual covariates in secr 1.4.0

questions concerning anlysis/theory using program DENSITY and R package secr. Focus on spatially-explicit analysis.

individual covariates in secr 1.4.0

Postby bdt » Thu Jun 10, 2010 2:07 pm

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
bdt
 
Posts: 8
Joined: Wed Jun 09, 2010 2:51 pm

Re: individual covariates in secr 1.4.0

Postby murray.efford » Thu Jun 10, 2010 5:52 pm

Brian
I think this might be just a simple misunderstanding - individual covariates are available only when you use the conditional likelihood fitting option (CL = TRUE in secr.fit). Use derived() to obtain density (D) from the fitted model. This is analogous to fitting a Huggins model in conventional capture-recapture. You might also treat sex as a group (g) and use the groups argument to identify sex as the grouping covariate in a full-likelihood model.
Murray
murray.efford
 
Posts: 686
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Re: individual covariates in secr 1.4.0

Postby bdt » Thu Jun 10, 2010 6:34 pm

Murray,
Yes, I overlooked the conditional likelihood option. The models with individual covariates are working now. Thank you for identifying my oversight.
Brian
bdt
 
Posts: 8
Joined: Wed Jun 09, 2010 2:51 pm


Return to analysis help

Who is online

Users browsing this forum: No registered users and 10 guests