I am using a Panel Data with two waves and I have a year dummy indicator for the second year: y.2017. I am using an RE-Logit model with a binary dependent variable for political participation.

My question:
If I want to estimate the predicted probabilities of participation for females and males in the first year (y2017=0) , which of these commands should I use?
Code:
margins female,  at(y2017=0)
Code:
margins female if y.2017==0
From my understanding, the first code uses all my observations, no matter if they are in 2013 or 2017, assumes it was 2013, and then predicts participation for females and males ?
And the second one only uses observations from 2013. I'm guessing I should use the first ?

I used the following command to estimate the average changes in predicted probabilities between the two years:
Code:
margins female, dydx(y2017)
If I want to analyse the gender-gap in each year and also the change in the gender gap, how would I incorporate that ?
Is this command correct ? :
Code:
margins, dydx(female) at(y2017=(0 1))
I did read up about Margins here: http://www.stata-journal.com/article...article=st0260 However, I am still not sure how to incorporate my year dummy correctly.