How can I draw a 95% contour in sm.density? For example, y <- cbind(rnorm(50), rnorm(50)) sm.density(y, display = "slice") will give 25%, 50% and 75% contours automatically, but no reference on other values.
On Thu, 27 Oct 2005, Cunningham Kerry wrote:> How can I draw a 95% contour in sm.density? > > For example, > > y <- cbind(rnorm(50), rnorm(50)) > sm.density(y, display = "slice") > > will give 25%, 50% and 75% contours automatically, but > no reference on other values.See ?sm.options, the place to set such options. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Please read the documentation before posting a question. If you read the documentation for sm.density you will see that the argument props will do what you want. i.e. y <- cbind(rnorm(50), rnorm(50)) sm.density(y, display = "slice", props=95) Regards Francisco>From: Cunningham Kerry <kerryrekky at yahoo.com> >To: r-help at stat.math.ethz.ch >Subject: [R] question about sm.density >Date: Thu, 27 Oct 2005 18:47:28 -0700 (PDT) > >How can I draw a 95% contour in sm.density? > >For example, > >y <- cbind(rnorm(50), rnorm(50)) > sm.density(y, display = "slice") > >will give 25%, 50% and 75% contours automatically, but >no reference on other values. > >______________________________________________ >R-help at 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