Learn R Programming

fabMix (version 5.1)

compute_sufficient_statistics_q0: Compute sufficient statistics for \(q = 0\)

Description

Compute sufficient statistics given \(z\).

Usage

compute_sufficient_statistics_q0(z, K, x_data)

Value

A list with six entries of sufficient statistics.

cluster_size

Integer vector of length \(K\)

sx

\(K\times p\) array

sy

Not used here

sxx

Not used

syy

Not used here

sxy

Not used here

Arguments

z

Allocation vector

K

Number of components

x_data

Data

Author

Panagiotis Papastamoulis

Examples

Run this code
        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
	# compute sufficient stats 
	suf_stat <- compute_sufficient_statistics_q0(
	 z = z, K = K, x_data = x_data)

Run the code above in your browser using DataLab