Announcement

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

  • #16
    tab and collapse caneasily finish the task, sumat is a very good command, just like tabstat,When add save option, then a useful matrix can be generated and called.
    thank you very much, I learned a very good command
    I got a idea to reduce the double loops to one and then do the loop
    generate a new variable c to to represent a and b
    Code:
    gen c = group(a b) 
    or    xgroup a b,gen(c)
    Code:
    levelsof c,gen(i)
    then a macro i can be used in loopse

    Comment


    • #17
      i am sorry, i wrote the wrong code
      Code:
       egen c = group(a b)
      Code:
        
       levelsof c,local(i)
      Last edited by fu gang; 22 Jan 2021, 19:36.

      Comment

      Working...
      X