I ran logistic regression of y. I saved the residuals after estimating the regression.

Step 1: logit y x1 x2 x3
Step 2: predict resid, residuals

From the second step, I can obtain the standard deviation of the residuals. That is just one number.

Next, I want to store the standard deviation of the residual for each observation. Would please provide stata codes? Any help would be appreciated.