2Importance of tables The analysis of many surveys is primarily Through giving tablesAnd then interpreting the informationSimple tables are one-way frequenciesOr of percentagesOr Multi-way frequencies (or percentages)Tables can also contain summary statisticsLike means
3Objectives Particiants should be able to Produce tables of each defined type using StataInterpret data from these tablesProduce tables of interest for the data set created for the district in the previous session.
4Menus for Stata tablesFrom Statistics Summaries, tables and testsSome commandsTableTabstatTabsumTabulateTab1To explore table facilities, we will open the data file K_combined_labelled.dta
10Tables using commands The commands are simple. For one-way tables try tab q31For several one-way tables, use tab1, e.g.tab1 region rurban q11 a31For two-way tables, trytab q11 q16
11Try the optionsUse the dialogue – with the options for Missing and/or sortingType tab1 q126 q127 q128 q129 q31, missing sortWhat effects do the options sort and missing have?
12Your turn One-way and two-way tables Work through sections and 7.2 in the Guide.Include where you check for codingInclude for lists of two-way tablesType tab q31 q126,Then repeat with tab replaced by tab1.Explain the difference between tab1 and tab to your neighbour.
13Percentages – interpret results Interpet the results from this tableRepeat, but getting column percentages. Interpret those resultsHence explain which set of percentages is more appropriate in this table
14Multi-way tables Can use tabulate command with by prefix. For example: bysort rurban: tab q128 q11, rowOr the “two-way tables” dialogueOr use the more powerful table commandtable q128 q11, contents(freq) by(rurban) row colOr the “Tables of summary statistics (tables) dialogueSee result in next slide
15A three-way table Interpret these results Then use the Two-way tables (with By)To give row or column percentages
16Second example table q11 rurban q126, by(q16) Use the dialogue or the commandtable q11 rurban q126, by(q16)Where the row var = Sex (q11)Column variable = RurbanSupercolumn variable = Employed (q126)Superrow variable =Literacy (q16)Interpret the tableTry the variables in different orders, to see if your interpretation is simplified
17Your turn If you need more time on multi-way tables Then go through Section 7.3 in the guideThen go through Sections 7.4 and 7.5
18Tables of summary statistics Section 7.4 and 7.5 consider summary statisticsFor simple tables they use the tabstat dialogue (or command)Or the table dialogue (or command) is used
19Dialogue for tabstat command Menu sequence:Statistics=> Summaries, tables & tests=> Tables=> Table of summary statistics (tabstat)(with Option:Use as columns Statistics)
20Summary statistics in a table Note:qd41, qd42, qd43 are expenditures in the previous month for purchase of maize, bean and other seed respectivelyOmitting the option col(stat) would give the statistics as rows rather than as columns as shown above
21Dialogue for table command Menu sequence:Statistics =>Summaries, tables & tests=> Tables=> Table of summary statistics
22Summary statistics in a table Discuss with your neighbour the difference between use of tabstat and table .
23Further 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.