Announcement

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

  • How to create a table with summary statistics and p-value

    I want to create a table like this. Can anyone guide me? Thank you.
    No Hypertension Hypertension p-value
    Age Mean (SD) Mean (SD) From t-test
    Gender From chi-square test
    Male Frequency (Row percentage) Frequency (Row percentage)
    Female Frequency (Row percentage) Frequency (Row percentage)
    Smoking Status From ANOVA
    Never Smoker Frequency (Row percentage) Frequency (Row percentage)
    Past Smoker Frequency (Row percentage) Frequency (Row percentage)
    Current Smoker Frequency (Row percentage) Frequency (Row percentage)

    Stata 17

  • #2
    Mohammad:
    take a comprehensive look at -table- suite in Stata 17 .pdf manual.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Mohammed,

      There are multiple ways to create such a table using Stata; among them are:
      1. -table- command, as Carlo Lazzaro has mentioned (https://blog.stata.com/2021/06/07/cu...table-command/).
      2. -putexcel- command (https://blog.stata.com/2017/01/10/cr...nd-formatting/).
      3. -asdoc- command (https://www.statalist.org/forums/for...stata-commands)
      Last edited by Abdullah Algarni; 03 Apr 2023, 18:43.
      Sincerely regards,
      Abdullah Algarni
      [email protected]

      Comment


      • #4
        Many thank Carlo Lazzaro Abdullah Algarni!!

        Stata 17

        Comment


        • #5
          Originally posted by Carlo Lazzaro View Post
          Mohammad:
          take a comprehensive look at -table- suite in Stata 17 .pdf manual.
          Hello Everyone,


          I have a question for you.

          I want to create following data from my data

          Education of Mother
          Primary Secondary UG Masters

          Knowldge1
          Yes
          No
          Knowldge2
          Yes
          No
          Knowldge3
          Yes
          No
          Knowldge4
          Yes
          No


          Below is the example of my Data

          input float(knowledge1 knowledge2 knowledge3 knowledge4 knowledge5 knowledge6 educationm)
          0 1 1 1 0 1 1
          0 1 1 1 1 0 1
          0 0 0 0 0 1 1
          1 1 0 0 0 0 5
          1 1 1 1 1 0 3
          0 1 0 0 0 1 1


          I am using the following command but it not doing what I want.


          table (knowledge*) (educationm result), statistic(frequency) statistic(percent, across(education))


          Please help me!!!!!!!!!!


          Comment


          • #6
            pavan pandey please don’t duplicate your question in other people’s threads.

            Comment

            Working...
            X