I tried doing it this way. left<--2.3 right<-2.3 p <- seq(0.001,0.999,,1000) x <- qt(p,df=9) y <- dt(x,df=9) plot(x,y,type="l") x.tmp<-x y.tmp<-y a<-which(x<=left) polygon(x=c(x.tmp[a],rev(x.tmp[a])),y=c(y.tmp[a],rep(0,length(y.tmp[a]))),col="gray90") b<-which(x>=right) polygon(x=c(x.tmp[b],rev(x.tmp[b])),y=c(y.tmp[b],rep(0,length(y.tmp[b]))),col="gray90")
Please let me know if I have made any mistakes. Thanks ../Murli -----Original Message----- From: Richard M. Heiberger [mailto:[EMAIL PROTECTED] Sent: Thu 8/2/2007 10:25 AM To: Nair, Murlidharan T; Stephen Tucker; r-help@stat.math.ethz.ch Subject: Re: [R] t-distribution I believe you are looking for the functionality I have in the norm.curve function in the HH package. Download and install HH from CRAN and then look at example(norm.curve) ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.