Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Date of conception from the date of birth

    I know the date, month and year of birth for children in a locality. However, I want to calculate the date of conception from this information. I don't have the exact information on the gestation period. However, I am planning to use 38 weeks (266 days) as an approximation of a normal-term pregnancy (gestation period), as per the World Health Organization definition.

    Here is the sample data for your reference:

    input byte date float mob int year float gestation_period_days
    15 11 2001 266
    4 8 2001 266
    13 7 2001 266
    15 3 2002 266
    4 7 2001 266
    21 6 2001 266
    1 1 2002 266
    11 11 2001 266
    23 9 2001 266
    13 9 2001 266
    30 6 2001 266
    25 4 2002 266
    13 10 2001 266
    21 11 2001 266
    6 7 2001 266
    22 6 2001 266
    9 7 2001 266
    15 2 2002 266
    6 1 2002 266
    24 12 2001 266
    4 12 2001 266
    3 2 2002 266
    22 11 2001 266
    19 12 2001 266
    22 11 2001 266
    4 9 2001 266
    28 8 2001 266
    12 1 2002 266
    24 7 2001 266
    12 10 2001 266
    5 8 2001 266
    14 4 2002 266
    1 9 2001 266
    20 5 2001 266
    4 3 2002 266
    31 8 2001 266
    4 6 2001 266
    15 12 2001 266
    9 12 2001 266
    11 10 2001 266
    2 11 2001 266
    2 5 2002 266
    15 10 2001 266
    21 7 2001 266
    1 11 2001 266
    25 11 2001 266
    26 10 2001 266
    12 4 2002 266
    3 4 2002 266
    4 10 2001 266
    5 1 2002 266
    16 3 2002 266
    15 8 2001 266
    2 8 2001 266
    21 11 2001 266
    3 5 2002 266
    15 11 2001 266
    6 1 2002 266
    23 8 2001 266
    13 11 2001 266
    12 5 2002 266
    25 11 2001 266
    27 10 2001 266
    15 10 2001 266
    8 1 2002 266
    12 3 2002 266
    1 8 2001 266
    4 11 2001 266
    25 3 2002 266
    7 7 2001 266
    12 8 2001 266
    16 4 2002 266
    3 5 2002 266
    1 9 2001 266
    10 1 2002 266
    10 3 2002 266
    8 5 2002 266
    7 8 2001 266
    4 12 2001 266
    3 5 2002 266
    20 10 2001 266
    4 5 2002 266
    12 11 2001 266
    25 12 2001 266
    11 3 2002 266
    26 6 2001 266
    18 1 2002 266
    14 2 2002 266
    28 3 2002 266
    31 3 2002 266
    10 12 2001 266
    26 1 2002 266
    7 6 2001 266
    11 2 2002 266
    11 12 2001 266
    2 2 2002 266
    18 3 2002 266
    15 12 2001 266
    27 10 2001 266
    20 12 2001 266
    end

    It would be great if someone could guide me to calculate the date of conception from this information.

    Thanks in advance.


  • #2
    Code:
    gen wanted = mdy(mob,date,year) - 266

    Comment


    • #3
      Thanks @Øyvind Snilsberg
      I am not familiar with what I am getting after executing this code. I know it is number of days. However, I don't know what is the reference from which it is giving these days. It would be great if you could also tell me how to convert this 'wanted' variable into date of conception, month of conception and year of conception.

      Comment


      • #4
        it is the number of days since January 1, 1960,
        Code:
        format %td wanted
        date, month and year of conception,
        Code:
        g doc = day(wanted)
        g moc = month(wanted)
        g yoc = year(wanted)

        Comment


        • #5
          Thanks @Øyvind Snilsberg. It's done.

          Comment

          Working...
          X