Description Usage Arguments Details Value References Examples

Finds the number of latent classes that are allowed to be fitted on a dataset in order for the latent class analysis model to be identifiable.

1 | ```
maxG(Y, Gvec)
``` |

`Y` |
A categorical data matrix. |

`Gvec` |
A numeric vector denoting the range of number of latent classes to be fitted. |

In practice, different latent class analysis models are fitted by attributing different values to *G*, usually ranging from 1 to *G_{max}*. However, for a set of variables, not all the models corresponding to increasing values of *G* are identifiable. Indeed, a necessary (but not sufficient) condition for a latent class analysis model to be identifiable is:

*prod(Cj) > G(sum(Cj) - M + 1)*

where *Cj* denotes the number of categories of variable *j*, *j=1,...,M*, and *M* is the number of variables in the data `Y`

. Another condition requires the number of observed distinct configurations of the variables in the data to be greater than the number of parameters of the model. The function returns the subset of values of vector `Gvec`

such that both the above conditions are satisfied.

A numeric vector containing the subset of number of latent classes that are allowed to be fitted on the data in order for the model to be identifiable. If no model is identifiable for the range of values provided, the function returns `NULL`

and throws a warning.

Bartholomew, D. and Knott, M. and Moustaki, I. (2011). Latent Variable Models and Factor Analysis: A Unified Approach. *Wiley*.

Goodman, L. A. (1974). Exploratory latent structure analysis using both identifiable and
unidentifiable models. *Biometrika*. 61, 215-231.

1 2 3 4 |

```
Loading required package: poLCA
Loading required package: scatterplot3d
Loading required package: MASS
Package 'LCAvarsel' version 1.1
Type 'citation("LCAvarsel")' for citing this R package in publications.
[1] 1 2
[1] 2
NULL
Warning message:
In maxG(carcinoma, 5) : no LCA model is identifiable for such value(s) of G
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.