CCDiff.default {BSagri}R Documentation

Compute contrasts of chains of joint empirical distributions.

Description

Compute contrasts of chains of joint empirical distributions. For internal use.

Usage

CCDiff.default(x, cmat)

Arguments

x

an N times K matrix with numeric entries

cmat

a contrast matrix with K columns

Details

Denote the elements of x by x_{nk} and denote the elements of cmat by c_{mk}. Function CCDiff.default simply calculates:

\sum_{k=1}^{K}c_{mk}x_{nk}

for each m=1,...,M and n=1,...,N. The result is a N times M matrix.

Examples


# What the function does:

# a 10 times 4 matrix

X<-round(cbind(
 rnorm(10,1,1),
 rnorm(10,1,1),
 rnorm(10,1,1),
 rnorm(10,1,1)))

# and a x times 4 contrast matrix

CMAT<-rbind(
c(-1,1,0,0),
c(-1,0,1,0),
c(-1,0,0,1)
)

CCDiff.default(x=X, cmat=CMAT)


[Package BSagri version 0.1-10 Index]