Visualizes the results of BayesSpace::qTune() to determine the optimal number of clusters.

plotLoglik(object, elbow = TRUE)

Arguments

object

An object of class SPATA2 or, in case of S4 generics, objects of classes for which a method has been defined.

Value

A ggplot.

Details

For this function to work the results of runBayesSpaceClustering() are required.

Examples

library(SPATA2)

data("example_data")

object <- example_data$object_UKF275T_diet

# this might take some time...
object <- runBayesSpaceClustering(object, name = "bspace", qs = 3:15)

plotLoglik(object)