Skip to contents

Implement clustering

Usage

clusimp(
  df,
  id = "ID",
  column = "Predicted class",
  local_stand = FALSE,
  local_cut = FALSE
)

Arguments

df

dataframe containing at least an ID-column and the variables required for the clustering implementation

id

string, column name of the IDs in df, default is ID

column

string, the name of the columnn containing the predicted class membership, default is Predicted class

local_stand

boolean, whether standardisation should be performed independently of the original standardisation performed when deriving the model. If TRUE, input data will be standardised to a mean of 0 and sd of 1. If FALSE, input data will be standardised using the standardisation performed when deriving the model.

local_cut

boolean, whether original cut-offs for categorisation should be used, default is FALSE and required FALSE if df contains less than 4 rows.

Value

a dataframe containing the original data and the predicted class membership. If PCA and categorisation is performed, the output of these actions is also added to the dataframe with the suffices _pca and _categories