Learn R Programming

PredPsych (version 0.4)

ModelCluster: Model based Clustering

Description

A simple function to perform Model based cluster Analysis :

Usage

ModelCluster(Data, NewData = NULL, G, silent = FALSE, ...)

Arguments

Data

(dataframe) Data dataframe

NewData

(optional) (dataframe) New Data frame for which the class membership is requested

G

(optional) (numeric) No. of components to verify

silent

(optional) (logical) whether to print messages or not

...

(optional) additional arguments for the function

Value

class membership of the clustered NewData

Details

The function implements Model based clustering in predictive framework. Model based clustering approaches provide a structured way of choosing number of clusters (C. Fraley & Raftery, 1998). Data are considered to be generated from a set of Gaussian distributions (components or clusters) i.e. as a mixture of these components (mixture models). Instead of using heuristics, model based clustering approximates Bayes factor (utilizing Bayesian information Criterion) to determine the model with the highest evidence (as provided by the data).

References

Han, J., Kamber, M., & Pei, J. (2012). Cluster Analysis. In Data Mining (pp. 443-495). Elsevier.

Fraley, C., & Raftery, a E. (1998). How Many Clusters? Which Clustering Method? Answers Via Model-Based Cluster Analysis. The Computer Journal, 41(8), 578-588.

Examples

Run this code
# NOT RUN {
# clustering kinematics data at 10% of movement
# not run
# cluster_time <- ModelCluster(KinData[,c(2,12,22,32,42,52,62,72,82,92,102,112)],G=1:12)
# Output:
# Performing Cluster analysis 
# --cluster Results --
# }

Run the code above in your browser using DataLab