Using Stata Creating a Table of Descriptive Statistics

Поделиться
HTML-код
  • Опубликовано: 21 авг 2024

Комментарии • 13

  • @mariacastiglione4480
    @mariacastiglione4480 10 месяцев назад +2

    how do you get a percentage

    • @HaciendoLQMDLG
      @HaciendoLQMDLG 9 месяцев назад

      you can use the command "tab1 [varlist]" to generate a frequency distribution table

  • @RosatiSamuel
    @RosatiSamuel 5 месяцев назад

    Say I have a variable age grouped into three or four levels 0-25 years e.t.c and I want to get the mean and standard deviation age of each group. How do I go about that?

    • @jasonburns2579
      @jasonburns2579  5 месяцев назад +1

      Great question! To do that you can use what Stata calls "factor notation." This means that you tell Stata that a given variable is categorical. To do that, use the prefix "i." before a variable. Say that your variable is called "age." You would enter "i.age" in the command and it will then create a separate line in the table for each category. This video walks gives an example starting at around the 6:00 mark.

    • @RosatiSamuel
      @RosatiSamuel 5 месяцев назад

      @@jasonburns2579 Great. At that point in the clip, we get proportions in decimal places. Could I use that for mean in representing Table 1 of summary statistics say for a numerical variable coded with levels like age or BMI?

    • @jasonburns2579
      @jasonburns2579  5 месяцев назад +1

      @@RosatiSamuel For that you would want to create a crosstabluation or two-way table. The idea with that is you declare your categorical variable as the row variable and then specify which descriptive statistics you want in each row. A simple way to do that would be to use the command "tabstat BMI, by(age)" You can customize it more using the table and tabulate commands. I have a video on crosstabs you may find helpful in this scenario.

    • @RosatiSamuel
      @RosatiSamuel 5 месяцев назад

      @@jasonburns2579 Thanks alot.

  • @mbout3456
    @mbout3456 Год назад

    Hello Jason, Thank you for the video. What does the standard deviation mean in your last table for the categorical vatiables? Thanks again.

    • @jasonburns2579
      @jasonburns2579  Год назад

      Hi and great question! When specifying a variable as an indicator (using "i."), in the backgroun Stata then treats each value of the variable as binary where 1 means that an observation is in that group and 0 means that it is not. That is then used to calculate proportions (in the mean column) and standard deviations. Hope this helps!

    • @mbout3456
      @mbout3456 Год назад

      @@jasonburns2579 thanks Jason, however I still don’t know how to interpret the standard deviation stats in this case.

    • @jasonburns2579
      @jasonburns2579  Год назад

      @@mbout3456 Ah ok. Here the standard deviations can be interpreted as a standard deviation for a proportion. The text here is unfortunately a but clunky but there are some good sources with more detail on this topic that can be found online

  • @user-ut6nn3oi4g
    @user-ut6nn3oi4g Год назад

    I am student please reales as free the data of stata

    • @jasonburns2579
      @jasonburns2579  Год назад

      You can download a copy of the data from my website at www.jasonburnsphd.com/new-jersey-school-performance-data but you will need your own copy of Stata