Announcement

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

  • Merge in VHLSS

    Dear All,
    I have some problems in merge command.
    I want to merge follow some id:
    id1 id2 id 3 id4 var1 var2 var3

    This data follow private health expenditures, so many obs belong to a family.
    I want to merge these obs to a observation in data.
    Do you have any idea ?
    Example:
    id1 id2 id3 var1 var2 var3
    1 2 1 11 22 33
    1 2 2 223 123 123
    1 2 1 12 123 12
    1 2 2 123 123 12
    1 3 1 21 123 12
    1 3 2 3 132 12
    I want to merge obs which have same id1&id2 to a observation with having new value: var1 = sum(allvar1)
    Thank so much

  • #2
    You are posting in the Mata forum, which is about Stata's matrix language Mata. Nobody without interest in Mata will see it here. Repost in the General Forum.
    Steve Samuels
    Statistical Consulting
    [email protected]

    Stata 14.2

    Comment


    • #3
      bạn chuong huynh nói rõ hơn được k? chưa hiểu rõ ý đồ của bạn lắm? nếu cần trao đổi có thể email vào: [email protected]

      Comment

      Working...
      X