How to calculate covariate specific capture probabilities?

posts related to the RMark library, which may not be of general interest to users of 'classic' MARK

How to calculate covariate specific capture probabilities?

Postby albarros » Fri Mar 25, 2022 12:40 pm

Hi all,

I am very new to CR models and to RMark. I am using Huggins models to include individual specific covariates, and I am looking to estimate the capture probability at each occasion, modelled by a certain covariate.

So, the dataset includes 5869 individuals and two capture occasions. I have 4 categorical covariates: one with 4 levels, two with 3 levels and 1 with 2 levels. I am using a covariate approach (instead of a groups approach) and assuming a different capture probability between occasions (Mt). I was wondering if I can get the capture probability estimates for each level of these covariates.

Here is one example of the model I ran with this dataset:
[code][/code]
> head(detHist_huggins)
Location Days StudyArea FOV Type Size ch
1 C10 4 CL Open Livestock Large 11
2 C10 4 CL Open Livestock Large 11
3 C10 4 CL Open Livestock Large 11
4 C10 4 CL Open Livestock Large 11
5 C10 4 CL Open Livestock Large 11
6 C10 4 CL Open Livestock Large 11

> p_MtTypeCov <- list(formula=~time*(Wildlife+Vehicle+Human), share=TRUE) # livestock as reference
> mod_MtType_Cov <- mark(detHist_huggins, model="Huggins", model.parameters = list(p=p_MtTypeCov))

When I use > mod_MtType_Cov$results$real I get one estimate for each occasion. Is this the capture probability? Can I obtain a capture probability for each category of this covariate?

Thank you so much, and sorry if I am repeating a previously asked question, but I couldn't find the answer in the forum.

Cheers,
Ana
albarros
 
Posts: 6
Joined: Thu Jun 01, 2017 7:04 am

Re: How to calculate covariate specific capture probabilitie

Postby jlaake » Sat Mar 26, 2022 11:22 am

Use groups for categorical variables and you will get an estimate for each combination of categories in the data. Hard to tell what you are doing because formula variables don't match what you show in data snippet. RMark/MARK should fail to run if you use categorical variables in a formula unless they are used in groups especially when they are characters because it will expect them to be real (number) values in the data and you would rarely if ever treat categories as numeric. Please read the workshop notes in the link when you type library(RMark). I believe this type of problem is discussed there.
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: How to calculate covariate specific capture probabilitie

Postby albarros » Mon Mar 28, 2022 5:47 am

Thank you so much for your reply. You are right, I converted the categorical variables by coding each level with 0/1. Sorry posted the wrong dataset.

Location Days StudyArea FOV Type Size ch Livestock Wildlife Vehicle Human CL HRA Open Shrubby Road Large Medium Small
1 C10 4 CL Open Livestock Large 11 1 0 0 0 1 0 1 0 0 1 0 0
2 C10 4 CL Open Livestock Large 11 1 0 0 0 1 0 1 0 0 1 0 0
3 C10 4 CL Open Livestock Large 11 1 0 0 0 1 0 1 0 0 1 0 0
4 C10 4 CL Open Livestock Large 11 1 0 0 0 1 0 1 0 0 1 0 0
5 C10 4 CL Open Livestock Large 11 1 0 0 0 1 0 1 0 0 1 0 0

I also used the groups approach, but I thought this covariate approach would give me more flexibility to test different hypotheses. I will look into the workshop notes, but was wondering if there is some way to calculate the capture probabilities for each occasion using this approach?

Once again thank you very much!!
albarros
 
Posts: 6
Joined: Thu Jun 01, 2017 7:04 am

Re: How to calculate covariate specific capture probabilitie

Postby jlaake » Mon Mar 28, 2022 12:26 pm

Clearly you are not reading or not understanding the documentation because this is discussed in sections 6.7 and 12 of the workshop notes which you can download from the link that appears when you type library(RMark). You do not get any more flexibility using dummy variables for factor variables and as discussed in section 6.7 categorical (factor) variables should be used as groups for ease of use. If you are new at something you should be reading as much documentation as you can and trying simple examples rather than plowing ahead analyzing your data.
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: How to calculate covariate specific capture probabilitie

Postby albarros » Mon Mar 28, 2022 12:30 pm

Thank you for your reply. I am going through the documentation you recommended now and I am exploring the examples there.
albarros
 
Posts: 6
Joined: Thu Jun 01, 2017 7:04 am


Return to RMark

Who is online

Users browsing this forum: No registered users and 0 guests