Learn R Programming

HistDAWass (version 1.0.4)

WH.SSQ: Method WH.SSQ

Description

Compute the sum-of-squares-deviations (from the mean) matrix of a MatH object, i.e. a matrix of numbers, consistent with a set of distributions equipped with a L2 wasserstein metric.

Usage

WH.SSQ(object, ...)

# S4 method for MatH WH.SSQ(object, w = numeric(0))

Arguments

object

a MatH object

...

some optional parameters

w

it is possible to add a vector of weights (positive numbers) having the same size of the rows of the MatH object, default = equal weight for each row

Value

a squared matrix with the weighted sum of squares

Examples

Run this code
# NOT RUN {
WH.SSQ(BLOOD)
# generate a set of random weights
RN<-runif(get.MatH.nrows(BLOOD))
WH.SSQ(BLOOD,w=RN)
# }

Run the code above in your browser using DataLab