Fitting and Testing Log-Linear Subpopulation Models with Known Support

In this paper, the support of the joint probability distribution of categorical variables in the total population is treated as unknown. From a general total population model with unknown support, a general subpopulation model with its support equal to the set of all observed score patterns is derived. In maximum likelihood estimation of the parameters of any such subpopulation model, the evaluation of the log-likelihood function only requires the summation over a number of terms equal to at most the sample size. It is made clear that the parameters of a hypothesized total population model are consistently and asymptotically efficiently estimated by the values that maximize the log-likelihood function of the corresponding subpopulation model. Next, new likelihood ratio goodness-of-fit tests are proposed as alternatives to the Pearson chi-square goodness-of-fit test and the likelihood ratio test against the saturated model. In a simulation study, the asymptotic bias and efficiency of maximum likelihood estimators and the asymptotic performance of the goodness-of-fit tests are investigated.

In practical applications of log-linear models (Agresti, 2013), the support of the joint probability distribution of the categorical variables in the population is usually assumed to be the set of all theoretically possible score patterns. Assuming the support to be equal to a proper subset of the set of all theoretically possible score patterns would result in a hybrid deterministic-probabilistic model. Assuming the support to be equal to the set of all theoretically possible score patterns makes the model completely probabilistic and is sensible in practice, where the true support is almost always unknown. However, when the number of categorical variables is large, the use of the all-inclusive support assumption has two well-known negative consequences.
The first negative consequence is that in maximum likelihood estimation of the model parameters the log-likelihood function cannot be evaluated efficiently because it requires the summation of a very large number of terms. To avoid this computational problem, maximum pseudo-likelihood methods have been proposed (Besag, 1975). Under regularity conditions, model parameters are consistently estimated using maximum pseudo-likelihood methods (Comets, 1992;Mase, 1995Mase, , 2000Chatterjee, 2007;Mukherjee, 2016). A disadvantage of pseudo-likelihood methods, however, is that large sample sizes are needed to obtain stable parameter estimates (Geyer, 1991;Geyer & Thompson, 1992;Guyon & Künsch, 1992). Although regularization methods can be used in the case of a small sample size (Höfling & Tibshirani, 2009;Ravikumar et al., 2010), formal inference is not available in using pseudo-likelihood methods to estimate the parameters of a log-linear model. The pseudo-likelihood deviance of a log-linear model is not (asymptotically) chi-square distributed.
The second negative consequence is that Pearson's asymptotic chi-square goodness-of-fit test and the usual likelihood ratio test of the assumed population model against the saturated model cannot be validly applied due to a too big difference in size between the assumed support and the set of all observed score patterns. If for many theoretically possible score patterns the 918 PSYCHOMETRIKA sample frequency is zero, then the Pearson statistic and the likelihood ratio statistic are far from chi-square.
The all-inclusive support assumption, however, might have a third negative consequence. If the size of the unknown true support is much smaller than the size of the assumed all-inclusive support, then the model parameters might be estimated less accurately. Consider, for example, the situation of 20 categorical variables with each 3 categories, which is not uncommon in psychological testing, then the number of theoretically possible score patterns is 3 20 = 3, 486, 784, 401. It might be that many of these score patterns have zero probability. In that case, the model assigns positive probability to many score patterns that actually have zero probability. Such a misspecification of the support of the probability distribution of the categorical variables might have an adverse effect on the quality of the model parameter estimates.
In this paper, therefore, no assumption is made about the support of the joint probability distribution of the categorical variables. The position is adopted that the true support is unknown and not necessarily equal to the set of all theoretically possible score patterns. It is thought possible that some theoretically possible score patterns are not observable at all and are thus structurally missing. Although the exact support in the population is treated as unknown, it is obvious that the true support is a subset of the set of all theoretically possible score patterns and a superset of the set of all observed score patterns in the sample.
Fundamental to the present development is the observation that if observed score patterns are obtained by random sampling from a population, then they are also obtained by random sampling from any subpopulation defined by a superset of the set of all observed score patterns. The smallest such subpopulation is the subpopulation defined by the set of all observed score patterns. In this smallest subpopulation, the support of the joint probability distribution of the categorical variables is exactly equal to the set of all observed score patterns.
In this paper, therefore, from a general model for categorical variables in the total population with unknown support, a general model for the categorical variables in the subpopulation defined by the set of all observed score patterns is derived. Next, maximum likelihood estimation of the parameters of such subpopulation models is discussed. An advantage of maximum likelihood estimation of the parameters of any such subpopulation model is that the evaluation of the loglikelihood function only requires the summation of a number of terms equal to at most the sample size. In addition, it is made clear that the parameters of a hypothesized total population model are consistently and asymptotically efficiently estimated by the values that maximize the likelihood function of the corresponding subpopulation model.
Although Pearson's chi-square test and the likelihood ratio test can now be used to test the goodness of fit of the subpopulation model (against a saturated subpopulation model), these tests are still not applicable if many of the observed score patterns have a low frequency. Therefore, for testing the goodness of fit of the subpopulation model, new likelihood ratio tests are proposed. One of these tests is a generalization of one of Andersen's likelihood ratio tests for the Rasch model (Andersen, 1973). In addition to goodness-of-fit testing, some attention is paid to out of sample testing and cross-validation. To investigate the asymptotic bias and efficiency of maximum likelihood estimators of the parameters of the subpopulation model and the asymptotic performance of the goodness-of-fit tests, a simulation study is carried out.

