Announcement

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

  • Sample countries and mean values of selected variables

    Hello all,

    I am working on my first Stata project, and I have a question that might be simple to some of you. I have been asked to build the following table, but after a few days searching, I have not found a way to do so in this forum.

    N Dependent variable Main explanatory variable 1 Main explanatory variable 2
    Australia
    Austria
    Belgium
    Brazil
    Canada
    Chile
    China
    Denmark
    Finland
    France
    Germany
    Greece
    Hong Kong
    Hungary
    India
    Indonesia
    Ireland
    Israel
    Italy
    Japan
    Korea, Rep.
    Luxembourg
    Malaysia
    Mexico
    Netherlands
    New Zealand
    Norway
    Peru
    Philippines
    Poland
    Portugal
    Russia
    Singapore
    South Africa
    Spain
    Sweden
    Switzerland
    Thailand
    Turkey
    United Kingdom
    United States
    Total
    For the countries, I have a variable called Country. I gave the dependent and explanatory variables a generic name, in case it is easier to explain what I need to do. What I need is the mean value of these variables, for each country in my dataset. Would anyone know what command I can use?

    Thank you so much in advance!!
    Last edited by carla Oth; 23 Jan 2022, 09:55. Reason: Clearer explanation

  • #2
    if you are using version 17 (as I assume since you did not say otherwise), you can use the -table- command; see
    Code:
    help table
    you might also want to see the set of 7 blogs that Chuck Huber wrote on this command; the first can be found at https://blog.stata.com/2021/06/07/cu...table-command/

    Comment


    • #3
      Thank you very much!

      Comment

      Working...
      X