The seven commands for summary statistics: describe, list, codebook, summarize, tabulate, table, tabstat.
The codes in this video:
.clear
.cls
.sysuse nlsw88.dta, clear
** Describe **
.describe
.describe, fullnames
** List **
.list in 1/10
.list idcode wage union in 1/10
.list idcode wage hours union never_married in 1/10
.list idcode wage hours union never_married in 1/10, abbreviate(13)
.list idcode wage hours union never_married in 1/10, abbreviate(13) divider
.list idcode wage hours union never_married in 1/10, abbreviate(13) divider separator(0)
.list idcode wage hours union never_married in 1/10, abbreviate(13) divider separator(2)
.list idcode wage hours union never_married in 1/10, abbreviate(13) divider separator(2) noobs
** Codebook **
.codebook wage
.codebook union
.codebook, compact
** Summarize **
.summarize
.summarize wage, detail
.bysort union: summarize wage hours
** Mean **
.mean wage
** Tabulate **
.tabulate union
.tabulate union, summarize(wage)
.tabulate union south
** Table **
.table union
.table union, by(collgrad)
.table union race, by(collgrad)
.table union race married, by(collgrad)
** Tabstat **
.tabstat wage hours tenure, statistics(n mean sd min max p50)
.tabstat wage hours tenure, statistics(n mean sd min max p50) columns(statistics)
.tabstat wage hours tenure never_married, statistics(n mean sd min max p50) columns(statistics)
.tabstat wage hours tenure never_married, statistics(n mean sd min max p50) columns(statistics) varwidth(13) format(%9.2f)
.tabstat wage hours tenure never_married, statistics(n mean sd min max p50) columns(statistics) varwidth(13) format(%9.2f) by(south)
Some courses on my Youtube channel:
Introductory Stata:
• Introductory Stata (2022)
Introductory Microeconomics:
• Introductory Microeconomics (2022)
【粵語Cantonese】微觀經濟學基礎:
• 粵語Cantonese微觀經濟學基礎2022
Introductory Econometrics:
• Solutions to Introductory Econometrics A M...
Five Minute Econometrics:
• Five Minute Econometrics (Econometrics Tut...
【Mandarin國語】五分鐘計量經濟學
• 【Mandarin國語】五分鐘計量經濟學(計量經濟學輔導)
【Cantonese粵語】五分鐘計量經濟學
• 【Cantonese粵語】五分鐘計量經濟學(計量經濟學輔導)
On the Road:
• On the Road
My free online Stata course on Alison:
https://alison.com/course/introductor...