Announcement

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

  • New Table Command for descriptive statistics and regressions

    Dear Statalist,

    I am trying to familiarize myself with the new
    Code:
    table
    command in Stata 17. To better understand the syntax, I would appreciate a practical example of outputting a standard descriptive statistics table and a regression table. The output I envision would look like the following:

    Code:
    webuse nhanes2, clear
    
    mkcorr ///
        weight age height sex race ///
        , log(descriptive_stats) means mdec(2) cdec(2) num sig lab replace
    
    
    reg weight sex race
        outreg2 using my_results.doc, replace /// 
            adds(Prob > chi2, e(p), Log-likelihood, e(ll)) /// 
            drop(i.id) nocons noobs /// 
            dec(2) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, +) /// 
            label ctitle(Model 1) title(OLS Regression) /// 
            addnote(Notes: n = `e(N)')
    
    reg weight age height sex race
        outreg2 using my_results.doc, append /// 
            adds(Prob > chi2, e(p), Log-likelihood, e(ll)) /// 
            drop(i.id) nocons noobs /// 
            dec(2) alpha(0.001, 0.01, 0.05, 0.1) symbol(***, **, *, +) /// 
            label ctitle(Model 2)
    Are these types of outputs also possible with the
    Code:
    table
    command?

    Thanks,

    Marvin

  • #2

    Comment


    • #3
      Thank you for these useful references, Bjarte!

      Comment

      Working...
      X