Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Data Analysis with STATA

You're reading from  Data Analysis with STATA

Product type Book
Published in Oct 2015
Publisher Packt
ISBN-13 9781782173175
Pages 176 pages
Edition 1st Edition
Languages

Table of Contents (16) Chapters

Data Analysis with Stata
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Introduction to Stata and Data Analytics Stata Programming and Data Management Data Visualization Important Statistical Tests in Stata Linear Regression in Stata Logistic Regression in Stata Survey Analysis in Stata Time Series Analysis in Stata Survival Analysis in Stata Index

Scatter plots


Let's start with scatter plots. Assume that your data has variable A and variable B with a lot of values. You need to find a correlation between variable A and variable B. Before you find the correlation, you need to plot the scatter graph of these two variables.

Select twoway graphs from the Stata tool list and follow the following steps:

  1. Click on the Create button. Here is what the box will look like:

  2. Select Basic plots and select the type of the plot as Scatter plot.

  3. Select X and Y variable, as shown in the next screenshot:

  4. Click on the Accept button after performing the required changes, as shown in the preceding screenshot.

  5. Your output window will open with scatter plot, as shown in the next screenshot:

What if you need to add more variables and create complex scatter plots? You can add as many variables as you want and observe the clusters that are naturally available in the scatter plot. Here is a procedure to perform this:

  1. Click on the graphing tool again.

  2. In the list of variables...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}