I am running a two-stage regression to account for the endogeneity issue. In the first stage I use xtlogit with fixed effects. Here are the codes.

Code:
xtlogit y x1 x2, fe
predict yhat
In this stage, some observations are dropped because in some ID groups, the dependent variables are all 0 or 1. But the predict function still gives predicted values for all observations. I am wondering whether this should be the case? In the second stage, I will use yhat as the independent variable. The inconsistency between the number of observations used in the first regression and the number of predicted values will make the number of observations not consistent in the first stage and second stage. Should this be a concern?