Forcing a covariate on only one level of a binary covariable

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

Forcing a covariate on only one level of a binary covariable

Postby SteffenMink » Mon Jun 03, 2019 9:24 am

Hello Guys
I have a question and maybe it was already asked, but I don't know exactly how to formulate it. And so, I couldn't find any similar question.

I am working for my master thesis with Snow Voles (Chinomys nivals). I have a dataframe of captured individuals from the last 13 years, and sampling occasion were once in early summer and once in late summer. I am estimating summer and winter survival, and the estimates will be used in a Two-Season-Population-Projection-Matrix. I am working with a multistate model. I have different environmental covariates like mean temperature over the season, amount of days with a certain snow cover depth and so on.
My model looks like: S~(sex:age:season + environment + environment:season). Sex (M,F), age (J,A) and Season (summer,winter) are all binary variables. Environment is a numeric variable (most of the times).

My issue I have now is the fact, that I assume to have environmental covariates, that only affect the summer survival rate or only winter survival rate. For example the Mean temperature of June might only influence the summer survival rate, but has no/barley an effect on winter survival rate. The same might be for number of avalanches which seems to have an influence on winter survival rate but not on summer.

S~(sex:age:season + environment + environment:season)
In this model, I try to distinguish between the effect of the environment covariate on summer and on winter. But I wish to force it in a way, that this special environment has an interaction with only summer.

It should look like: S~(sex:age:season + environment + environment:Season(Summer))
But I have no idea how to describe it like that.

I hope somebody can help me.
Thanks,

Steffen
SteffenMink
 
Posts: 2
Joined: Mon Jun 03, 2019 5:05 am

Re: Forcing a covariate on only one level of a binary covari

Postby jlaake » Mon Jun 03, 2019 10:35 am

Steffen

From your notation it appears that you are using RMsrk. If that is the case, this should have been posted to that subforum of MARK.

I believe this issue is discussed in the workshop notes and has been addressed before several times in the RMark list. To do what you want, define a variable in the design data for the specific parameter like survival. It should be zero except for the rows specific to the season for that environment variable. Then use ind:var in the formula where ind is the 0/1 variable you defined and var is your environment covariate.
jlaake
 
Posts: 1417
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Forcing a covariate on only one level of a binary covari

Postby SteffenMink » Tue Jun 04, 2019 7:34 am

Ouh sorry for taking the wrong forum. My supervisor told me I had to be careful where I am going to ask, and it seems like I chose the wrong one :roll: :lol:
Nevertheless, thank you very much for the quick and useful response. I added two columns to the ddl (Summer and Winter) with level 1 and 0. I used them in the formula and I got a better AIC than in the previous models.
Thanks a lot.
SteffenMink
 
Posts: 2
Joined: Mon Jun 03, 2019 5:05 am


Return to RMark

Who is online

Users browsing this forum: No registered users and 11 guests