1 session 3 tables in stata. 2 importance of tables the analysis of many surveys is primarily...
TRANSCRIPT
![Page 1: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/1.jpg)
1
Session 3
Tables in Stata
![Page 2: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/2.jpg)
2
Importance of tables
The analysis of many surveys is primarily Through giving tables And then interpreting the information
Simple tables are one-way frequencies Or of percentages
Or Multi-way frequencies (or percentages) Tables can also contain summary statistics
Like means
![Page 3: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/3.jpg)
3
Objectives
Particiants should be able to Produce tables of each defined type using Stata Interpret data from these tables
Produce tables of interest for the data set created for the district in the previous session.
![Page 4: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/4.jpg)
4
Menus for Stata tables
From Statistics Summaries, tables and tests Some commands
TableTabstatTabsumTabulateTab1
To explore table facilities, we will open the data file K_combined_labelled.dta
![Page 5: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/5.jpg)
5
Menus for Stata tables
![Page 6: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/6.jpg)
6
Different menu options
Match these options to the different types of table that are needed to process survey data
![Page 7: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/7.jpg)
7
One-way table
Open the data file K_combined_labelled.dta
Statistics => Summaries, tables & tests => Tables => One-way tables
![Page 8: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/8.jpg)
8
Results for a one-way table
Check you can interpret these results
![Page 9: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/9.jpg)
9
Multiple one-way tables
Statistics => Summaries, tables & tests => Tables => Multiple one-way tables
![Page 10: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/10.jpg)
10
Tables using commands
The commands are simple. For one-way tables try
tab q31
For several one-way tables, use tab1, e.g. tab1 region rurban q11 a31
For two-way tables, try tab q11 q16
![Page 11: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/11.jpg)
11
Try the optionsUse the dialogue – with the options for Missing and/or sorting
Type tab1 q126 q127 q128 q129 q31, missing sortWhat effects do the options sort and missing have?
![Page 12: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/12.jpg)
12
Your turn One-way and two-way tables
Work through sections 7.1.4 and 7.2 in the Guide. Include 7.2.1 where you check for coding Include 7.2.2 for lists of two-way tables
Type tab q31 q126, Then repeat with tab replaced by tab1. Explain the difference between tab1 and tab to your
neighbour.
![Page 13: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/13.jpg)
13
Percentages – interpret results
Interpet the results from this table
Repeat, but getting column percentages. Interpret those results
Hence explain which set of percentages is more appropriate in this table
![Page 14: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/14.jpg)
14
Multi-way tables
Can use tabulate command with by prefix. For example: bysort rurban: tab q128 q11, row Or the “two-way tables” dialogue
Or use the more powerful table command table q128 q11, contents(freq) by(rurban) row col Or the “Tables of summary statistics (tables) dialogue See result in next slide
![Page 15: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/15.jpg)
15
A three-way table
Interpret these results
Then use the Two-way tables
(with By)
To give row or column percentages
![Page 16: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/16.jpg)
16
Second exampleUse the dialogue or the command
table q11 rurban q126, by(q16)Where the row var = Sex (q11)
Column variable = RurbanSupercolumn variable = Employed (q126)Superrow variable =Literacy (q16)
Employed and Rurban Employed Unemployed
Rural Urban Rural urban Male 102 6 51 1 Can read Female 44 10 20 0 Male 14 0 19 0
Literacy and sex
Cannot read Female 29 0 25 0
Interpret the table
Try the variables in different orders, to see if your interpretation is simplified
![Page 17: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/17.jpg)
17
Your turn
If you need more time on multi-way tables Then go through Section 7.3 in the guide
Then go through Sections 7.4 and 7.5
![Page 18: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/18.jpg)
18
Tables of summary statistics
Section 7.4 and 7.5 consider summary statistics
For simple tables they use the tabstat dialogue (or command)
Or the table dialogue (or command) is used
![Page 19: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/19.jpg)
19
Dialogue for tabstat command
Menu sequence:
Statistics => Summaries, tables & tests=> Tables => Table of summary statistics (tabstat)
(with Option: Use as columns Statistics)
![Page 20: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/20.jpg)
20
Summary statistics in a table
Note:
a) qd41, qd42, qd43 are expenditures in the previous month for purchase of maize, bean and other seed respectively
b) Omitting the option col(stat) would give the statistics as rows rather than as columns as shown above
![Page 21: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/21.jpg)
21
Dialogue for table command
Menu sequence:
Statistics => Summaries, tables & tests=> Tables => Table of summary statistics
![Page 22: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/22.jpg)
22
Summary statistics in a table
Discuss with your neighbour the difference between use of tabstat and table .
![Page 23: 1 Session 3 Tables in Stata. 2 Importance of tables The analysis of many surveys is primarily Through giving tables And then interpreting the information](https://reader035.vdocuments.mx/reader035/viewer/2022081421/5515f9d655034694308b48a3/html5/thumbnails/23.jpg)
23
Further practical work
Load your own data into Stata, and produce tables that address an objective of interest that you wish to explore with your data.