A General Model
Let Y = (Y 1 , . . . , Y k ) be a random vector of k categorical variables and y = (y 1 , . . . , y k ) be a realization, where y i ∈ {0, 1, . . . , m i }, for i ∈ {1, 2, . . . , k}. The set of all theoretically possible 919 score patterns is the k-ary Cartesian product given by A = k i=1 {0, 1, . . . , m i }. The number of elements of A is k i=1 (m i + 1) and exponentially increases with k. The probability that Y takes on the value y for a randomly selected individual from the population is denoted by P(Y = y), for all y ∈ A, and equals the relative frequency of y in the population. It is throughout assumed that the population and any subpopulation are infinite. In practice, it is usually assumed that P(Y = y) > 0, for all y ∈ A. It is, however, possible that P(Y = y) = 0, for some y ∈ A. Many probability models for categorical variables can now be generalized to the form given by where S is the unknown true support, that is, the smallest subset of A for which y∈S P(Y = y) = 1, 1 S (y) is an indicator function, and f (y) is a parametric function of y. Note that the support S is the subset of A that only contains all observable y, that is S = {y ∈ A | P(Y = y) > 0}. The most general model of the form given by Eq. 1 is the saturated model. In the saturated model, where parameter β y is a real constant, for all y ∈ S. The arbitrary constraint y∈S β y = 0 can be used for identification. The number of independent parameters of the saturated model equals the number of elements of S minus 1.

