Hello Stata users,

I am using bysort egen total() and want to know if there is any way I can make missing+nonmissing=missing.

I know that total(), missing command returns missing when all are missing. But I could not figure out how to make it missing if at least one of the observations are missing.
I pasted example in the reply! Please refer to that.

Best regards,
Ed