# CCDiff.default: Compute contrasts of chains of joint empirical distributions. In BSagri: Safety Assessment in Agricultural Field Trials

## 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 April 20, 2018, 5:04 p.m.