Hello,
try to look at those pages :
library(MASS) ?kde2d ?contour ?image ?persp
x11(height=6,width=12) par(mfrow=c(1,2)) X <- rnorm(200) Y <- rnorm(200) d <- kde2d(X,Y) persp(d,phi=30,theta=30)
image(d,col=terrain.colors(25)) contour(d,add=T)
Romain.
Le 05.02.2005 23:51, Yulei He a �crit :
Hi, there.
Suppose I have a bivarariate data matrix y1 and y2. I want to plot a 3-D picture of the estimated density f(y1, y2) against y1 and y2? How can I do that? Do I use persp() or density()?
density is for 1d estimation of density.
Thanks for your help.
Yulei
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Yulei He 1586 Murfin Ave. Apt 37 Ann Arbor, MI 48105-3135 [EMAIL PROTECTED] 734-647-0305(H) 734-763-0421(O) 734-763-0427(O) 734-764-8263(fax) $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
-- Romain FRANCOIS : [EMAIL PROTECTED] page web : http://addictedtor.free.fr/ (en construction) 06 18 39 14 69 / 01 46 80 65 60 _______________________________________________________ Etudiant en 3eme ann�e Institut de Statistique de l'Universit� de Paris (ISUP) Fili�re Industrie et Services http://www.isup.cicrp.jussieu.fr/
______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
