compute_sufficient_statistics {fabMix} | R Documentation |
Compute sufficient statistics
Description
Compute sufficient statistics given y
and z
.
Usage
compute_sufficient_statistics(y, z, K, x_data)
Arguments
y |
|
z |
Allocation vector |
K |
Number of components |
x_data |
|
Value
A list with six entries of sufficient statistics.
cluster_size |
Integer vector of length |
sx |
|
sy |
|
sxx |
Not used |
syy |
|
sxy |
|
Author(s)
Panagiotis Papastamoulis
Examples
data(waveDataset1500)
x_data <- as.matrix(waveDataset1500[ 1:20, -1]) # data
z <- waveDataset1500[ 1:20, 1] # class
p <- dim(x_data)[2]
n <- dim(x_data)[1]
q <- 2
K <- length(table(z)) # 3 classes
# give some arbitrary values to the parameters:
set.seed(1)
y <- array(rnorm(n = q*n), dim = c(n,q))
# compute sufficient stats
suf_stat <- compute_sufficient_statistics(y = y,
z = z, K = K, x_data = x_data)
[Package fabMix version 5.1 Index]