> Finally I got the unreasonable contour plotted.
>
> http://www.geocities.com/useebi/data/kdecontour.jpeg
>
> The codes to get the plot,
>
> cdplot2d(survived ~ age + sibsp, data = titanic3)
>
> are in http://www.geocities.com/useebi/data/cdplot2d.txt
>
> One step that I couldn't accomplish as in cdplot is to eliminate those
> undefined conditional densities outside the ranges of the two covariates.
> The plot dosen't make sense for areas with no x and y observation. Probably,
> this is why the goal did not sound like anything reasonable.
You can do something pretty similar with ggplot:
qplot(age, sibsp, . ~ survived, data=titanic3, type=c("jitter","2density"))
(except clearly the density calculation is very different)
Hadley
______________________________________________
[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
and provide commented, minimal, self-contained, reproducible code.