Hi all
I had posted some while back on estimating dates of birth. But I would still like to clarify that I'm tackling the issue the right way.
Initially I used the following code to set date of birth:
where dateofbirth is the variable specifying date of birth
My assumption is that the first week of January 1960 i.e. week 0 in Stata time is set to 0 to 6 and that every week in Stata has 52 weeks but the 52nd week has more than 7 days (8 or 9 days). This would give 365.25/52 which is 7.024 days per week.
Thus should the above code be replaced by the following??
The first code estimates birthdays around a month and a half earlier than the second code which would of course impact the estimation of age and other related variables.
Thanks!
/Amal
I had posted some while back on estimating dates of birth. But I would still like to clarify that I'm tackling the issue the right way.
Initially I used the following code to set date of birth:
Code:
gen birthdate = 7 * real (dateofbirth) - 3 format birthdate %td
My assumption is that the first week of January 1960 i.e. week 0 in Stata time is set to 0 to 6 and that every week in Stata has 52 weeks but the 52nd week has more than 7 days (8 or 9 days). This would give 365.25/52 which is 7.024 days per week.
Thus should the above code be replaced by the following??
Code:
gen birthdate = 7.024 * real (dateofbirth) - 3 format birthdate %td
The first code estimates birthdays around a month and a half earlier than the second code which would of course impact the estimation of age and other related variables.
Thanks!
/Amal
Comment