Dear all,
I am working with demographic data. My aim is to generate a variable age at death from two other variables - the birth date and the date of death. The latter two variables are in the stata date format (mdy). All works fine, however, in those cases where birth date == date of death stata generates a missing value instead of 0 (days). Since I am working with data from the early modern period there are many stillbirths for which the condition day of death == day of birth holds.
Why does stata behave this way, and is there an elegant workaround (other than replacing age at death with 0 if birth date == date of death)?
I am working with demographic data. My aim is to generate a variable age at death from two other variables - the birth date and the date of death. The latter two variables are in the stata date format (mdy). All works fine, however, in those cases where birth date == date of death stata generates a missing value instead of 0 (days). Since I am working with data from the early modern period there are many stillbirths for which the condition day of death == day of birth holds.
Why does stata behave this way, and is there an elegant workaround (other than replacing age at death with 0 if birth date == date of death)?

Comment