Customizable tables in Stata 17: One-way tables of summary statistics

Поділитися
Вставка
  • Опубліковано 11 гру 2024

КОМЕНТАРІ • 17

  • @statacorp
    @statacorp  3 роки тому +1

    You can read more in our Stata Blog posts "Customizable tables in Stata 17"
    blog.stata.com/2021/06/07/customizable-tables-in-stata-17-part-1-the-new-table-command/
    blog.stata.com/2021/06/07/customizable-tables-in-stata-17-part-2-the-new-collect-command/
    blog.stata.com/2021/06/24/customizable-tables-in-stata-17-part-3-the-classic-table-1/
    blog.stata.com/2021/08/24/customizable-tables-in-stata-17-part-4-table-of-statistical-tests/
    blog.stata.com/2021/08/26/customizable-tables-in-stata-17-part-5-tables-for-one-regression-model/
    blog.stata.com/2021/09/02/customizable-tables-in-stata-17-part-6-tables-for-multiple-regression-models/
    blog.stata.com/2021/09/08/customizable-tables-in-stata-17-part-7-saving-and-using-custom-styles-and-labels/

  • @yileizhang2237
    @yileizhang2237 2 роки тому +1

    Thank you very much Chuck for the great tutorial!

  • @Jlaloca21
    @Jlaloca21 3 роки тому +1

    Wow thank you so much 🙏🏼🙏🏼🙏🏼🙏🏼this was very very helpful and useful

  • @kuldeepmirdha8452
    @kuldeepmirdha8452 3 роки тому +3

    How do we put standard deviation behind mean such that we present= MEAN (SD)?

  • @andresramasco5644
    @andresramasco5644 Рік тому

    Thanks for the video! How can I include two more columns with the difference and the p-value?

  • @gabrielfranceschini2823
    @gabrielfranceschini2823 2 роки тому

    I have an issue with stata 17, since the version seems not supporting string variables with table command

  • @HxCWW
    @HxCWW Рік тому

    How can I make the statistics the columns? I.e. one mean column, one sd column for al specified variables

  • @kalibbaladennis
    @kalibbaladennis Рік тому

    Thanks for video . How can I make the cells to have n(%)?. I need some help here

  • @MultiKasuku
    @MultiKasuku 3 роки тому +1

    Stata 17 is awesome

  • @anne-marieturcotte-trembla3630
    @anne-marieturcotte-trembla3630 2 роки тому

    Love this video! Thanks

  • @sabrinerk3210
    @sabrinerk3210 2 роки тому

    Many thanks!

  • @iirou
    @iirou 3 роки тому

    Is it possible that you could present the syntax code as well? thank you!

    • @statacorp
      @statacorp  3 роки тому +5

      webuse nhanes2l, clear
      * Table of frequencies
      table () (sex)
      * Suppress the marginal totals
      table () (sex), nototals
      * Add percentages, means, and standard deviations
      table () (sex), statistic(frequency) statistic(percent) ///
      statistic(mean age height weight) statistic(sd age height weight)
      * Format the percentages to one decimal place and display them with a %
      table () (sex), statistic(frequency) statistic(percent) ///
      statistic(mean age height weight) statistic(sd age height weight) ///
      nformat(%9.1f percent) sformat("%s%%" percent)
      * Format the means and standard deviations to one decimal place
      table () (sex), statistic(frequency) statistic(percent) ///
      statistic(mean age height weight) statistic(sd age height weight) ///
      nformat(%9.1f percent) sformat("%s%%" percent) ///
      nformat(%9.1f mean) nformat(%9.1f sd)
      /* Group the results by variable name by placing the variables
      from the -statistic()- options on the rows */
      table (var) (sex), statistic(frequency) statistic(percent) ///
      statistic(mean age height weight) statistic(sd age height weight) ///
      nformat(%9.1f percent) sformat("%s%%" percent) ///
      nformat(%9.1f mean) nformat(%9.1f sd)
      * Remove the right border
      collect style cell, border(right, pattern(nil))
      * Change the font to arial
      collect style cell, font(arial)
      * Preview the table
      collect preview
      * Export the table to an Excel file
      collect export table.xlsx, replace

  • @holybob12
    @holybob12 3 роки тому

    Thanks for the tutorial. Is it possible to include Pearson's Chi-square and Fisher's exact test P-values?

    • @statacorp
      @statacorp  3 роки тому +1

      Yes, after creating a two-way table with *tabulate* , those values are stored in scalars. You can use the *collect* prefix with *tabulate* to collect those results. Please email us at tech-support@stata.com for an example.

    • @holybob12
      @holybob12 3 роки тому +1

      @@statacorp Thanks for the reply. I'm going to email you for the example. I would want the P-value to be displayed in the last column on the right.

  • @getanehtewabe-v1t
    @getanehtewabe-v1t 4 місяці тому

    thanks