CCDiff.default {BSagri} | R Documentation |
Compute contrasts of chains of joint empirical distributions. For internal use.
CCDiff.default(x, cmat)
x |
an N times K matrix with numeric entries |
cmat |
a contrast matrix with K columns |
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.
# 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)