This is a way to calculate a logistic Inverse Mills ratio.
The logistic IMR has some benefits when estimating a model (including correction for selection) on panel data. Because of the incidental parameter problem, it is not possible to estimate Probit FE. Hence, many researchers use a Probit RE model for the selection equation and then estimate the main FE model including the retrieved IMR. A problem which this approach is that the assumptions made are usually not plausible (differences in the correlation between regressors and the unobserved heterogeneity terms in the selection equation and the equation of interest).
A simple solution is estimating a logit FE model (which does not suffer from the incidental parameter problem) and then deriving the logistic IMR as follows:
capture drop xblogit pcdf lambda
predict xblogit, xb
gen pcdf = 1/(1+exp(-xblogit))
gen lambda = normalden(invnorm(pcdf))/pcdf