Learn R Programming

MixAll (version 1.5.10)

missingValues: Return the missing values of a component or a cluster class.

Description

The missing methods allow the user to get the imputed mssing values from a mixture model.

Usage

missingValues(x)

# S4 method for ClusterMixedDataModel missingValues(x)

# S4 method for ClusterDiagGaussianComponent missingValues(x)

# S4 method for ClusterDiagGaussian missingValues(x)

# S4 method for ClusterGammaComponent missingValues(x)

# S4 method for ClusterGamma missingValues(x)

# S4 method for ClusterCategoricalComponent missingValues(x)

# S4 method for ClusterCategorical missingValues(x)

# S4 method for ClusterPoissonComponent missingValues(x)

# S4 method for ClusterPoisson missingValues(x)

# S4 method for ClusterPredict missingValues(x)

# S4 method for ClusterPredictMixedData missingValues(x)

# S4 method for KmmComponent missingValues(x)

# S4 method for KmmModel missingValues(x)

Value

A matrix with three columns (row index, column index, value)

Arguments

x

an object that can return the imputed missing values

Examples

Run this code
if (FALSE) {
## add 10 missing values as random
data(geyser)
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, strategy = clusterFastStrategy())
missingValues(model)
}

Run the code above in your browser using DataLab