No announcement yet.
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stratifying after multiple imputation


    I have estimated a full regression model after conducting a multiple imputation. My outcome is dichotomous (delivery) and one of my predictors is race. I would like to estimate a full regression model stratifying by race, but am unable to find the code that will do this. I have searched the forum and Stata help as suggested and have not come up with anything. I prefer to use stratification rather than interaction terms.

    Any suggestions would be greatly appreciated.

    My apologies in advance if this is too elementary of a question. I am a doctoral candidate so am somewhat inexperienced.

    Thank you in advance. Am looking forward to assistance since time is of the essence!


  • #2
    welcome to this forum.
    Including -i.race- or imposing an -if- condition would probably do the trick.
    Eventually, two asides, both covered in FAQ:
    - your chances of getting more helpful replies are conditional on posting what you typed and what Stata gave you back;
    - highlighting the urgency of your post (which, as always, is original poster's business) often decreases the likelihood for your query to be replied.
    Kind regards,
    (Stata 15.1 SE)


    • #3
      Does race contain missing values in the original dataset? If not, just impute by(race) then impose the if conditions in mi estimate, as Carlo suggests. Also as Carlo suggests, show us the code that you have used.



      • #4
        Thank you Carlo and Daniel. My apologies for not including the original code... the crux of the problem is that I'm not quite sure how to write up my code to stratify by race after the MI has been conducted (since I would like to use the full dataset).

        Race did not contain any missing values and was not one of the imputed variables. For my original full regression model, I ran 35 imputations using the following code:

        mi estimate, dots or: logistic deliverytype i.age i.race i.marital .... i.x
        I then sorted by race and attempted to use an -if- condition, but am unable to figure out the proper code. As an example, I used the following code, but I have tried placing the -if- condition in various positions with no result.

        mi estimate, dots or by (race): logistic deliverytype i.age i.marital .... i.x
        Each time I receive the following error:

        option by(race) not allowed
        Appreciative of the help,