Announcement

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

  • Using estpost and esttab for mutli-level data summary statistics

    Hello,
    I want to complete summary statistics for my multilevel data - countries (level 2) households (level 1). I want to provide averages at the country-level. I am currently using the two commands in Stata 15.1.

    Code:
    estpost tabstat genderlaws genderviews foodinsecure, statistics (mean)by(countryyr)
    Code:
    esttab . using file.rtf, replace
    estpost provides what I want but when I try to put it into an rtf file it disappears and only provides the n of the whole dataset - no summary statistics. Any suggestions would be appreciated.
    Last edited by Amanda Wyant; 28 May 2019, 10:43.

  • #2
    esttab is from Stata Journal, authored by Ben Jann. The program was designed for estimation commands and not to output tables, but you can try something as below:

    Code:
    estpost tabstat genderlaws genderviews foodinsecure, statistics (mean)by(countryyr)
    mat Means = e(genderlaws)\ e(genderviews) \e(foodinsecure)
    mat Means= Means'
    esttab mat(Means) using file.rtf, replace

    Comment


    • #3
      asdoc can easily export summary states and outputs from other Stata commands to a Word file. See this example
      Code:
      ssc install asdoc, replace
      webuse grunfeld
      asdoc tabstat invest mvalue kstock , stat(mean) by(company )
      Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	44.1 KB
ID:	1500579
      Regards
      --------------------------------------------------
      Attaullah Shah, PhD.
      Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
      FinTechProfessor.com
      https://asdocx.com
      Check out my asdoc program, which sends outputs to MS Word.
      For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

      Comment

      Working...
      X