Stata Tutorials Topic 1: Histogram Plots for a Single Continuous Variable
Please download the dataset for this video:
https://drive.google.com/file/d/1QZt_...
This free online course introduces you to the Stata commands that graph the distribution of a continuous
variable, the frequency of a categorical variable, and the relationship between two variables. You will learn
to use various graphs to visualize data for different variable types. Using Stata graph options, you can
customize markers, lines, axes, titles, and legends.
After completing this course, you will be able to:
• Visualize the distribution of a continuous variable using histograms, box plots, and density plots
• Show the frequency or percentage of a categorical variable using bar charts and pie charts
• Explore the relationship between two variables with scatter plots, bubble plots, line plots, and dot
charts
• Customize markers, lines, axes, labels, titles, and legends with Stata graph options
• Combine multiple graphs into one graph and save and export graphs
Topic 1: Histogram Plots for a Single Continuous Variable
We use the Stata command “histogram” to draw a histogram for a continuous variable. A continuous
variable can take any real number. When we see a continuous variable, we usually want to know its
distribution, whether it is normally distributed or is right or left-skewed. The histogram command helps
us visualize the distribution. It demonstrates how many observations are in a specific range and where
observations concentrate.
The Stata commands in this video:
*use the course dataset I created from PSID
use "/Users/bobwen/Documents/10. Alison/Datasets/bob.dta", clear
describe
*histogram
histogram hwage
*histogram with bin options
histogram hwage, bin(10)
histogram hwage, bin(100)
histogram hwage, width(5)
*histogram with different y-axis definition
histogram hwage, density
histogram hwage, percent
histogram hwage, frequency
*add labels to bins
histogram hwage, bin(15) percent addlabels
*histogram for log of hourly wage
histogram lwage
#histogram #Stata #StataGraphics #DataVisualization
Some courses on my Youtube channel:
Solutions to Introductory Econometrics A Modern Approach 7th Edition:
• Solutions to Introductory Econometrics A M...
Introductory Stata:
• Introductory Stata (2022)
Introductory Microeconomics:
• Introductory Microeconomics (2022)
Five Minute Econometrics:
• Five Minute Econometrics (Econometrics Tut...
【粵語Cantonese】微觀經濟學基礎:
• 粵語Cantonese微觀經濟學基礎2022
【Mandarin國語】五分鐘計量經濟學
• 【Mandarin國語】五分鐘計量經濟學(計量經濟學輔導)
【Cantonese粵語】五分鐘計量經濟學
• 【Cantonese粵語】五分鐘計量經濟學(計量經濟學輔導)
On the Road:
• On the Road