[R] Problem with mclust surfacePlot function
Mike White
mikewhite.diu at tiscali.co.uk
Thu May 6 16:03:25 CEST 2004
I am trying to follow the mclust examples in "MCLUST: Software for Model
Based Clustering, Density Estimation and Disriminant Analysis" by Chris
Fraley and Adrian Raftery, but I cannot reproduce the density and
uncertainty surfaces for the Lansing Woods maples. I am using R 1.8.1 with
the code below. The same code works fine in S-Plus 6.2
Am I missing something or is this a bug?
Thanks
Mike White
library(mclust)
data(lansing) # R only
maples<-lansing[as.character(lansing[,"species"]) == "maple", -3]
maplesBIC <- EMclust(maples)
maplesModel <- summary(maplesBIC, maples)
plotMaples2 <- function(type, what, transformation)
{
out <- do.call("surfacePlot", c(maplesModel, list(data=maples, type=type,
what=what,transformation=transformation)))
invisible()
}
par(pty="s", mfrow=c(1,2))
plotMaples2(type="contour", what="density", transformation="log")
par(pty="s")
plotMaples2(type="contour", what="uncertainty", transformation = "log")
More information about the R-help
mailing list