Announcement

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

  • extracting specific results with r(table)

    Hello

    I have 3 different estimations that I want to put together in a table and I am using the following command:

    Code:
    m1
    eststo: estat simple
    matrix b = r(table)'
    
    m2
    eststo: estat simple
    matrix b = b\r(table)'
    
    m3
    eststo: estat simple
    matrix b = b\r(table)'
    
    matrix list b
    
    mat2txt, matrix(b) saving(mytable.rtf) title(Table sample)
    Now, for all these different estimations I get the following:

    Code:
     return list
    
    macros:
                    r(agg) : "simple"
    
    matrices:
                      r(V) :  1 x 1
                      r(b) :  1 x 1
                  r(table) :  9 x 1
    I don't want to put together all these 9 rows, but i need only 2 rows (a coefficient value and a p-value) and 3 columns (one for each estimation) for these 3 estimations. Is it possible to do so?

    Can I change the command something like this? The main aim is to get a table and then graph it for p-values and coefficients.

    Code:
    matrix b = b[1,1] b[4,1] \r(table)'
    Last edited by Sharma Swati; 21 Mar 2023, 10:54.

  • #2
    pull what you want from r(table)

    Code:
    di r(table)[1,1]
    di r(table)[4,1]

    Comment


    • #3
      George Ford Thank you very much!

      Comment

      Working...
      X