Announcement

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

  • statistics summary for variables classifies by year and sector (HOW)

    Dear

    I want to run statistics summaries for two variables depending on the years and the classification of sectors how I can do it and transfer it to word please?

  • #2
    search tabstat

    HTML Code:
    https://www.stata.com/stata-news/news32-3/spotlight-putdocx/
    https://fintechprofessor.com/2018/01/31/asdoc/

    Comment


    • #3
      Deanna:
      as far as your first question is concerned, you may want to consider something along the following lines:
      Code:
      . use "https://www.stata-press.com/data/r17/nlswork.dta"
      (National Longitudinal Survey of Young Women, 14-24 years old in 1968)
      
      . bysort year ind_code: tabstat ln_wage, stat(N mean sd p50 min max)
      
      ------------------------------------------------------------------------------------------------------------------------------------------
      -> year = 68, ind_code = 1
      
          Variable |         N      Mean        SD       p50       Min       Max
      -------------+------------------------------------------------------------
           ln_wage |        10  1.086733  .2474664  1.090803  .5628814  1.440763
      --------------------------------------------------------------------------
      
      ------------------------------------------------------------------------------------------------------------------------------------------
      -> year = 68, ind_code = 2
      
          Variable |         N      Mean        SD       p50       Min       Max
      -------------+------------------------------------------------------------
           ln_wage |         1  1.627093         .  1.627093  1.627093  1.627093
      --------------------------------------------------------------------------
      
      <snipped>
      Kind regards,
      Carlo
      (Stata 19.0)

      Comment

      Working...
      X