## A quantitative example with the famous geyser data set
data(geyser)
## add 10 missing values as random
x = as.matrix(geyser); n <- nrow(x); p <- ncol(x);
indexes <- matrix(c(round(runif(5,1,n)), round(runif(5,1,p))), ncol=2);
x[indexes] <- NA;
## estimate model (using fast strategy, results may be misleading)
model <- clusterDiagGaussian( data=x, nbCluster=2:3
, models=c( "gaussian_pk_sjk")
, strategy = clusterFastStrategy()
)
## use graphics functions
if (FALSE) {
plot(model)
}
## get summary
summary(model)
## print model
if (FALSE) {
print(model)
}
## get estimated missing values
missingValues(model)
Run the code above in your browser using DataLab