suff.stat: Sufficient Statistics under a Relational Model

Description Usage Arguments Value Author(s) References Examples

Description

For an I by J model matrix of a relational model and a vector of frequencies of the length I, the function computes sufficient statistics under the model (subset sums).

Usage

1
suff.stat(ModelMatrix, Table)

Arguments

ModelMatrix

ModelMatrix a model matrix of a relational model.

Table

Table a vector of frequencies.

Value

a vector of subset sums.

Author(s)

Anna Klimova

References

A.Klimova, T.Rudas, A.Dobra, Relational models for contingency tables. J. Multivariate Anal., 104, 159–173.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
### Multiplicative model from Aitchison and Silvey (1960)

A = matrix(c(1, 0, 0, 1, 0, 1, 1, 
             0, 1, 0, 1, 1, 0, 1,
             0, 0, 1, 0, 1, 1, 1), byrow=TRUE, nrow=3) ## the model matrix 

y = c(46,24,7,15,3,4,1) ## the observed data

suff.stat(A,y) 

### pneumonia infection in calves:

A=matrix(c(2,1,0,0,1,1), 2,3,byrow=TRUE) ## the model matrix

y=c(30,63,63)  ## the observed data

suff.stat(A,y) 

gIPFrm documentation built on May 1, 2019, 9:16 p.m.