Announcement

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

  • Combining multiple observations

    Dear all,

    I am trying to construct birth histories in a rich data source. Some individuals have two entries of their child history which do not match. I would like to merge these into one line so that I can merge it into other
    Essentially I would like to go from this

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float(id child1 child2 child3 child4)
    1 100 134 250 .
    1 210   .   . .
    2 111 143   . .
    2 121   .   . .
    3  22 109   . .
    3  92   .   . .
    4  40  62   . .
    4  51  76   . .
    end
    and the end result should be this
    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float(id child1 child2 child3 child4)
    1 100 134 210 250
    2 111 121 143   .
    3  22  92 109   .
    4  40  51  62  76
    end
    Any help appreciated

  • #2
    Duplicate post. If interested please follow https://www.statalist.org/forums/for...e-observayions

    Comment

    Working...
    X