How to Draw Bar Charts for Two Categorical Variables? | Stata Graphics | Stata Tutorials Topic 10

Описание к видео How to Draw Bar Charts for Two Categorical Variables? | Stata Graphics | Stata Tutorials Topic 10

Stata Tutorials Topic 10: Bar Charts for Two Categorical Variables

Please download the dataset for this video:
https://drive.google.com/file/d/1QZt_...

Hi, I am Bob. Let’s continue our Stata graphics and data visualization course. When we want
to visualize the relationship between two categorical variables, we can use bar charts or stacked bar charts.

The Stata commands in this video:
*use the course dataset
use "/Users/bobwen/Documents/10. Alison/Datasets/bob.dta", clear

tabulate married
tabulate agegroup

*bar charts
graph bar (count), over(married) over(agegroup)

graph bar (count), over(agegroup) over(married)

graph bar (percent), over(married) over(agegroup) blabel(bar)

*stacked bar charts
graph bar (percent), over(health) over(agegroup) stack asyvars

graph bar (percent), over(health) over(agegroup) stack asyvars percentage

graph hbar (percent), over(health) over(agegroup) stack asyvars percentage

graph hbar (percent), over(health) over(agegroup) stack asyvars percentage blabel(bar, pos(center) format(%3.1f)) ytitle(Percentage)

graph hbar (percent), over(health) over(gender) over(agegroup) stack asyvars percentage


【Some courses on my Youtube channel 】
Economics in Real Life:
   • Economics in Real Life  

Solutions to Introductory Econometrics A Modern Approach 7th Edition:
   • Solutions to Introductory Econometric...  

Introductory Stata:
   • Introductory Stata (2022)  

Introductory Microeconomics:
   • Introductory Microeconomics (2022)  

Five Minute Econometrics:
   • Five Minute Econometrics (Econometric...  

Five Minute Stata:
   • Stata Tutorials  

【國語Mandarin】生活中的經濟學:
   • 【Mandarin國語】現實生活中的經濟學  

【粵語Cantonese】生活中的經濟學:
   • 【Cantonese粵語】現實生活中的經濟學  

【粵語Cantonese】微觀經濟學基礎:
   • 粵語Cantonese微觀經濟學基礎2022  

【國語Mandarin】五分鐘計量經濟學:
   • 【Mandarin國語】五分鐘計量經濟學(計量經濟學輔導)  

【粵語Cantonese】五分鐘計量經濟學:
   • 【Cantonese粵語】五分鐘計量經濟學(計量經濟學輔導)  

On the Road:
   • On the Road  

#BarChart #StackedBar #Stata #StataGraph #tutorial

Комментарии

Информация по комментариям в разработке