# # Load the "Nassau County Racial Imbalance" Data # downloaded from # http://www.stat.washington.edu/handcock/594/Data/lischool.RData # load("lischool.RData") # # Convert proportion of white # pwhite <- lischool[,"WHITE"] / lischool[,"TOTAL"] # pdf(file = "FigLec6.2.pdf",width=10.5,height=7.5,horiz=T) par(mfrow=c(1,2)) # hist(pwhite, type='n', probability=T, main="Nassau County Schools", ylim=c(0,5.5), xlab = "Proportion of White Students", ylab = "Probability") lines(density(pwhite, bw="SJ")) rug(pwhite) # bw.SJ(pwhite) # # 0.03278538 # # add a legend # legend(x=c(0,0),y=c(3.5,3.5),lty=1,legend=c("default=Sheather-Jones")) # hist(pwhite, type='n', probability=T, main="Nassau County Schools", ylim=c(0,5.5), xlab = "Proportion of White Students", ylab = "Probability") lines(density(pwhite, bw=0.025)) lines(density(pwhite, bw=0.050), lty=2) rug(pwhite) # # add a legend # legend(x=c(0,0),y=c(3.5,3.5),lty=1:2,legend=c("h=0.025","h=0.050"))