CCDiff.default: Compute contrasts of chains of joint empirical distributions.

Description Usage Arguments Details Examples

Description

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

Usage

1
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[n,k] and denote the elements of cmat by c[m,k]. Function CCDiff.default simply calculates:

sum(k=1,..,K; m; n)(c[m,k]*x[n,k])

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# 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)

BSagri documentation built on May 2, 2019, 8:29 a.m.