Announcement

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

  • Store separate estimates after -sqreg- for multiple quantiles

    Hello dear forum members,

    My goal is to store estimates after
    Code:
    sqreg y x1-x60, reps (1000) q(.01 .05 .10 .25 .50 .75 .90 .95 .99)
    To do so, I am using
    Code:
    estimates store sqreg
    However, when I call for estimates stored this way, they are presented in a single column, which is not convenient with 60 regressors and 9 quantiles. E.g.:

    Code:
    ----------------------------
                        (1)  
                         y  
    ----------------------------
    q01
                            
    x1            0.0000105  
                     (0.49)  
    
    x2                1.817***
                     (4.22)  
    
    x3               0.0197  
                     (0.11)    
    ----------------------------
    q05
                            
    x1            0.0000203  
                     (1.40)  
    
    x2                3.042***
                     (7.46)  
    
    x3              -0.0231  
                     (-0.23)
    
    etc.
    What is be the correct way to store each set of estimates corresponding a given quantile under a separate name?

    Thankfully,
    Anton

  • #2
    Dear forum members,

    I would be glad to provide you with any additional information, in case it is needed to answer my question. I have never come across such issue previously, and therefore seeking your help.

    Sincerely,
    Anton

    Comment


    • #3
      To address the aforementioned issue, one of the solutions I tried was:
      Code:
      estimates table, keep(q01: q05:) star(0.05 0.01 0.001)
      However, it still reports results as a table with a single column (similar to the example provided above).

      Another solution I tried involves (1) saving a matrix of coefficients, i.e.:
      Code:
      matrix list e(b)
      
      e(b)[1,585]
                   q01:          q01:          q01:          q01:         q01:        
                  x1         x2             x3           x4           x5         
      y1    -.72351619     7.789e-06     2.1669899    -.02185399    -.10795103     
      
      ...
                   q05:          q05:          q05:          q05:          q05:        
                   x10           x11            x12         x13        x14         
      y1     .09693524     .47687667    -5.632e-06     .34947686     .90969925    
      
      etc.
      Then (2) saving the coefficient matrix to regular matrix variable using
      Code:
      mat b = e(b)
      And then (3) extracting coefficients by row/column into other variables, e.g.:
      Code:
      local coeff1 = b[1,1]
      But is there a plausible way to make a table out of these extracted coefficients with each column representing a set of coefficients for a given quantile? Any advise would be appreciated.

      Comment

      Working...
      X