I did a constrained linear regression and obtained residuals by predict. Stata 15 reports that it generated 599 missing values when calculating the residua. But in fact the predicted residual contains 706 missing values, which equals the number of missing values in the original data set.
I wonder why this discrepancy?>
. predict test, resid
(599 missing values generated)

. codebook test

-----------------------------------------------------------------------------------
test Residuals
-----------------------------------------------------------------------------------

type: numeric (float)

range: [-5.2206135,3.9185085] units: 1.000e-10
unique values: 1,022 missing .: 706/1,729

mean: 3.7e-08
std. dev: 1.08643

percentiles: 10% 25% 50% 75% 90%
-1.34578 -.666359 .020927 .674149 1.27261