Announcement

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

  • #31
    Thanks to Kit Baum there is a new update of matrixtools. A new command matslct is added. It is a wrapper to the command matprint.
    Code:
    . sysuse auto
    (1978 automobile data)
    
    . regress price i.foreign mpg length
    
          Source |       SS           df       MS      Number of obs   =        74
    -------------+----------------------------------   F(3, 70)        =     12.14
           Model |   217367689         3  72455896.3   Prob > F        =    0.0000
        Residual |   417697707        70   5967110.1   R-squared       =    0.3423
    -------------+----------------------------------   Adj R-squared   =    0.3141
           Total |   635065396        73  8699525.97   Root MSE        =    2442.8
    
    ------------------------------------------------------------------------------
           price | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
         foreign |
        Foreign  |   2644.771    761.891     3.47    0.00     1125.227    4164.315
             mpg |   -139.081     82.210    -1.69    0.10     -303.043      24.881
          length |     59.612     23.905     2.49    0.02       11.934     107.289
           _cons |  -2861.984   6026.600    -0.47    0.64    -1.49e+04    9157.690
    ------------------------------------------------------------------------------
    
    . matprint r(table)
      
    ---------------------------------------------------------
            0b.foreign  1.foreign      mpg  length      _cons
    ---------------------------------------------------------
    b             0.00    2644.77  -139.08   59.61   -2861.98
    se                     761.89    82.21   23.91    6026.60
    t                        3.47    -1.69    2.49      -0.47
    pvalue                   0.00     0.10    0.02       0.64
    ll                    1125.23  -303.04   11.93  -14881.66
    ul                    4164.32    24.88  107.29    9157.69
    df           70.00      70.00    70.00   70.00      70.00
    crit          1.99       1.99     1.99    1.99       1.99
    eform         0.00       0.00     0.00    0.00       0.00
    ---------------------------------------------------------
    
    . qui regress price i.foreign mpg length
    
    . matslct r(table)[(1,5,6,4);(2..4)], transpose name(mymat)
      
    --------------------------------------------
                     b       ll       ul  pvalue
    --------------------------------------------
    1.foreign  2644.77  1125.23  4164.32    0.00
    mpg        -139.08  -303.04    24.88    0.10
    length       59.61    11.93   107.29    0.02
    --------------------------------------------
    Enjoy
    Kind regards

    nhb

    Comment

    Working...
    X