Announcement

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

  • creating one table for many variables

    Hello everyone, I have a data which has a categorical variable (north/south) and about 10 variables about access to public goods. I want a table that includes the percentage of respondents for each category(north/south) that have access to each of the public goods. For example, take three public goods: piped water, electricity, and tarred road. I want a table that contains the percentage of respondents in categories of north and south that have access to piped water, sewage, and tarred road, separately. To explain further, the table will show what percentage of the respondents surveyed in the north (or south) that have access to piped water. (the same will be done for other variables: electricity grid, tarred road).
    I have attached a sample of my data here.
    Attached Files

  • #2
    Please see https://www.statalist.org/forums/help#stata on how and why spreadsheet attachments don't help us help you.

    Comment


    • #3
      I have attached here a .png format of my data. Hope that helps
      Click image for larger version

Name:	pubgoods.png
Views:	2
Size:	39.1 KB
ID:	1536993
      .

      Comment


      • #4
        anyone here to help??

        Comment


        • #5
          Detailed advice would be more likely if you showed a data example of your Stata data, not a screenshot of what they look like in MS Excel. Once again, the link given in #2 explains both why this is asked and how to do it,

          Comment


          • #6

            [CODE]
            * Example generated by -dataex-. To install: ssc install dataex
            clear
            input str20 Colony float respno byte(electy_gri pipedwater sewage postoffice school police_sta clinic bank paidtransp tarredroad)
            "Gold Coast Colony" .1 0 1 0 0 1 0 0 0 1 0
            "Gold Coast Colony" .2 0 1 0 0 1 0 0 0 1 0
            "Gold Coast Colony" .3 0 1 0 0 1 0 0 0 1 0
            "Gold Coast Colony" .4 0 1 0 0 1 0 0 0 1 0
            "Gold Coast Colony" .5 0 1 0 0 1 0 0 0 1 0
            "Gold Coast Colony" .6 0 1 0 0 1 0 0 0 1 0
            "Gold Coast Colony" .7 0 1 0 0 1 0 0 0 1 0
            "Gold Coast Colony" .8 0 1 0 0 1 0 0 0 1 0
            "Gold Coast Colony" .9 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 1 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 1.1 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 1.2 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 1.3 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 1.4 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 1.5 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 1.6 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 1.7 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 1.8 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 1.9 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 2 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 2.1 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 2.2 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 2.3 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 2.4 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 2.5 1 1 1 0 1 1 1 0 1 1
            "Gold Coast Colony" 2.6 1 1 1 0 1 1 1 0 1 1
            "Gold Coast Colony" 2.7 1 1 1 0 1 1 1 0 1 1
            "Gold Coast Colony" 2.8 1 1 1 0 1 1 1 0 1 1
            "Gold Coast Colony" 2.9 1 1 1 0 1 1 1 0 1 1
            "Gold Coast Colony" 3 1 1 1 0 1 1 1 0 1 1
            "Gold Coast Colony" 3.1 1 1 1 0 1 1 1 0 1 1
            "Gold Coast Colony" 3.2 1 1 1 0 1 1 1 0 1 1
            "Gold Coast Colony" 3.3 1 1 0 0 1 0 0 0 1 1
            "Gold Coast Colony" 3.4 1 1 0 0 1 0 0 0 1 1
            "Gold Coast Colony" 3.5 1 1 0 0 1 0 0 0 1 1
            "Gold Coast Colony" 3.6 1 1 0 0 1 0 0 0 1 1
            "Gold Coast Colony" 3.7 1 1 0 0 1 0 0 0 1 1
            "Gold Coast Colony" 3.8 1 1 0 0 1 0 0 0 1 1
            "Gold Coast Colony" 3.9 1 1 0 0 1 0 0 0 1 1
            "Gold Coast Colony" 4 1 1 0 0 1 0 0 0 1 1
            "Gold Coast Colony" 4.1 1 1 1 0 1 0 0 0 1 1
            "Gold Coast Colony" 4.2 1 1 1 0 1 0 0 0 1 1
            "Gold Coast Colony" 4.3 1 1 1 0 1 0 0 0 1 1
            "Gold Coast Colony" 4.4 1 1 1 0 1 0 0 0 1 1
            "Gold Coast Colony" 4.5 1 1 1 0 1 0 0 0 1 1
            "Gold Coast Colony" 4.6 1 1 1 0 1 0 0 0 1 1
            "Gold Coast Colony" 4.7 1 1 1 0 1 0 0 0 1 1
            "Gold Coast Colony" 4.8 1 1 1 0 1 0 0 0 1 1
            "Gold Coast Colony" 4.9 1 1 1 0 0 0 0 0 1 0
            "Gold Coast Colony" 5 1 1 1 0 0 0 0 0 1 0
            "Gold Coast Colony" 5.1 1 1 1 0 0 0 0 0 1 0
            "Gold Coast Colony" 5.2 1 1 1 0 0 0 0 0 1 0
            "Gold Coast Colony" 5.3 1 1 1 0 0 0 0 0 1 0
            "Gold Coast Colony" 5.4 1 1 1 0 0 0 0 0 1 0
            "Gold Coast Colony" 5.5 1 1 1 0 0 0 0 0 1 0
            "Gold Coast Colony" 5.6 1 1 1 0 0 0 0 0 1 0
            "Gold Coast Colony" 5.7 1 0 0 0 1 0 0 0 1 0
            "Gold Coast Colony" 5.8 1 0 0 0 1 0 0 0 1 0
            "Gold Coast Colony" 5.9 1 0 0 0 1 0 0 0 1 0
            "Gold Coast Colony" 6 1 0 0 0 1 0 0 0 1 0
            "Gold Coast Colony" 6.1 1 0 0 0 1 0 0 0 1 0
            "Gold Coast Colony" 6.2 1 0 0 0 1 0 0 0 1 0
            "Gold Coast Colony" 6.3 1 0 0 0 1 0 0 0 1 0
            "Gold Coast Colony" 6.4 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 6.5 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 6.6 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 6.7 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 6.8 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 6.9 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 7 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 7.1 1 1 1 1 1 1 1 1 1 1
            "Gold Coast Colony" 7.2 1 1 1 0 1 0 1 1 1 1
            "Gold Coast Colony" 7.3 1 1 1 0 1 0 1 1 1 1
            "Gold Coast Colony" 7.4 1 1 1 0 1 0 1 1 1 1
            "Gold Coast Colony" 7.5 1 1 1 0 1 0 1 1 1 1
            "Gold Coast Colony" 7.6 1 1 1 0 1 0 1 1 1 1
            "Gold Coast Colony" 7.7 1 1 1 0 1 0 1 1 1 1
            "Gold Coast Colony" 7.8 1 1 1 0 1 0 1 1 1 1
            "Gold Coast Colony" 7.9 1 1 1 0 1 0 1 1 1 1
            "Gold Coast Colony" 8 1 0 0 0 1 0 0 0 1 0
            "Gold Coast Colony" 8.1 1 0 0 0 1 0 0 0 1 0
            "Gold Coast Colony" 8.2 1 0 0 0 1 0 0 0 1 0
            "Gold Coast Colony" 8.3 1 0 0 0 1 0 0 0 1 0
            "Gold Coast Colony" 8.4 1 0 0 0 1 0 0 0 1 0
            "Gold Coast Colony" 8.5 1 0 0 0 1 0 0 0 1 0
            "Gold Coast Colony" 8.6 1 0 0 0 1 0 0 0 1 0
            "Gold Coast Colony" 8.7 1 0 0 0 1 0 0 0 1 0
            "Gold Coast Colony" 8.8 1 1 1 0 1 0 1 0 1 1
            "Gold Coast Colony" 8.9 1 1 1 0 1 0 1 0 1 1
            "Gold Coast Colony" 9 1 1 1 0 1 0 1 0 1 1
            "Gold Coast Colony" 9.1 1 1 1 0 1 0 1 0 1 1
            "Gold Coast Colony" 9.2 1 1 1 0 1 0 1 0 1 1
            "Gold Coast Colony" 9.3 1 1 1 0 1 0 1 0 1 1
            "Gold Coast Colony" 9.4 1 1 1 0 1 0 1 0 1 1
            "Gold Coast Colony" 9.5 1 1 1 0 1 1 1 0 1 1
            "Gold Coast Colony" 9.6 1 1 1 0 1 1 1 0 1 1
            "Gold Coast Colony" 9.7 1 1 1 0 1 1 1 0 1 1
            "Gold Coast Colony" 9.8 1 1 1 0 1 1 1 0 1 1
            "Gold Coast Colony" 9.9 1 1 1 0 1 1 1 0 1 1
            "Gold Coast Colony" 10 1 1 1 0 1 1 1 0 1 1
            end



            I hope this helps.

            Comment


            • #7
              From post #1

              data which has a categorical variable (north/south)
              In none of your examples have you shown this variable.

              Comment

              Working...
              X