Dear Statalisters,

It is my first time posting here, and I don’t have an Econ background!
For context, I am doing something similar to interrupted time series methods on household panel data.
The dataset contains monthly household purchases, and I have >2,000 households over three years. The panel is unbalanced.

My outcome is binary (0=non-buyer, 1=buyer), and my outcome is also binary (0=18 months before implementing a policy, 1=18 months after). I’ve been using xtlogit to construct the counterfactual (extrapolate the pre trends into the post-policy period), and I’ve been comparing the differences between RE and FE specifications.

To predict the counterfactual for the xtlogit RE model, I used “predict” and the pr option because it estimates the marginal probability of a positive outcome. I also have been using margins to do the predictions.
When I tried to do the same with xtlogit FE, 386 households (7,093 observations) were dropped because they were all positive or all negative outcomes. Also, since the pr option is unavailable to use with predict, I had to use the pc1 option to predict the counterfactual.

I read in several forums that you should not use the predict option with xtlogit FE because it is conditional, but does this also applies to xtlogit RE? If what I’m doing is incorrect, which models do you recommend to predict a counterfactual in panel data with a binary outcome?

Any insights are highly appreciated! I’m also happy to provide the outputs as needed.
Thanks.

P.S: I'm using STATA 16.1