Sorry, if this is obvious. I am pretty new to STATA
I have a dataset I collected that includes due date and delivery date for 100 patients. If there a way to have STATA generate the gestational age at delivery for each observation? Gestational age is typically reported as weeks+days (39 weeks and 6 days). If delivery is on the due date, that would be 40 weeks 0 days gestation. Each day before that counts down from 40 weeks. So someone with a due date of 8/18/21 who delivers on 8/17/31 would be 39 weeks and 6 days at delivery. my due date variable is formatted as %dM_d,_CY and my date of delivery variable is %tdNN/DD/CCYY
thanks!
I have a dataset I collected that includes due date and delivery date for 100 patients. If there a way to have STATA generate the gestational age at delivery for each observation? Gestational age is typically reported as weeks+days (39 weeks and 6 days). If delivery is on the due date, that would be 40 weeks 0 days gestation. Each day before that counts down from 40 weeks. So someone with a due date of 8/18/21 who delivers on 8/17/31 would be 39 weeks and 6 days at delivery. my due date variable is formatted as %dM_d,_CY and my date of delivery variable is %tdNN/DD/CCYY
thanks!
Comment