





























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Descriptive Statistics. Basic commands detailed in this week's lecture notes: • summarize. • means. • centile. • tabstat. • tabulate ...
Typology: Lecture notes
1 / 37
This page cannot be seen from the preview
Don't miss anything!






























R. Y. Coley
Week of October 7, 2013
Log files save your commands cd /home/students/rycoley/bios514-
log using stata-section-oct7, replace text
insheet using http://courses.washington.edu/b517/Datasets/FEVdata.csv
label variable age "Age (years)"
label variable fev "FEV (L/s)"
label variable height "Height (in)"
Basic commands detailed in this week’s lecture notes:
A few ways:
histogram fev, kdensity by (sex)
kdensity adds smooth line estimating density
dotplot fev
Each dot represents an observations
graph box fev
graph box fev, over(sex)
gen one= graph bar (count) one, over(smoke) ytitle("frequency")
log using cause-of-death, text replace set obs 10 input float deaths str30 cause 700142 "Heart Disease" 553768 "Cancer" 163538 "Cerebrovascular Disease" 123013 "Chronic respiratory disease" 101537 "Accidental Death" 71372 "Diabetes" 62034 "Flu and pneumonia" 53852 "Alzheimer’s disease" 39480 "Kidney disorder" 32238 "Septicemia"
gen dthou=deaths/ graph hbar dthou, over(cause, sort(1) descending) ytitle("Annual deaths (thousands)")
graph pie deaths, over(cause) sort descending