ssq {lazy.mat}R Documentation

Returns the (doubly weighted) sum of squares of all the elements of A

Description

ssq(A,U,V) = tr( t(A) %*% U %*% A %*% V )

Usage

ssq(A, U = NULL, V = NULL)

Arguments

A

Input matrix or vector

U

Row weight matrix: nrow(A) x nrow(A)

V

Column weight matrix: ncol(A) x ncol(A)

Details

Can be used with a character matrix.

Value

The weighted sum of squares of all the elements of A

Examples

ssq(demomat(3,2)) - sum(demomat(3,2)^2)


[Package lazy.mat version 0.1.3 Index]