facial_set {eMLEloglin} R Documentation

## Finds the facial set

### Description

Identifies sampling zeros that contribute to the non-existence of the MLE. These problematic zero cells can be removed from the contingency table and the model can then be fit (as far as is possible) using the glm package.

### Usage

facial_set (data, formula)

### Arguments

 data A data frame containing the contingency table. All cells must be included in data and the last column must be the cell counts. The number of variables in the contingency table must be between 2 and 8. formula A model formula.

### Value

A list with 7 elements:

 formula The model formula used in the function call. model.dimension The model dimension under Poisson sampling. status Description of how the algorithm terminated. For debugging purposes. iterations Number of iterations the algorithm used.

.

 face The contingency table with an appended column denoting whether each cell is part of the facial set (denoted 0) or not (denoted 1). Those cells that are not part of the facial set are cells with an estimated cell mean of 0. These cells cause the non-existence of the MLE and should be removed from the table before the model is fit by the glm function. See the vignette for more details. face.dimension The dimension of the facial set. Equivalent to the number of log-linear parameters that can be estimated. maxloglik The maximum of the log likelihood function up to a constant.

### Author(s)

Matthew Friedlander

### References

Feinberg, S. E. and Rinaldo, A. (2012). Maximum likelihood estimation in log-linear models. Annals of Statistics. 40: 996-1023

Friedlander, M. (2016). Fitting log-linear models in sparse contingency tables using the eMLEloglin R package. Preprint. arXiv:1611.07505

### Examples

data(rochdale)
f <- facial_set (data = rochdale,
formula = freq ~ a*d + a*e + b*e + c*e + e*f + a*c*g + d*g + f*g + b*d*h)
N <- sum(rochdale$freq) BIC <- f$maxloglik - f$model.dimension * log(N) / 2 cBIC <- f$maxloglik - f\$face.dimension * log(N) / 2


[Package eMLEloglin version 1.0.1 Index]