Thank you all for the great help. I think the optimize function and approach solves my problem well. Edwin Sun -- View this message in context: http://r.789695.n4.nabble.com/dnorm-and-qnorm-tp3040427p3041962.html Sent from the R help mailing list archive at Nabble.com.