The maximum number of clusters that can be fit in an LCA model depends on the model degrees of freedom. The degrees of freedom in an LCA model are based on the size of the contingency table created by the columns. The size of the contingency table is the number of cells in the table that contain at least one observation and is denoted as K. If all cells contain at least one observation, K is the product of the number of levels of the response columns. The formula for degrees of freedom is as follows:
DF = K - {nCluster - 1 + nCluster(nTotalLevels - nCols)} - 1