I am currently estimating xtlogit models, and I am facing challenges with obtaining the marginal effects of my explanatory variable of interest, d1. I have tried several approaches but have not yet gotten what I think is correct.
Here's a brief overview of my model setup:
I am estimating xtlogit models with the form xtlogit y i.d1 i.d1#c.c i.d1#1.d2 i.d1#c.c#1.d2 i.d1#1.d3 i.d1#1.d3#c.c i.d1#1.d3#1.d2 i.d1#1.d3#1.d2#c.c, where d1, d2, and d3 are dummy explanatory variables, and c is a continuous explanatory variable.
My explanatory variable of interest is d1, which represents retirement status (0 for not retired, 1 for retired).
I have also generated a categorical variable c_bins, which partitions the range of values of the continuous variable c into 5 bins.
My main issue is in obtaining the marginal effects of d1. Here's what I've tried so far:
Specifying the xtlogit command with "1.d1" allows me to use the margins command, but Stata calculates marginal effects assuming d1 is a continuous variable. The upside of this scenario is that I do get marginal effects for all combinations of the values of d2, d3, and c_bins. There are 17 scenarios; 16 that I am interested in and 1 that I am not. The scenario I am not interested in is when d2 = 0, d3 = 0, and c_bins = 0.
Using "i.d1" instead of "1.d1" allows me to obtain discrete marginal effects but limits the scenarios for which Stata provides estimates. In particular, I can only get Stata to provide estimates for when d2 = 0, d3 = 0, and c_bins = 0. I am not interested in this scenario at all since c_bins being 0 corresponds to individuals not being retired.
I have been specifying the margins command as:
margins, dydx(i.d1) over(d2 d3 c_bins)
I would greatly appreciate your insights on the following:
Does my approach to estimating the marginal effects of d1 seem sensible based on my model setup?
Is there a way to obtain marginal effects for all combinations of cases when d2, d3, and c_bins vary, without assuming d1 is a continuous variable?
For context, here's what the variables represent:
d1: Dummy variable for retirement status (0 = not retired, 1 = retired).
d2: Dummy variable indicating early retirement (1 = retired earlier than planned, 0 = not retired or retired as planned).
d3: Dummy variable indicating partial retirement (1 = retired after first becoming partially retired, 0 = not fully retired or fully retired without first partially retiring).
c: Number of years since fully retiring.
c_bins: Categorical variable indicating years since retirement in 5 bins. 0 is if not retired yet. 1 is if has been retired between 0 and 3 years. 2 is if has been retired between 3 and 6 years... etc.
I would greatly appreciate any advice you can offer.
Here's a brief overview of my model setup:
I am estimating xtlogit models with the form xtlogit y i.d1 i.d1#c.c i.d1#1.d2 i.d1#c.c#1.d2 i.d1#1.d3 i.d1#1.d3#c.c i.d1#1.d3#1.d2 i.d1#1.d3#1.d2#c.c, where d1, d2, and d3 are dummy explanatory variables, and c is a continuous explanatory variable.
My explanatory variable of interest is d1, which represents retirement status (0 for not retired, 1 for retired).
I have also generated a categorical variable c_bins, which partitions the range of values of the continuous variable c into 5 bins.
My main issue is in obtaining the marginal effects of d1. Here's what I've tried so far:
Specifying the xtlogit command with "1.d1" allows me to use the margins command, but Stata calculates marginal effects assuming d1 is a continuous variable. The upside of this scenario is that I do get marginal effects for all combinations of the values of d2, d3, and c_bins. There are 17 scenarios; 16 that I am interested in and 1 that I am not. The scenario I am not interested in is when d2 = 0, d3 = 0, and c_bins = 0.
Using "i.d1" instead of "1.d1" allows me to obtain discrete marginal effects but limits the scenarios for which Stata provides estimates. In particular, I can only get Stata to provide estimates for when d2 = 0, d3 = 0, and c_bins = 0. I am not interested in this scenario at all since c_bins being 0 corresponds to individuals not being retired.
I have been specifying the margins command as:
margins, dydx(i.d1) over(d2 d3 c_bins)
I would greatly appreciate your insights on the following:
Does my approach to estimating the marginal effects of d1 seem sensible based on my model setup?
Is there a way to obtain marginal effects for all combinations of cases when d2, d3, and c_bins vary, without assuming d1 is a continuous variable?
For context, here's what the variables represent:
d1: Dummy variable for retirement status (0 = not retired, 1 = retired).
d2: Dummy variable indicating early retirement (1 = retired earlier than planned, 0 = not retired or retired as planned).
d3: Dummy variable indicating partial retirement (1 = retired after first becoming partially retired, 0 = not fully retired or fully retired without first partially retiring).
c: Number of years since fully retiring.
c_bins: Categorical variable indicating years since retirement in 5 bins. 0 is if not retired yet. 1 is if has been retired between 0 and 3 years. 2 is if has been retired between 3 and 6 years... etc.
I would greatly appreciate any advice you can offer.