Hello Statalist,
I have been going back-and-forth with the margins command for a couple of weeks, and I'm hoping someone can help me out.
I have a dependent variable that is a proportion, and I'm using a generalized estimating equation (xtgee) with a logit link (fractional proportion model). I would like to do some post-estimation commands, and have been trying to delve into the margins command. My understanding is that marginal effects are computed differently with continuous and discrete variables, but is this in reference to the dependent or independent variables (or both)? What confuses me is that my dependent variable is not binary, but uses a logit-link. I've noticed that a lot of examples online use
with probit and logit models (I'm not sure if that means anything, just something that I noticed).
So, I guess, my first question is if I use margins command with a logit-link, do I interpret the results as probabilities, even though the DV is not binary? As an example:
The unit of analysis is directed dyad year (dyad=countries) and y is asylum rate (as a proportion) and x2 is a binary variable whether the country granting asylum is a democracy (coded as 1) or not (coded as 0).
Does this read, that the probability of getting asylum is 9.6 percentage points less than in a non-democratic country?
x 3 regards if there's an election being held in the country granting asylum (binary 1=y, 0=n). So, how would the "9.6 percentage points of being less likely to be granted asylum compared to a non-democratic" read with average mean value when there is a national election (1.x3 = .0822927 (mean) and assuming I read "1.x2 | -.0963759" correctly).
(Also, I still haven't figured out what the expression "Expression : Pr(y != 0), predict()" means...)
Apologies if this question has been exhausted, I just having a hard time cracking through margins given 1) fractional logit equation 2) independent variables that are dummy variables. That being said, I'm also open to better/clearer post estimation commands given xtgee with a logit link if anyone thinks that, perhaps, margins may not be really suitable (again, not sure, but trying to keep an open-mind). Thank you in advance for any help.
I have been going back-and-forth with the margins command for a couple of weeks, and I'm hoping someone can help me out.
I have a dependent variable that is a proportion, and I'm using a generalized estimating equation (xtgee) with a logit link (fractional proportion model). I would like to do some post-estimation commands, and have been trying to delve into the margins command. My understanding is that marginal effects are computed differently with continuous and discrete variables, but is this in reference to the dependent or independent variables (or both)? What confuses me is that my dependent variable is not binary, but uses a logit-link. I've noticed that a lot of examples online use
Code:
margins dyex
So, I guess, my first question is if I use margins command with a logit-link, do I interpret the results as probabilities, even though the DV is not binary? As an example:
Code:
xtgee y x1 i.x2 i.x3, family(binomial 1) link(logit) corr(exchangeable) vce(robust) Iteration 1: tolerance = .17098922 Iteration 2: tolerance = .00279107 Iteration 3: tolerance = .00019978 Iteration 4: tolerance = .00001054 Iteration 5: tolerance = 5.749e-07 GEE population-averaged model Number of obs = 37318 Group variable: dyad Number of groups = 6416 Link: logit Obs per group: min = 1 Family: binomial avg = 5.8 Correlation: exchangeable max = 12 Wald chi2(3) = 184.71 Scale parameter: 1 Prob > chi2 = 0.0000 (Std. Err. adjusted for clustering on dyad) ------------------------------------------------------------------------------ | Robust y | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- x1 | -.0404904 .0055453 -7.30 0.000 -.0513589 -.0296219 1.x2 | -.5259211 .0511197 -10.29 0.000 -.6261138 -.4257283 1.x3 | .0621003 .0310888 2.00 0.046 .0011673 .1230333 _cons | -.7179048 .0466042 -15.40 0.000 -.8092474 -.6265622 ------------------------------------------------------------------------------
Code:
margins, dydx(*) atmeans Conditional marginal effects Number of obs = 37318 Model VCE : Robust Expression : Pr(y != 0), predict() dy/dx w.r.t. : x1 1.x2 1.x3 at : x1 = 4.091095 (mean) 0.x2 = .1331797 (mean) 1.x2 = .8668203 (mean) 0.x3 = .9177073 (mean) 1.x3 = .0822927 (mean) ------------------------------------------------------------------------------ | Delta-method | dy/dx Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- x1 | -.0066807 .000908 -7.36 0.000 -.0084604 -.0049011 1.x2 | -.0963759 .0101107 -9.53 0.000 -.1161925 -.0765594 1.x3 | .0104013 .0052827 1.97 0.049 .0000474 .0207552 ------------------------------------------------------------------------------ Note: dy/dx for factor levels is the discrete change from the base level.
Does this read, that the probability of getting asylum is 9.6 percentage points less than in a non-democratic country?
x 3 regards if there's an election being held in the country granting asylum (binary 1=y, 0=n). So, how would the "9.6 percentage points of being less likely to be granted asylum compared to a non-democratic" read with average mean value when there is a national election (1.x3 = .0822927 (mean) and assuming I read "1.x2 | -.0963759" correctly).
(Also, I still haven't figured out what the expression "Expression : Pr(y != 0), predict()" means...)
Apologies if this question has been exhausted, I just having a hard time cracking through margins given 1) fractional logit equation 2) independent variables that are dummy variables. That being said, I'm also open to better/clearer post estimation commands given xtgee with a logit link if anyone thinks that, perhaps, margins may not be really suitable (again, not sure, but trying to keep an open-mind). Thank you in advance for any help.
Comment