Special Cases
Using dummy variables, the saturated model can be reparameterized in terms of all possible associations among the categorical variables Y 1 , . . . , Y k . The reparameterized saturated model has many special cases. A whole family of hierarchical special cases is the set of models where associations of higher order than r ∈ {1, 2, . . . , k − 1} are assumed to be absent. A well-known member of this family is the two-way association model. Let x is = 1 if y i = s and x is = 0 otherwise, for s = 1, . . . , m i , then the two-way association model in terms of dummy scores is given by is a vector of dummy scores, and i j = [ σ i jst ] is a m i × m j matrix of two-way association parameters, for all i and j. If m i = 1, for all i, then the two-way association model specializes to the Ising model (Ising, 1925). If i j = i j , for all i < j, where i is an m i × q matrix, for all i, and is a diagonal matrix of order q ≤ k, then the two-way association model specializes to the log-multiplicative association (LMA) model (Anderson & Yu, 2007;Anderson, 2013). If i j = s i u i u j s j , for all i < j, where s i = (1, . . . , m i ) and u i = (u i1 , . . . , u iq ) is a vector of fixed binary weights, for all i, and is a q × q symmetric matrix, then the two-way association model specializes to the conditional multinormal partial credit model (Hessen, 2012). Another special case of the reparameterized saturated model, which is not a member of the discussed family 920 PSYCHOMETRIKA of hierarchical models, is the extended partial credit model (Masters, 1982;Agresti, 1993). In the extended partial credit model, all associations of the same order are assumed to be equal so that, where σ r is an r th-order association parameter, and p r (1 y) = (r !) −1 r −1 v=0 (1 y − v) is an r thorder polynomial function of 1 y. If m i = 1, for all i, then the extended partial credit model specializes to the extended Rasch model (Rasch, 1960(Rasch, , 1966Tjur, 1982;Cressie & Holland, 1983;Follmann, 1988;Hessen, 2011).
Item response models in which the latent variables are assumed to follow a specific parametric distribution in the population of examinees are not special cases of the model in Eq. 1. These models do not require the summation of a very large number of terms and can be fitted to data using numerical integration techniques.

A General Subpopulation Model
Any subset of the true support S defines a subpopulation of individuals. Let B be an arbitrary subset of S. The following theorem gives the general form of the probability that Y = y, for all y ∈ A, for a randomly selected individual from the subpopulation defined by B.
Theorem 1. If the probability distribution of Y in the total population is of the form given by Eq. 1, then the probability distribution of Y in the subpopulation defined by B is equal to Proof. If a score pattern is randomly sampled from the total population, then the probability of randomly sampling a score pattern from the set B is given by Note that P(B) = 1 if and only if B = S. Next, the joint probability distribution of Y and B is given by where 1 B (y) is an indicator function. Consequently, the conditional probability of Y given B is given by , for all y ∈ A.
Equation 5 is the general form of the conditional probability distribution of Y given the subpopulation defined by B. It is important to see that this general form is implied by the total population model and that it contains as a special case the total population model because S is a subset of itself. This means that if the parametric function f (y) holds true for the total population, then it also holds true for the subpopulation defined by B, with the same set of parameters. The general subpopulation model in Eq. 5, however, does not imply the total population model in Eq. 1. The general subpopulation model is more general than the total population model and only specializes to the total population model in Eq. 1 if also whereB = S\B is the relative complement of B in S, and because then P(Y = y) = P(Y = y | B)P(B) + P(Y = y |B)P(B) equals Eq. 1.

Maximum Likelihood Estimation
To be able to practically apply a special case of the general subpopulation model in Eq. 5, the set B must be specified. In practice, it is usually assumed that S = A, so that B can be set equal to A or to a proper subset of A. Often, however, S is unknown and might be a proper subset of A.
All that is known about S from the sample data is that it contains all observed score patterns. Let O be the set of all observed score patterns in the sample, that is, O = {y ∈ S | n y > 0}, where n y is the frequency of y in the sample. Note that O ⊆ S ⊆ A and that O defines the subpopulation of individuals with score patterns that have been observed in the sample. If B = O, then the subpopulation model in Eq. 5 has known support and no assumption is made about the support of the total population model in Eq. 1. So, in practice B can be set equal to O but if a practical situation gives rise to setting B equal to another proper subset of A, it stands to reason to choose B such that it at least includes O.
Since the parameters of the subpopulation model in Eq. 5 are exactly the same parameters as the parameters of the total population model in Eq. 1, the parameters of a hypothesized total population model can be estimated by fitting a subpopulation model defined by B ⊇ O. Let n = y∈O n y be the size of the random sample from the total population and let θ be the vector of generic parameter values. Assuming independence of observations, the likelihood function under the model in Eq. 5 is given by where κ B = y∈B exp { f (y; θ )}. The calculation of κ B requires the summation over as many terms as there are elements in B. If B = A, then κ B is the sum of k i=1 (m i + 1) terms and the 922 PSYCHOMETRIKA computational efficiency rapidly decreases with k and m 1 , . . . , m k . If B = O, then the calculation of κ B only requires summation over at most n terms. Now, let θ 0 be the vector of true parameter values and letˆ B be the vector of maximum likelihood estimators that maximizes L B with respect to θ . It is well-known that under regularity conditionsˆ B converges in probability to θ 0 , as n → ∞, and √ n(ˆ B − θ 0 ) converges in distribution to the multivariate normal distribution with mean vector 0 and covariance matrix is the Fisher information matrix in the subpopulation defined by B, as n → ∞. So, under regularity conditions, the asymptotic variance of the ath element ofˆ B equals the Rao-Cramér lower bound 1 n {I −1 B (θ 0 )} a,a . Sufficient regularity conditions for the asymptotic properties ofˆ B are: (1) any two different values of θ do not have the same P(Y = y | B), for all y ∈ B (theoretical identification), (2) B is independent of θ , (3) θ 0 is not on the boundary of the parameter space, (4) P(Y = y | B) > 0 at θ 0 , for all y ∈ B, (5) P(Y = y | B) has continuous first-order partial derivatives with respect to θ in a neighborhood of θ 0 , for all y ∈ B, and (6) the Jacobian matrix whose rows are given by ∂ P(Y = y | B)/∂θ, for all y ∈ B, has full rank (equal to the length of θ) at θ 0 . See also Agresti (2013, p. 592) and Lehmann (1999, pp. 499-501), for these regularity conditions, and Agresti (2013, ch. 16) and Lehmann and Casella (1998, ch. 6), for proofs. If sufficient regularity conditions are satisfied andˆ B is unique, then it is consistent, asymptotically normal, and asymptotically efficient given B. Note that if B ⊃ S then regularity condition (4) is not satisfied. If, however, B = O, then regularity condition (4) is always satisfied.
If, under sufficient regularity conditions, B is a fixed subset of S and the sample size tends to infinity, then the elements ofˆ B are in general consistent but only asymptotically efficient given S if B = S. The following theorem gives conditions under which the elements ofˆ B are in general asymptotically efficient given S.

Theorem 2. If B is a subset of S and includes the random set O, then, under sufficient regularity conditions,
√ n(ˆ B − θ 0 ) converges in distribution to the multivariate normal distribution with mean vector 0 and covariance matrix converges in probability to zero. The set O equals S if and only if n y > 0, for all y ∈ S, where n y is a realization of random frequency N y . If the joint probability that N y > 0, for all y ∈ S, tends to one, as n → ∞, then P(O = S) → 1. The joint probability that N y > 0, for all y ∈ S, is one minus the probability that N y = 0, for at least one y ∈ S, and therefore, this joint probability is greater than or equal to 1 − y∈S P(N y = 0). N y is a binomial random variable with binomial parameters n and P(Y = y), for all y ∈ S. It then follows that P(O = S) ≥ 1 − y∈S {1 − P(Y = y)} n , from which it can be seen that P(O = S) → 1, as n → ∞. So, the absolute difference between √ n(ˆ B −θ 0 ) and √ n(ˆ S −θ 0 ) converges in probability to zero, as n → ∞. Consequently, √ n(ˆ B −θ 0 ) converges in distribution to the asymptotic distribution of √ n(ˆ S − θ 0 ), as n → ∞, and this asymptotic distribution is multivariate normal with mean vector 0 and covariance matrix I −1 S (θ 0 ). This completes the proof.
From the result in Theorem 2, it can now be concluded that under sufficient regularity conditions, the elements ofˆ B , where O ⊆ B ⊆ S, are in general asymptotically efficient as the sample size tends to infinity. From what follows, however, it is clear that the speed of convergence of the estimators inˆ B is lower than or equal to the speed of convergence of the estimators in S . First, note that it follows from Eq. 11 that where So, L B converges to L S and the values that maximize L B tend to the values that maximize L S , as n → ∞. The general subpopulation model in Eq. 5 can be rewritten as the log-linear model ( 1 4 ) where μ y = n P(Y = y | B) and δ = ln(n/κ B ). In the case of a standard log-linear subpopulation model, the maximum likelihood estimates of the parameters of the model can be obtained using iterative weighted least squares (Charnes et al., 1976). The Broyden-Fletcher-Goldfarb-Shanno (BFGS) algorithm (Fletcher, 1987), on the other hand, can be used to obtain the maximum likelihood estimates of the parameters of both standard and non-standard log-linear subpopulation models.

Pearson's Chi-Square and Likelihood Ratio
The observed frequencies of score patterns in B are realizations of random frequencies that can be assumed to jointly follow a conditional multinomial distribution given B with parameters n and P(Y = y | B), for all y ∈ B. Therefore, to assess the goodness of fit of the log-linear model of interest in the subpopulation defined by fixed set B, where O ⊆ B ⊆ S, the Pearson chi-squared test might be appropriate. The observed value of Pearson's statistic for testing the model in Eq. 5 is given by whereπ y|B , for all y ∈ B, is the estimate of the conditional probability in Eq. 5, under a special case. Under any identified model in the subpopulation defined by the fixed set B, the Pearson statistic is asymptotically chi-square distributed with the degrees of freedom equal to |B| − 1 − e, where e is the number of free parameters in the hypothesized subpopulation model. In the case of fixed set B, the asymptotic sampling distribution of the Pearson statistic in Eq. 15 can be conceived of as follows. Imagine that infinitely many random samples of size n have been drawn from the total population. The set B can be selected in advance or a superset of the set of all observed score patterns in one of the random samples is taken as B. Observed score patterns that are not in the selected fixed set B are removed from all random samples. New score patterns can be randomly sampled from the total population, and if these new randomly sampled score patterns belong to B, they can be added to the random samples until all samples are of size n. Subsequently, the same hypothesized special case of the general subpopulation model in Eq. 5 is fitted to all these random samples of size n. Next, the observed value of the Pearson statistic in Eq. 15 is calculated for all these random samples. The chi-square distribution with its degrees of freedom equal to |B| − 1 − e is now the asymptotic sampling distribution to which the frequency distribution of the observed sample values of the Pearson statistic approaches, as n tends to infinity.
An alternative goodness-of-fit test is the likelihood ratio test of the subpopulation model against the saturated subpopulation model. The likelihood function for the saturated subpopulation model is given by where π y|B = 1 B (y)exp(β y )/ y∈B exp(β y ), for all y ∈ A. The maximum likelihood estimate of π y|B is n y /n, for all y ∈ B. So, the maximum of the log-likelihood function under the saturated subpopulation model is given byl * B = y∈B n y ln n y − n ln n.
The observed value of the likelihood ratio statistic is then given by whereL B is the maximum of the likelihood function under the particular subpopulation model fitted to the data. Under any identified model for the subpopulation defined by the fixed set B, the likelihood ratio statistic in Eq. 18 has the same asymptotic sampling distribution as the Pearson chi-square statistic in Eq. 15. In the case of random set B, we have the following result for the Pearson and likelihood ratio statistics. Since P(O = S) → 1, as n → ∞, also P(B = S) → 1, as n → ∞, and each of the two statistics given B converges in probability to the corresponding statistic given S. As a consequence, the distribution of each statistic given B converges to the distribution of the corresponding statistic given S. Since the limiting distribution of each statistic given S is a chi-square distribution with |S| − 1 − e degrees of freedom, both statistics given B converge in distribution to the chi-square distribution with |S| − 1 − e degrees of freedom.

New Likelihood Ratio Tests
If many observed score pattern frequencies are low, then the Pearson statistic and the likelihood ratio statistic are known to be far from chi-squared and thus not applicable. For such a practical situation, the likelihood ratio tests that are presented in this section might be more useful.
To be able to test a special case of the general subpopulation model in Eq. 5 using a likelihood ratio test, a more general model is needed. In what follows, two generalizations of the subpopulation model in Eq. 5 are presented and it is shown how they can be used in a likelihood ratio test of a particular subpopulation model. The two generalizations are obtained by imposing restrictions 925 on a reformulation of the general form of the likelihood function L B . The general form of L B is given by Now, in the following theorem, a reformulation of the general form of L B is given in terms of the elements of a partition of the fixed set B.
is the conditional probability distribution of Y given the subpopulation defined by B p , for all p, and , for all p.
( 2 2 ) Proof. Substitution from y∈O {P(Y = y)} n y = g p=1 y∈O p n y into the right-hand side of Eq. 19 yields Next, multiplying both the numerator and the denominator in the right-hand side of Eq. 23 by y∈B p P(Y = y) gives Eq. 20. This completes the proof.
The elements of the partition can be chosen in many different ways. One simple way is to randomly assign score patterns in B to B 1 , . . . , B g . Alternatively, the elements of the partition can be selected on the basis of the values of a particular function of y. For instance, one general choice of the pth element is A first generalization of the general subpopulation model in Eq. 5 is now given by the model in which it is assumed that where P(B p | B) is unrestricted and treated as a parameter, for all p. This generalization specializes to the subpopulation model in Eq. 5, if θ p = θ and Under this generalization, the likelihood function in Eq. 20 equals where n p = y∈O p n y and is the likelihood function for the subpopulation defined by B p , for all p. The values that maximize L p , for all p, can be found by fitting the log-linear model ln μ y = δ p + f (y; θ p ), for all y ∈ B and p, where μ y = n p P(Y = y | B p ) and δ p = ln n p / y∈B p exp{ f (y; θ p )} . Note that the likelihood function in Eq. 26 under the first generalization is a product of the likelihood functions L 1 , . . . , L g and the likelihood function Letˆ p be the vector of maximum likelihood estimators that maximizes L p with respect to θ , for all p, and let the vector N/n = (N 1 /n, . . . , N g /n) be the vector of maximum likelihood estimators of the elements of π B . Under regularity conditions, the elements ofˆ p , for all p, and N/n are consistent estimators, √ n p (ˆ p − θ 0 ) is asymptotically multivariate normal with mean vector 0 and covariance matrix I −1 p (θ 0 ) (the inverse of the Fisher information matrix in the subpopulation defined by B p ), for all p, and √ n(N/n −π B ) is asymptotically multivariate normal with mean vector 0 and covariance matrix B = diag(π B )−π B π B . Since the vectorsˆ 1 , . . . ,ˆ g and N/n are mutually independent, their joint distribution is asymptotically multivariate normal with mean vector 0 and a block diagonal covariance matrix, where the main-diagonal blocks are I −1 1 (θ 0 ), . . . , I −1 g (θ 0 ), and B . According to a fundamental result by Wilks (1938), it then follows that under a hypothesized regular special case of the subpopulation model in Eq. 5, the value given by whereL B is the maximum of L B in Eq. 11 andL p is the maximum of L p in Eq. 27, for all p, is the observed sample value of a random variable having an asymptotic chi-square distribution with (g − 1)(e + 1) degrees of freedom. Note that the denominator in Formula 29 is the maximum of the likelihood function in Eq. 26 under the first generalization of the hypothesized subpopulation model, and the numerator is the maximum of this same likelihood function if the parameter space is restricted by the hypothesized subpopulation model. A second generalization of the general subpopulation model in Eq. 5 is the special case of the first generalization for which θ p = θ , for all p, so that and P(B p | B) is again unrestricted, for all p. This generalization specializes to the general subpopulation model in Eq. 5, if Eq.25 is satisfied. Under this generalization, the likelihood function in Eq. 20 is given by where is a total likelihood function for the subpopulations defined by B 1 , . . . , B g . The values that maximize L C can be found by fitting the log-linear model ln μ y = δ p + f (y; θ ), for all y ∈ B and p, where μ y = n p P(Y = y | B p ) and δ p = ln n p / y∈B p exp{ f (y; θ )} .
Letˆ C be the vector of maximum likelihood estimators that maximizes L C with respect to θ . Under regularity conditions, the elements ofˆ C are consistent estimators and √ n(ˆ C − θ 0 ) is asymptotically multivariate normal with mean vector 0 and covariance matrix I −1 C (θ 0 ), where Since the vectorsˆ C and N/n are mutually independent, their joint distribution is asymptotically multivariate normal with mean vector 0 and a block diagonal covariance matrix, where the maindiagonal blocks are I −1 C (θ 0 ) and B . According to the fundamental result by Wilks (1938), it now follows that under a hypothesized regular special case of the general subpopulation model in Eq. 5, the value given by whereL B is again the maximum of L B in Eq. 11 andL C is the maximum of L C in Eqs. 31 and 32, is the observed sample value of a random variable having an asymptotic chi-square distribution with g − 1 degrees of freedom. Note that the denominator in Formula 34 is the maximum of the likelihood function in Eq. 31 under the second generalization of the hypothesized model, and the numerator is the maximum of this same likelihood function if the parameter space is restricted by the hypothesized subpopulation model. Instead of a hypothesized special case of the general subpopulation model in Eq. 5, its second generalization in Eq. 30 can be tested against its first generalization in Eq. 24 using a likelihood ratio test. According to the fundamental result by Wilks (1938), it follows that under the second generalization of the hypothesized regular special case, the value given by is the observed sample value of a random variable having an asymptotic chi-square distribution with (g − 1)e degrees of freedom. Note that the likelihood ratio in Formula 35 is obtained by dividing the maximum of the likelihood function in Eq. 31 by the maximum of the likelihood in Eq. 26. The denominator in Formula 35 is the maximum of the likelihood function in Eq. 26 under the first generalization of the hypothesized subpopulation model, and the numerator is the maximum of this same likelihood function if the parameter space is restricted by the second generalization of the hypothesized subpopulation model. If B = A and m i = 1, for all i, f (y) is given by Eq. 4, and B p = {y ∈ A | 1 y = p}, for p = 1, . . . , k − 1, then the likelihood ratio test for which the value of the observed sample statistic is given by Formula 35 coincides with one of Andersen's likelihood ratio tests for the Rasch model (Andersen, 1973;Rasch, 1960Rasch, , 1966.
In the case of random B, the three likelihood ratio statistics with the observed sample values in Formulas 29, 34, and 35 have the same limiting chi-square distributions as in the case of fixed B because the degrees of freedom of these limiting chi-square distributions are independent of |B| and only depend on g and e.

Out-of-Sample Testing and Cross-Validation
Let O be the set of observed score patterns in a training sample of size n and let O 0 be the set of observed score patterns in a validation sample of size n 0 . The training sample is assumed to be randomly sampled from the subpopulation defined by B ⊇ O and the validation sample is assumed to be randomly sampled from the subpopulation defined by B 0 ⊇ O 0 . Let n y be the observed frequency of score pattern y in the training sample, and let n y0 be the observed frequency of y in the validation sample. Letθ be the value of θ that maximizes the likelihood function L B in the training sample, then the predicted frequency of score pattern y in the validation sample, is given byn where the fraction on the right-hand side is an estimate of P(Y = y | B 0 ), for all y ∈ B 0 . To measure the validity of f (y;θ ) in the subpopulation defined by B 0 , the mean-squared error given by y∈B 0 (n y0 −n y ) 2 /|B 0 |, where |B 0 | is the cardinality of B 0 , can be used. An alternative estimate of θ, however, is given by the value of θ that maximizes the likelihood function L B∪B 0 in the training sample. Letθ be the value of θ that maximizes L B∪B 0 in the training sample, then the predicted frequency of score pattern y ∈ B 0 in the validation sample, can alternatively be obtained by replacingθ withθ and B 0 with B ∪ B 0 in the right-hand side of Eq. 36. To obtain insights on how a special case of the general subpopulation model in Eq. 5 will generalize to an independent data set when no validation data set is available, g-fold crossvalidation can be employed using the elements B 1 , . . . , B g of a partition of B as g folds. Since the result in Theorem 1 only requires that B ⊆ S, the result of Theorem 1 also applies to the training subset D p = B\B p , that is, Letθ p be the value of θ that maximizes the likelihood function L D p = h = p L h . The predicted frequency of the left-out score pattern y ∈ B p , based on D p , can then be given bỹ where n = y∈O n y . An alternative predicted frequency of the left-out score pattern y ∈ B p can be obtained by replacing n with n p and B with B p in the right-hand side of Eq. 38. In either case, the predicted frequency can be determined for all y ∈ B. Subsequently, the mean-squared error given by y∈B (n y −ñ y ) 2 /|B| can be calculated.

Simulation Study
In this simulation study, the asymptotic bias and efficiency of the maximum likelihood estimators inˆ B and the usefulness of the goodness-of-fit tests are studied. Concerning the test statistics, special interest is in the sample sizes for which their distributions are satisfactorily close to the theoretical asymptotic chi-square sampling distributions. The goodness-of-fit tests are the Pearson chi-square test (CS), the likelihood ratio test of the hypothesized (sub)population model against the saturated (sub)population model (LR s ), the likelihood ratio test of the hypothesized (sub)population model against its first generalization (LR 1 ), the likelihood ratio test of the hypothesized (sub)population model against its second generalization (LR 2 ), and the likelihood ratio test of the first generalization against the second generalization (LR 12 ).
To study the bias and efficiency of the maximum likelihood estimators, the average absolute approximate bias, the average approximate mean square error, and the average approximate variance over estimates have been calculated. In addition, the average of squared estimated standard errors has been calculated. To study the usefulness of the tests, rejection rates have been calculated. The calculations have been carried out under six sample sizes, that is, n ∈ {250, 500, 750, 1000, 5000, 10,000} and two numbers of variables, that is, k ∈ {5, 10}. The number of elements of the partition of the set of observed score patterns is fixed to two. For convenience, score patterns have been randomly assigned to the elements of the partition.
The R program (R Core Team, 2020) has been used to generate data under two models for binary variables. In the first data generation model, f (y) = k i=1 β i x i + σ 2 1 y(1 y − 1)/2. This model is a simple special case of both the extended Rasch model and the Ising model and is called the conditional normal extended Rasch (cn-ER) model. The second data generation model is the more complex Ising model In both data generation models, the vector (β 1 , . . . , β k ) is fixed to (−3.5, −2.5, −1.5, −0.5, 0.5), for k = 5, and to (−5.0, −4.5, −4.0, −3.5, −3.0, −2.5, −2.0, −1.5, −1.0, −0.5), for k = 10. In the cn-ER model, the parameter σ 2 is set to .63. In the Ising model, σ i j , for all i < j, is randomly sampled from a normal distribution with mean 30 and standard deviation 5, for k = 5, and from a normal distribution with mean 30 and standard deviation 1, for k = 10.
Data have been generated under two support conditions: S = A and S ⊂ A. In the case of S = A, the number of observable score patterns is 2 5 = 32, for k = 5, and 2 10 = 1024, for k = 10. In conditions in which S ⊂ A, an arbitrary substantial number of score patterns that showed low probabilities in the case of S = A, have been excluded from S. In the case of S ⊂ A, k = 5, and the cn-ER model, the cardinality of S is 15. In the case of S ⊂ A, k = 5, and the Ising model, the cardinality of S is 19. In the case of S ⊂ A, k = 10, and the cn-ER model, the cardinality of S is 202. In the case of S ⊂ A, k = 10, and the Ising model, the cardinality of S is 198.
In each of the 48 conditions (2 numbers of variables × 6 sample sizes × 2 models × 2 support conditions), 10,000 data sets have been randomly generated. For each data set, the saturated model, the data generation model, its first generalization, and its second generalization have been fitted to the data twice, once using B = O and second using B = A. All models have been fitted to the data using the R function glm(). The five tests have also been carried out twice, once using B = O and second using B = A. The nominal level of significance was set at .05, for all tests. In each condition, for each test a rejection rate has been calculated. The rejection rate of a test is the number of times the null hypothesis model has been rejected in favor of the alternative hypothesis model divided by 10,000. Most calculated rejection rates are approximate type I error rates and should be close to the nominal level of significance. In the case of S ⊂ A and B = A, however, calculated rejection rates are approximate power values.
In nearly all conditions, the approximate variance of the estimator over estimates and the average of the squared estimated standard errors are the same up to three decimal places. Only now and then (for lower sample sizes) they differ in the third decimal. Therefore, only the approximate variance of the estimator over estimates is reported. The asymptotic bias and efficiency results for S = A are given in Table 1. The results in Table 1 show that in the case of S = A, the averages of the absolute approximate bias, the approximate mean square error, and the approximate variance of the estimator, all tend to zero as the sample size increases, irrespective of the number of variables, model complexity, and the selection of B. As expected in the case of S = A, the averages of the absolute approximate bias and the approximate mean square error are in general higher for B = O than for B = A. Note that in the case of k = 10, the averages of the absolute approximate bias and the approximate mean square error in the case of B = O are based on much smaller numbers of score patterns than in the case of B = A because the maximum cardinality of O is 548. On the other hand, the averages of the approximate variance of the estimator do not seem to depend on the choice of B.
All calculated rejection rates for S = A are approximate type I error rates. These approximate type I error rates are given in Table 2. The results in Table 2 show that in the case of k = 5, none of the rejection rates is unacceptably higher than .05 and most of the rejection rates are close to .05. The following can be said about the rejection rates for S = A and k = 10. The rejection rate of the CS test is under most conditions too high. The rejection rate of the LR s test is too low under all conditions. In the case of B = A and the cn-ER model, the rejection rates of the LR 1 932 PSYCHOMETRIKA and LR 12 tests are close to .05. In the case of the Ising model, the rejection rates of the LR 1 and LR 12 tests tend to .05 as the sample size increases. In the case of the cn-ER model, the rejection rates of the LR 1 and LR 12 tests are under most conditions too high if B = O. The rejection rate of the LR 2 test is close to .05 under all conditions. The asymptotic bias and efficiency results for S ⊂ A are given in Table 3. The results in Table 3 show that in the case of S ⊂ A, the averages of the absolute approximate bias, the approximate mean square error, and the approximate variance of the estimator, all tend to zero as the sample size increases, irrespective of the number of variables and model complexity, if B = O. In the case of B = A, only the average of the approximate variance of the estimator seems to tend to zero as the sample size increases, irrespective of the number of variables and model complexity. In the case of k = 5, the averages of the absolute approximate bias are all smaller for B = O than for B = A. In the case of k = 10, the averages of the absolute approximate bias are higher for B = O than for B = A if the sample size is less than 750 but smaller for B = O than for B = A if the sample size is greater than 500.
All calculated rejection rates for S ⊂ A are given in Table 4. The results in Table 4 show that in the case of B = O, none of the rejection rates is unacceptably higher than .05. In the case of B = O and k = 5, most of the rejection rates are close to .05. In the case of B = O and k = 10, most rejection rates are less than .05 but are closer to .05 as the sample size increases. In the case of B = A, the rejection rates are approximate power values instead of approximate type I error rates because in these conditions the support of the probability distribution of the categorical variables is misspecified. As could be expected, the results in Table 4 show that for B = A and k = 5, all rejection rates are closer to one as the sample size increases. Under these conditions, the LR 2 test seems to be the least powerful. In the case of B = A and k = 10, the rejection rates of the new likelihood ratio tests are also closer to one if the sample size increases. Out of the new likelihood ratio test the LR 2 is again the least powerful under these conditions. In the case of B = A and k = 10, the rejection rates of the CS and LR s tests are all close to zero, except one. It can be concluded that the LR 2 test performs better than the other tests if either B = O or the support has been correctly specified. Under these conditions, unlike the rejection rates of the other tests, the rejection rate of the LR 2 test does not seem to be affected by the number of variables, model complexity, and sample size. Furthermore, it can be concluded that if the support of the probability distribution of the categorical variables is misspecified, then parameter estimates contain more bias and under many conditions, correctly specified f (y; θ ) is more often rejected than it should be using one of the tests.
In addition to the asymptotic performance of the tests under correctly specified conditions, it is also of interest to compare the power of the tests under misspecified f (y; θ ) in conditions in which all tests have type I error rates close to the nominal level of significance. According to the  250 .516 .393 .323 .159 .283 .456 .328 .337 .158 .298 500 .876 .827 .638 .254 .568 .810 .786 .616 .248 .542 750 .974 .963 .809 .333 .734 .956 .956 .788 .330 .707 1000 .996 .995 .900 .396 .829 .994 .995 .884 .383 .810 5000 1.000 1.000 .999 .680 .996 1.000 1.000 .999 .695 .996 10,000 1.000 1.000 1.000 .770 1.000 1.000 1.000 1.000 .779 1.000 previous results, a fair comparison of the power of the tests is possible when data are generated under the Ising model, k = 5, and S = A, and the cn-ER model is fitted to the data using both B = O and B = A. For the same sample sizes as before 10,000 data sets have been generated with the same parameter values and all tests have been carried out for each data set under both B = O and B = A. Rejection rates have been calculated and are given in Table 5.
The results in Table 5 show that the CS test is the most powerful test and the LR 2 test is the least powerful test, irrespective of sample size and choice of B. In addition, the results show that all tests have higher approximate power values in using B = O instead of B = A, for most sample sizes.

An Empirical Data Example
The data in this example are the responses of 493 adolescents to seven items that are intended to measure nonaggressive antisocial behavior (Dekovic, 2003). The adolescents have been asked to indicate how often they have committed the antisocial act given by each item in the last twelve months. The responses are coded as 0 = never, 1 = once, 2 = two or three times, 3 = four to ten times, and 4 = more than ten times. The cardinality of A is 5 7 = 78125. The number of observed score patterns is 267 (the cardinality of O). The extended partial credit model in Eq. 4 is fitted to the data twice, once using B = A (assuming S = A) and second using B = O. The number of parameters in this model is k i=1 m i + k − 1 = 7 i=1 4 + 7 − 1 = 7 · 4 + 6 = 34. The parameter estimation results are given in Table 6.
The goodness-of-fit test results are given in Table 7. Using B = O, some parameters of the first generalization of the subpopulation partial credit model could not be estimated due to too little observations for some categories. As a consequence, the degrees of freedom for the LR 1 and LR 12 tests are smaller than in case of B = A. According to all test results in Table 7, the extended partial credit model cannot be rejected at the 5 percent level of significance.

Discussion
Using the conditional probability distribution of the categorical variables given the set O of observed score patterns, in principle, only requires a random sample from the subpopulation defined by O. In practice, however, a random sample from the total population is still required to guarantee that the sample is a random sample from the subpopulation defined by O because O is only known after the sample has been drawn. Not needing, in principle, a random sample from the total population is characteristic of fixed effects regression models. The model for the subpopulation defined by the set of all observed score patterns can also be seen as a fixed effects regression model, that is, a regression model where the conditional distribution of the random outcome frequency N y given fixed y is a Poisson distribution, for all y ∈ O. Note that if the observed sample frequencies are the observations of independent Poisson random frequencies and the mean of random frequency N y is λ y = α exp{ f (y)}, for all y ∈ O, then the likelihood function is given by and the maximum likelihood estimate of the normalizing constant α equals n/ y∈O exp{f (y)}, wheref (y) is the maximum likelihood estimate of f (y) and the sum in the denominator is again only over all y ∈ O. Also note that the values that maximize the likelihood function in Eq. 39 are exactly the same as the values that maximize the likelihood function in Eq. 11, for B = O, because both likelihood functions yield the same estimating equations. Furthermore, it is a well-known fact that if the observed sample frequencies are the observations of independent Poisson random frequencies and the mean of random frequency N y is λ y = α exp{ f (y)}, for all y ∈ O, then the 936 PSYCHOMETRIKA conditional distribution of the random frequencies given y∈O N y = N = n is a multinomial distribution with parameters n and λ y which is exactly equal to the conditional probability in Eq. 5, for B = O. The multinomial likelihood function also yields the same estimating equations as the likelihood function in Eq. 11, for B = O, and therefore, also the same maximum likelihood estimates. The null hypothesis tested by the goodness-of-fit tests for which the observed sample values of the test statistics are given by Formulas 29 and 34 is the hypothesis that the particular model used holds in the subpopulation defined by B. The null hypothesis tested by the goodness-offit test for which the observed sample value of the test statistic is given by Formula 35 is the hypothesis that the particular model used separately holds in each of the subpopulations defined by B 1 , . . . , B g . The hypothesis that the model separately holds in each of the subpopulations defined by B 1 , . . . , B g is implied by the hypothesis that the model holds in the subpopulation defined by B. Since the null hypothesis that the model holds in the subpopulation defined by B is implied by the hypothesis that the model holds in the total population, rejection of any of the null hypotheses implies rejection of the total population model. If, on the other hand, the null hypotheses cannot be rejected, then the sample data do not provide evidence against the hypothesis that the model holds in total population. The hypothesis that the model holds in the total population, however, is not implied by any of the null hypotheses of the goodness-of-fit tests. This means that it might be that the specified model holds in the subpopulation defined by B, but not in the total population, or that the model separately holds in each of the subpopulations defined by B 1 , . . . , B g but not in the subpopulation defined by B nor in the total population. In such situations, the goodness-of-fit tests do not have any statistical power to reject the specified model in the total population.
The goodness-of-fit tests, but also the maximum likelihood procedure proposed, are not just applicable to the model for the subpopulation defined by the set O of all observed score patterns. The procedures can also be applied to the model for any subpopulation defined by either a superset of O, including the set of all theoretically possible score patterns, or a subset of O. Any superset of O can be assumed to be a subset of the true support of the probability distribution of the categorical variables. Assuming the set A to be the support, is one such an option. Assuming the support to include a specific proper superset of O not equal to A, is another option that already increases the computational efficiency relative to the all-inclusive support assumption. The problem then, however, is the selection of that specific proper superset of O and the possibility of wrongly including unobservable score patterns, that is, score patterns that are not in S. An example of a practical situation in which it is reasonable to exclude particular unobserved score patterns from the proper superset of O that is assumed to be a subset of the true support, is the situation in which the model of interest is the extended Rasch model for dichotomously scored items. In that situation, it is reasonable to exclude unobserved score patterns that are expected to be unobservable according to the deterministic Guttman model.
Any subset of the set of all observed score patterns defines a subpopulation with known support. The set of all observed score patterns defines the largest subpopulation with known support. An advantage of using the set O of all observed score patterns is that all data are used. Another possible subpopulation model that might be useful in practice is the model for 938 PSYCHOMETRIKA the subpopulation defined by the set {y ∈ A | n y ≥ n 0 }, where n 0 is a prespecified minimum sample frequency. In this case, observed score patterns with sample frequencies less than n 0 are not used. Possible negative consequences of choosing such a subpopulation are that the model parameters are estimated less precisely and that the hypothesized subpopulation model becomes underidentified.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
Publisher's Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.