Skip to contents

This function generates a dataset consisting of multiple Gaussian clusters.

Usage

make_multigau(n = c(300, 200, 500), p = 4, k = 3, loc = NULL, scale = NULL)

Arguments

n

A numeric vector (default: c(300, 200, 500)) representing the sample sizes.

p

A numeric value (default: 4) representing the number of dimensions.

k

A numeric value (default: 5) representing the number of clusters.

loc

A numeric matrix (default: NULL) representing the locations/centroids of clusters.

scale

A numeric vector (default: NULL) representing the scaling factors of clusters.

Value

A data containing the Gaussian clusters.

Examples

loc_matrix <- matrix(c(0, 0, 0, 0,
5, 9, 0, 0,
3, 4, 10, 7
), nrow = 4, byrow = TRUE)
multigau <- make_multigau(n = c(300, 200, 500), p = 4, k = 3, loc = loc_matrix, scale = c(0.2, 1.5, 0.5))
#> Error in make_multigau(n = c(300, 200, 500), p = 4, k = 3, loc = loc_matrix,     scale = c(0.2, 1.5, 0.5)): object 'shape' not found