Hi,
I am running a logit model at the patient level with outcome=whether or not a participant entered into a certain program. The model has patient and PCP-level characteristics as predictors and is clustered at the PCP level. As part of my analysis, I had a model that included an interaction term between Practice (each patient is in one of 30+ practices) and a dummy indicating whether the patient was older than 85. Then I obtained marginal estimates on the interaction term between practice and the age dummy to get marginal estimates for each practice of the chances of going into the program with and without the age condition.
In order to justify using this model, I tried running a full interaction model, interacting every predictor with the age dummy and running an LR test. The LR test was significant, indicating that the additional interaction terms did add predictive capacity to the model. Thus, I tried to obtain the marginal estimates for the interaction term from the full interaction model; however, every single practice/age 85+=yes combo had "not estimable".
I noticed that when I ran the full interaction model, 2 variables fell out of the model (or rather, one variable fell out of the model, but for the other only one level of the categorical variable fell out). I tried re-running the full interaction model again without those variables and this time, was able to obtain marginal estimates.
I'd like to understand exactly why the margins command won't run correctly unless the two variables that fell out of the full interaction model were excluded. Relevant portions of my code and output are attached, but I can probably provide more if need be.
Thanks!
I am running a logit model at the patient level with outcome=whether or not a participant entered into a certain program. The model has patient and PCP-level characteristics as predictors and is clustered at the PCP level. As part of my analysis, I had a model that included an interaction term between Practice (each patient is in one of 30+ practices) and a dummy indicating whether the patient was older than 85. Then I obtained marginal estimates on the interaction term between practice and the age dummy to get marginal estimates for each practice of the chances of going into the program with and without the age condition.
In order to justify using this model, I tried running a full interaction model, interacting every predictor with the age dummy and running an LR test. The LR test was significant, indicating that the additional interaction terms did add predictive capacity to the model. Thus, I tried to obtain the marginal estimates for the interaction term from the full interaction model; however, every single practice/age 85+=yes combo had "not estimable".
I noticed that when I ran the full interaction model, 2 variables fell out of the model (or rather, one variable fell out of the model, but for the other only one level of the categorical variable fell out). I tried re-running the full interaction model again without those variables and this time, was able to obtain marginal estimates.
I'd like to understand exactly why the margins command won't run correctly unless the two variables that fell out of the full interaction model were excluded. Relevant portions of my code and output are attached, but I can probably provide more if need be.
Thanks!
Comment