R Stata - Data and Statistical Services - Princeton University
R Stata - Data and Statistical Services - Princeton University
R Stata - Data and Statistical Services - Princeton University
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
# Histograms overlaid<br />
hist(mydata$SAT, breaks="FD", col="green")<br />
hist(mydata$SAT[mydata$Gender=="Male"],<br />
breaks="FD", col="gray",<br />
add=TRUE)<br />
legend("topright", c("Female","Male"),<br />
fill=c("green","gray"))<br />
R <strong>Stata</strong><br />
Histograms<br />
hist sat<br />
hist sat, normal<br />
hist sat, by(gender)<br />
24