1 SESSION 5 Graphs for data analysis. 2 Objectives To be able to use STATA to produce exploratory and presentation graphs In particular Bar Charts Histograms.

Slides:



Advertisements
Similar presentations
TWO STEP EQUATIONS 1. SOLVE FOR X 2. DO THE ADDITION STEP FIRST
Advertisements

BASIC SKILLS AND TOOLS USING ACCESS
Tutorial 10 – Managing Long Documents
Tutorial 9 – Creating On-Screen Forms Using Advanced Table Techniques
XP New Perspectives on Microsoft Office Word 2003 Tutorial 6 1 Microsoft Office Word 2003 Tutorial 6 – Creating Form Letters and Mailing Labels.
XP New Perspectives on Microsoft Office Word 2003 Tutorial 7 1 Microsoft Office Word 2003 Tutorial 7 – Collaborating With Others and Creating Web Pages.
Coordinate Plane Practice The following presentation provides practice in two skillsThe following presentation provides practice in two skills –Graphing.
Michigan Electronic Grants System Plus
SUBTRACTING INTEGERS 1. CHANGE THE SUBTRACTION SIGN TO ADDITION
Addition Facts
1 Data processing and exporting Module 2 Session 6.
Module Introduction and Getting Started with Stata
Session 3 Tables in Stata.
1 Adding a statistics package Module 2 Session 7.
Housekeeping: Variable labels, value labels, calculations and recoding
Creating Data Entry Screens in Epi Info
SADC Course in Statistics Organising data in a spreadsheet Module B2 Sessions 9 and 10.
1 SESSION 6 Using tables and graphs in project work.
SADC Course in Statistics Good graphs & charts using Excel Module B2 Sessions 6 & 7.
Microsoft Project Tutorial for Chapters 6 & 7
5-1 5 Tour of ArcMap and ArcCatalog ArcGIS for Assessors 1.
Excel Functions. Part 1. Introduction 2 An Excel function is a formula or a procedure that is performed in the Visual Basic environment, outside the.
1 After completing this lesson, you will be able to: Compose, address, and send messages. Format the body of a message. Attach a file to a message. Check.
1 of 22 International Reports Phase 2/ DA0539-w1 Last updated: International Reports Phase 2.
How To Use Google Forms to Create A Test Quick Easy Self-Graded!! Instant Reports.
Setting up Articles Throughout this slide show there will be hyperlinks (highlighted in blue) follow the hyperlinks to navigate to the specified Topic.
Unit 8: Presenting Data in Charts, Graphs and Tables
1 An Introduction to Pivot Tables Using Excel 2000.
© Paradigm Publishing, Inc Access 2010 Level 1 Unit 1Creating Tables and Queries Chapter 2Creating Relationships between Tables.
Creating Tables in a Web Site
Microsoft Access.
Vanderbilt Business Objects Users Group 1 Reporting Techniques & Formatting Beginning & Advanced.
Reporting Throughout this slide show there will be hyperlinks (highlighted in blue). Follow the hyperlinks to navigate to the specified Topic or Figure.
Integration Integrating Word, Excel, Access, and PowerPoint
Creating Section 508 Compliant Documents & Presentations
Microsoft Office Illustrated Fundamentals Unit C: Getting Started with Unit C: Getting Started with Microsoft Office 2010 Microsoft Office 2010.
Benchmark Series Microsoft Excel 2013 Level 2
National Center for Health Statistics Data Online Query System Overview
Data Analysis using SPSS By Dr. Shaik Shaffi Ahamed Ph. D
Chapter 5 Microsoft Excel 2007 Window
David Walker Ottawa TMG Users Group 15 March 2014.
Step-by-Step: Insert a Section Break
Step-by-Step: Turn on Widow/Orphan Control
Lab # 03- SS Basic Graphic Commands. Lab Objectives: To understand M-files principle. To plot multiple plots on a single graph. To use different parameters.
Step-by-Step: Add a Graphical Hyperlink USE the Special Events Final presentation that is still open from the previous exercise. 1.Go to slide 4, and click.
Working with Tables for Page Design – Lesson 41 Working with Tables for Page Design Lesson 4.
Learning the Basics – Lesson 1
Addition 1’s to 20.
INTRODUCTORY MICROSOFT WORD Lesson 7 – Working With Documents
25 seconds left…...
February Reviewing and Approving an Expense Report Press F5 to begin the slide show. Slides will automatically advance.
Week 1.
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. a lesson approach Microsoft® PowerPoint 2010 © 2011 The McGraw-Hill Companies,
TM Graphical Monitoring Electronic Service Tools.
Windfall Web Throughout this slide show there will be hyperlinks (highlighted in blue). Follow the hyperlinks to navigate to the specified Topic or Figure.
Benchmark Series Microsoft Excel 2013 Level 2
AoN Session 2. Highlight a number of cells at the top of the page. Then with the cursor over these cells right click. Scroll down to the format cell.
1 Using SPSS: Descriptive Statistics Department of Operations Weatherhead School of Management.
A Simple Guide to Using SPSS© for Windows
Histograms and Polygons Problem 24 page 42. Here I copied the data created in the other section. Notice how I put the labels. I put Frequency instead.
SW318 Social Work Statistics Slide 1 Using SPSS for Graphic Presentation  Various Graphics in SPSS  Pie chart  Bar chart  Histogram  Area chart 
SPSS Statistical Package for the Social Sciences is a statistical analysis and data management software package. SPSS can take data from almost any type.
Introduction to SPSS Short Courses Last created (Feb, 2008) Kentaka Aruga.
How To Make Graphs in Microsoft Excel Outline Making Bar Graphs Making Scatter Plots – 1 series Making Scatter Plots – Multiple Series.
1 Organising data in a spreadsheet Module 1 Session 3.
1 An Introduction to SPSS for Windows Jie Chen Ph.D. 6/4/20161.
Introduction to Engineering Microsoft Excel 1 Agenda Tables, Charts, & Graphs.
Setting up Solver Add-in for Excel
DEPARTMENT OF COMPUTER SCIENCE
Presentation transcript:

