grid.update {gIPFrm}R Documentation

Search for the adjustment factor corresponding to the MLE using a grid

Description

grid.update computes the segment that is known to contain the adjustment factor corresponding to the MLE and, using a grid on this segment, finds this adjsutment factor. It is needed only for relational models for probabilities.

Usage

grid.update(ModelMx, ObsTbl, tolerance)

Arguments

ModelMx

an I by J model matrix of a relational model. Here I is the number of observations and J is the number of generating subsets.

ObsTbl

a vector of observed cell frequencies of length I.

tolerance

tolerance used in stopping criteria.

Value

gamma.tilde

the adjustment factor under the precision given by tolerance.

model.tilde

the value returned by ipf.gamma() with the adjustment factor gamma equal to gamma.tilde.

Author(s)

Anna Klimova, Tamas Rudas

References

A. Klimova, Coordinate-Free Exponential Families on Contingency Tables. PhD thesis. Advisers: Tamas Rudas and Thomas Richardson.

Examples


### 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

grid.update(A, y, 1e-4)


## The model of independence for a 2 by 2 contingency table

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

y = c(1,2,3,4)  ## the observed data


grid.update(A, y, 1e-5)


[Package gIPFrm version 3.1 Index]