1 SESSION 5 Graphs for data analysis

2 Objectives To be able to use STATA to produce exploratory and presentation graphs In particular Bar Charts Histograms and Box Plots Scatter Plots and Scatterplot Matrices

3 Graphics Menu Dialogue resulting from Two-way graph (scatter, line, etc.) and its option Create

4 Demonstration: Bar charts Open the file K_combined_labelled.dta We can demonstrate plotting a bar chart for a categorical variable using the menu sequence Graphics Histogram

5 Graphics Histogram dialogue

6 Completing the dialogue box In the histogram dialogue box, select the variable q34. This has codes 1 to 7 for main sources of drinking water. Select discrete Specify that the y axis should show Frequency Note that after clicking on Submit, the command histogram q34, discrete frequency appears in the Command & Results windows

7 Results

8 Improving your bar chart Use Graphics Histogram Ensure dialogue is as shown in slide 5 Click on Bar Properties and select Bar gap as 30 (see Figure on left). Click Accept, then OK. Is the graph better?

9 Learning to add bar labels Return to the full Histogram dialogue above Select option X-Axis, then click on Major tick/label properties. In the resulting dialogue, give the Axis rule as Custom and give the Custom rule as 1(1)7 – see figure on left of slide below. Move also to the Labels option and check Use value labels below and click Accept See dialogue as shown in next slide

10 Adding bar labels The 1(1)7 Rule means – place ticks (and therefore labels) from 1 to 7 in steps of 1 on the X axis

11 Bar chart with labels Look at the resulting graph) Is it better?

12 Using Stata commands The command to produce the above, on one line, is: histogram q34, discrete frequency gap(30) xlabel( 1(1)7, valuelabel) If there were no labels, or we wanted shorter ones, then use the command (again on one line): histogram q34, discrete frequency gap(30) xlabel(1 "pipe" 2 "pub" 3 "well1" 4 "well2" 5 "riv" 6 "vend" 7 "oth") BUT DO NOT TYPE THESE YET!

13 Bar charts to aid comparisons e.g. employment across gender Our aim now is to display results of this table in the form of two bar charts, one for males and one for females. Above produced using the command.tabulate q130 q11, column nofreq

14 Menu sequence for producing the corresponding charts Start with the Graphics Histogram dialogue The variable q130 gives the employment class of the head of the household. Select this variable, request Y- Axis to display percent and ensure bar gap is still at 30. In the X-Axis option, click on Major tick/label properties, and ensure Custom Rule is now 1(1)11, then move to Labels and ensure use value labels are ticked, and Angle is 45.

15 producing the charts cont… Now go to the By option, and select q11 (i.e. sex), as variable for subgraphs. Click on Subgroup organisation and in the resulting dialogue, request Rows/Columns to be 2 Rows. Click Accept, then OK. See next slide for the resulting graph.

16 Bar charts for comparisons This is an example of a graph that would be difficult with a spreadsheet Employment for Males shown separately from that for females

17 Do files Sometimes it is useful to use commands Stata commands can become quite complicated. Sometimes useful to run a set of commands. They can be saved in a Do file. What is a Do file? A set of commands In other packages these are called syntax or batch files Why use do files Good practice in data management Repeatability of steps

18 Opening a new Do file Through the Do-file Editor icon or Window, or press 8

19 Example of a Do-file To run a Do-file, use the Do current file icon or use Tools Do

20 Making a Do file Open a new Do file Copy & paste, or type in one or more of the graphics commands on slide 12 or others you have produced Include some comments, preceded by a * or included between /* */ to indicate the analysis being done Then save the Do file. This will have.do as its extension.

21 Your Turn Now…. Go through Section 6.3 Use the same histogram dialogue (page 76) to go through Section 6.4 Do the following exercises from the guide, saving your commands in a Do file as you go along Histogram and box plots for a continuous variable, in sections and Scatter plots, sections & Load your own data into Stata, and produce graphs that address an objective of interest.