Stéphane Bonhomme
email: sbonhomme@uchicago.edu

Koen Jochmans
email: koen.jochmans@sciencespo.fr

Jean-Marc Robin
email: jeanmarc.robin@sciencespo.fr

ESTIMATING MULTIVARIATE LATENT-STRUCTURE MODELS

Keywords: Primary, 15A69 finite mixture model, hidden Markov model, latent structure, multilinear restrictions, multivariate data, nonparametric estimation, simultaneous matrix diagonalization

A constructive proof of identification of multilinear decompositions of multiway arrays is presented. It can be applied to show identification in a variety of multivariate latent structures. Examples are finite-mixture models and hidden Markov models. The key step to show identification is the joint diagonalization of a set of matrices in the same non-orthogonal basis. An estimator of the latent-structure model may then be based on a sample version of this joint-diagonalization problem. Algorithms are available for computation and we derive distribution theory. We further develop asymptotic theory for orthogonal-series estimators of component densities in mixture models and emission densities in hidden Markov models.

1. Introduction. Latent structures are a popular tool for modeling the dependency structure in multivariate data. Two important examples are finite-mixture models (see [START_REF] Mclachlan | Finite Mixture Models[END_REF] and hidden Markov models (see [START_REF] Cappé | Inference in hidden Markov models[END_REF]. Although these models arise frequently in applied work, the question of their nonparametric identifiability has attracted substantial attention only quite recently. [START_REF] Allman | Identifiability of parameters in latent structure models with many observed variables[END_REF] used algebraic results on the uniqueness of decompositions of multiway arrays due to [START_REF] Kruskal | More factors than subjects, tests and treatments: An indeterminacy theorem for canonical decomposition and individual differences scaling[END_REF][START_REF] Kruskal | Three-way arrays: Rank and uniqueness of trilinear decompositions, with applications to arithmetic complexity and statistics[END_REF] to establish identification in a variety of multivariate latent-structure models. Their setup covers both the dependency structure in the data is latent does not translate into a decrease in the convergence rate of the estimators. As such, this paper is the first to derive the asymptotic behavior of nonparametric estimators of multivariate finite-mixture models of the form defined in [START_REF] Hall | Nonparametric estimation of component distributions in a multivariate mixture[END_REF] for more than two latent classes and of hidden Markov models of the form in [START_REF] Gassiat | Finite state space non parametric hidden Markov models are in general identifiable[END_REF]. Furthermore, our approach can be useful in the analysis of random graph models [START_REF] Allman | Parameter identifiability in a class of random graph mixture models[END_REF] and stochastic blockmodels [START_REF] Snijders | Estimation and prediction for stochastic blockmodels for graphs with latent block structure[END_REF][START_REF] Rohe | Spectral clustering and the highdimensional stochastic blockmodel[END_REF], although we do not consider such models in detail in this paper. In a simulation study, we find that our approach performs well in small samples.

There is a large literature on parallel factor analysis and canonical polyadic decompositions of tensors building on the work of [START_REF] Kruskal | More factors than subjects, tests and treatments: An indeterminacy theorem for canonical decomposition and individual differences scaling[END_REF][START_REF] Kruskal | Three-way arrays: Rank and uniqueness of trilinear decompositions, with applications to arithmetic complexity and statistics[END_REF]; see, e.g., De Lathauwer, De [START_REF] De Lathauwer | Computation of the canonical decomposition by means of a simultaneous generalized Shur decomposition[END_REF]Vandewalle [2004], De Lathauwer [2006], Domanov and De Lathauwer [2013a;b;[START_REF] Domanov | Generic uniqueness conditions for the canonical polyadic decomposition and INDSCAL[END_REF]a], [START_REF] Anandkumar | Tensor decompositions for learning latent variable models[END_REF], and [START_REF] Chiantini | An algorithm for generic and low-rank specific identifiability of complex tensors[END_REF]2015]. Although our strategy has some similarity with this literature, both our conclusions and our simultaneous-diagonalization problem are different. Most importantly, our simultaneous-diagonalization formulation can deal with noise, making it useful as a tool for statistical inference.

In the context of multivariate finite mixtures of identically distributed variables, [START_REF] Kasahara | Nonparametric identification of finite mixture models of dynamic discrete choices[END_REF] and [START_REF] Bonhomme | Nonparametric estimation of finite mixtures from repeated measurements[END_REF] also used (different) joint-diagonalization arguments to obtain nonparametric identification results. However, the approaches taken there are different from the one developed in this paper and cannot be applied as generally.

We start out by motivating our approach via a discussion on the algebraic structure of multivariate finite-mixture models and hidden Markov models. We then present our identification strategy in a generic setting. After this we turn to estimation and inference, and to the development of asymptotic theory. Next, the theory is used to set up orthogonal-series estimators of component densities in a finite-mixture model, and to show that these have the standard univariate convergence rates of series estimators. Finally, the orthogonal-series density estimator is put to work in simulation experiments involving finite mixtures and a hidden Markov model. The supplementary material [START_REF] Bonhomme | Supplement to "Estimating multivariate latent-structure models[END_REF] contains some additional results and discussion, as well as all technical proofs.

2. Motivating examples. We start by introducing three examples to motivate our subsequent developments.

2.1. Finite-mixture models for discrete measurements. Let Y 1 , Y 2 , . . . , Y q be observable random variables that are assumed independent conditional on realizations of a latent random variable Z. Suppose that Z has a finite state space of known cardinality r, which we set to {1, 2, . . . , r} without loss of generality. Let π = (π 1 , π 2 , . . . , π r ) be the probability distribution of Z, so π j > 0 and r j=1 π j = 1. Then the probability distribution of Y 1 , Y 2 , . . . , Y q is a multivariate finite mixture with mixing proportions π 1 , π 2 , . . . , π r . The parameters of interest are the mixing proportions and the distributions of Y 1 , Y 2 , . . . , Y q given Z. The Y i need not be identically distributed, so the model involves qr such conditional distributions.

Suppose that the scalar random variable Y i can take on a finite number κ i of values. Let p ij = (p ij1 , p ij2 , . . . , p ijκ i ) denote the probability distribution of Y i given Z = j. Let ⊗ denote the outer (tensor) product. The joint probability distribution of Y 1 , Y 2 , . . . , Y q given Z = j then is the q-way table

q i=1 p ij = p 1j ⊗ p 2j ⊗ • • • ⊗ p qj , which is of dimension κ 1 × κ 2 × • • • × κ q .
The outer-product representation follows from the conditional-independence restriction. Hence, the marginal probability distribution of Y 1 , Y 2 , . . . , Y q equals (2.1)

P = r j=1 π j q i=1 p ij ,
which is an r-linear decomposition of a q-way array. The parameters of the mixture model are all the vectors making up the outer-product arrays, {p ij } and the coefficients of the linear combination, {π j }, transforming the conditional distributions into the marginal distribution P.

The r-linear decomposition is not restricted to the contingency table. Indeed, any linear functional of P admits a decomposition in terms of the same functional of the p ij . Moreover, for any collection of vector-valued transformations y → χ i (y) we have

(2.2) E q i=1 χ i (Y i ) = r j=1 π j q i=1 E[χ i (Y i )|Z = j],
provided the expectation exists. Of course, identification of linear functionals follows from identification of the component distributions, but (2.2) can be useful for the construction of estimators. To illustrate this we turn to a model with continuous outcomes.

2.2. Finite-mixture models for continuous measurements. Suppose now that the Y i are continuously-distributed random variables. Let f ij be the density of Y i given Z = j. In this case, the q-variate finite-mixture model with r latent classes states that the joint density function of the outcomes

Y 1 , Y 2 , . . . , Y q factors as (2.3) r j=1 π j q i=1 f ij ,
again for mixing proportions π 1 , π 2 , . . . , π r . This is an infinite-dimensional version of (2.1). Setting χ i in (2.2) to a set of indicators that partition the state space of Y i yields a decomposition as in (2.1) for a discretized version of the mixture model. This approach has been used by [START_REF] Allman | Identifiability of parameters in latent structure models with many observed variables[END_REF] and [START_REF] Kasahara | Nonparametric identification and estimation of the number of components in multivariate mixtures[END_REF] in proving identification.

An alternative approach, which will prove convenient for the construction of density estimators, is as follows. Suppose that (Y 1 , Y 2 , . . . , Y q ) lives in the q-dimensional space Y q ⊆ R q . Let L 2 ρ [Y ] be the space of functions that are square-integrable with respect to the weight function ρ on Y , endowed with the inner product

h 1 , h 2 = Y h 1 (y) h 2 (y) ρ(y) dy, and the L 2 ρ -norm h 2 = h, h . Let {ϕ k , k > 0} be a class of functions that form a complete orthonormal basis for L 2 ρ [Y ].
When Y is compact, polynomials such as those belonging to the Jacobi class-e.g., Chebychev or Legendre polynomials-can serve this purpose. When Y = (-∞, +∞), Hermite polynomials are a natural choice.

Assume that

f ij ∈ L 2 ρ [Y ].
The projection of f ij onto the subspace spanned by ϕ 1 , ϕ 2 , . . . , ϕ κ for any integer κ is

Proj κ f ij = κ k=1 b ijk ϕ k , where the b ijk = ϕ k , f ij = E[ϕ k (Y i )ρ(Y i )|Z = j]
are the (generalized) Fourier coefficients of f ij . The projection converges to

f ij in L 2 ρ -norm, that is, Proj κ f ij -f ij 2 → 0 as κ → ∞.
Such projections are commonly-used tools in the approximation of functions and underlie orthogonal-series estimators of densities.

The Fourier coefficients are not directly observable. For chosen integers κ 1 , κ 2 , . . . , κ q , define

b ij = E[ϕ κ i (Y i )ρ(Y i )|Z = j],
where ϕ κ i = (ϕ 1 , ϕ 2 , . . . , ϕ κ i ) , which are linear functionals of the f ij . Then (2.2) yields (2.4)

B = r j=1 π j q i=1 b ij for B = E[ q i=1 ϕ κ i (Y i )ρ(Y i )]
. The latter expectation is a q-way array that can be computed directly from the data. It contains the leading Fourier coefficients of the q-variate density function of the data. Again, the array B factors into a linear combination of multiway arrays. In Section 5 we will use this representation to derive orthogonal-series density estimators that have standard large-sample properties.

2.3. Hidden Markov models. Let {Y i , Z i } q i=1 be a stationary sequence. Z i is a latent variable with finite state space {1, 2, . . . , r}, for known r, and has first-order Markov dependence. Let π = (π 1 , π 2 , . . . , π r ) be the stationary distribution of Z i . Write K for the r × r matrix of transition probabilities; so K(j 1 , j 2 ) is the probability of moving from state j 1 to state j 2 . The observable scalar random variables Y 1 , Y 2 , . . . , Y q are independent conditional on realizations of Z 1 , Z 2 , . . . , Z q , and the distribution of Y i only depends on the realization of Z i . This is a hidden Markov model with r latent states and q observable outcomes.

Suppose that Y i is discrete and that its state space contains κ points of support. Write p j for the probability vector of Y i given Z i = j, that is, the emission distributions. Let P = (p 1 , p 2 , . . . , p r ) be the κ × r matrix of emission distributions and write Π = diag(π 1 , π 2 , . . . , π r ). The Markovian assumption implies that Y i and Z i-1 are independent given Z i . Hence, the columns of the matrix

B = P K = (b 1 , b 2 , . . . , b r )
contain the probability distributions of Y i for given values of Z i-1 . Likewise, Y i and Z i+1 are independent given Z i , and so the matrix

A = P ΠKΠ -1 = (a 1 , a 2 , . . . , a r )
gives the distributions of Y i for given values of Z i+1 . Finally, Y i-1 , Y i , and Y i+1 are independent given Z i . Thus, with q = 3 measurements, the hidden Markov model implies that the contingency table of (Y 1 , Y 2 , Y 3 ) factors as (2.5)

P = r j=1 π j (a j ⊗ p j ⊗ b j ).
A detailed derivation is provided in the supplementary material; also see Gassiat, Cleynen and Robin [2013, Theorem 2.1] and Allman, Matias and Rhodes [2009, Section 6.1] for alternative derivations. When q > 3 we may bin several outcomes together and proceed as before, by using the unfolding argument in Subsection 3.1. Equation (2.5) shows that appropriate conditioning allows viewing the hidden Markov model as a finite-mixture model, thus casting it into the framework of finite mixtures with conditionally-independent (although not identically-distributed) outcomes as in (2.1). Here, the parameters of interest are the emission distributions {p j } r j=1 and the stationary distribution of the Markov chain π, and also the matrix of transition probabilities K.

When the Y i are continuously distributed, (2.5) becomes a mixture as in (2.3), and we may again work with projections of the densities onto an orthogonal basis.

3. Algebraic structure and identification. Our approach can be applied to q-variate structures that decompose as q-ads, which are defined as follows.

Definition 1. A q-dimensional array X ∈ R κ 1 ×κ 2 ו••×κq is a q-ad if it can be decomposed as (3.1) X = r j=1 π j q i=1
x ij for some integer r, non-zero weights π 1 , π 2 , . . . , π r , and vectors

x ij ∈ R κ i ×1 .
Our interest lies in nonparametrically recovering {x ij } and {π j } from knowledge of X and r. Clearly, these parameters are not unique, in general. For example, a permutation of the x ij and π j leaves X unaffected, and a common scaling of the x ij combined with an inverse scaling of the π j , too, does not change the q-way array. However, the work of [START_REF] Kruskal | More factors than subjects, tests and treatments: An indeterminacy theorem for canonical decomposition and individual differences scaling[END_REF][START_REF] Kruskal | Three-way arrays: Rank and uniqueness of trilinear decompositions, with applications to arithmetic complexity and statistics[END_REF], [START_REF] Sidiropoulos | On the uniqueness of multilinear decomposition of N -way arrays[END_REF], [START_REF] Jiang | ROBIN identification of CANDECOMP/PARAFAC and bilinear models with constant modulus constraints[END_REF] and Domanov and De Lathauwer [2013a;b], among others, gives simple sufficient conditions for uniqueness of the decomposition up to these two indeterminacies. These conditions cannot be satisfied when q < 3.

While permutational equivalence of possible decompositions of X is an inherently unresolvable ambiguity, indeterminacy of the scale of the vectors x ij is undesirable in many situations. Indeed, in arrays of the general form in (2.2), recovering the scale of the x ij and the constants π j is fundamental. In some cases natural scale restrictions may be present. Indeed, in (2.1) the x ij are known to be probability distributions, and so they have non-negative entries that sum to one. Suitably combining these restrictions with Kruskal's theorem, [START_REF] Allman | Identifiability of parameters in latent structure models with many observed variables[END_REF] derived conditions under which the parameters in finite mixtures and hidden Markov models are uniquely determined up to relabelling of the latent classes.

We follow a different route to determine q-adic decompositions up to permutational equivalence that does not require knowledge of the scale of the x ij . We require that, apart from the q-way array X, lower-dimensional submodels are also observable. By lower-dimensional submodels we mean arrays that factor as

(3.2) r j=1 π j i∈Q x ij
for sets Q that are subsets of the index set {1, 2, . . . , q}. This is not a strong requirement in the models we have in mind. For example, in the mixture model in (2.1), lower-dimensional submodels are just the contingency tables of a subset of the outcome variables. There, going from a q-way table down to a (q -1)-table featuring all but the ith outcome boils down to summing the array in the ith direction. In more general situations, such as (2.2) and in the multilinear equation involving Fourier coefficients in particular, the advantage of working with submodels over marginalizations of the model is apparent. Indeed, in contrast to when the array is a contingency table, here, there is no natural scale constraint on the x ij . So, summing the array in one direction does not yield an array that decomposes as in (3.2). Nonetheless, expectations concerning any subset of the random variables can still be computed in (2.2) and so submodels as defined in (3.2) are observable. In the supplementary material we adapt our main identification result (Theorem 1 below) to settings where submodels are not available and marginalizations are used instead.

Note that, throughout, we take r in (3.1) to be known. This ensures {x ij } and {π j } to be unambiguously defined. For a different r, there may exist a different set of weights and vectors so that X factors as a q-ad. The rank of X is the smallest integer r needed to arrive at a decomposition as in Definition 1. For example, in the multivariate mixture model in Section 2.1, r is the number of fitted mixture components and the rank is the smallest number of components that would allow us to write the joint distribution of the variables as a mixture that satisfies the required conditional-independence restriction as in (2.1). The rank need not be equal to r. Moreover, besides the factorization of P in terms of π 1 , π 2 , . . . , π r and {p i1 , p i2 , . . . , p ir } in (2.1), there may exist a different set of, say, r weights π 1 , π 2 , . . . , π r and distributions {p i1 , p i2 , . . . , p ir } that also yield a representation of P as a mixture. Identifying the number of components is a difficult issue. Recent work by [START_REF] Kasahara | Nonparametric identification and estimation of the number of components in multivariate mixtures[END_REF] shows that a simple lower bound on the number of components is nonparametrically identified (and estimable).

3.1. Unfolding. We can state our main identification result for three-way arrays without loss of generality. This is so because any q-way array can be unfolded into a (q -1)-way array, much like any matrix can be transformed into a vector using the vec operator. Indeed, in any direction i ∈ {1, 2, . . . , q}, a q-way array of dimension

κ 1 × κ 2 × • • • × κ q is a collection of κ i (q -1)-way arrays, each of dimension κ 1 × κ 2 × • • • κ i-1 × κ i+1 × • • • κ q .
This collection can be stacked in any of i ∈ {1, 2, . . . , i -1, i + 1, . . . . . . , q} directions-i.e., (q -1) different ways-to yield a (q -1)-way array whose dimension will be

κ 1 × κ 2 × κ i κ i × • • • κ q .
This unfolding process can be iterated until it yields a three-way array. To write this compactly, let be the Khatri-Rao product. Then, for vectors a 1 , a 2 , . . . , a q , q i=1

a i = a 1 a 2 • • • a q
is the vector containing all interactions between the elements of the a i . The end result of iterated unfolding towards direction i, say, is a three-way array of the form

r j=1 π j   i 1 ∈Q 1 x i 1 j ⊗ x ij ⊗ i 2 ∈Q 2 x i 2 j   ,
where Q 1 and Q 2 are two index sets that partition {1, 2, . . . , q}\{i}. We will illustrate this in the context of density estimation in Section 5.

3.2. Identification via simultaneous diagonalization. We thus focus on a three-way array X of dimension κ 1 × κ 2 × κ 3 that factors as a tri-ad, that is,

X = r j=1 π j (x 1j ⊗ x 2j ⊗ x 3j ). Let X i = (x i1 , x i2 , . . . , x ir ) and Π = diag(π 1 , π 2 , . . . , π r ). Also, for each pair (i 1 , i 2 ) with i 1 < i 2 in {1, 2, 3} 2 , let X {i 1 ,i 2 } = r j=1 π j (x i 1 j ⊗ x i 2 j ).
Note that, from (3.2), X {i 1 ,i 2 } is the lower-dimension submodel obtained from X by omitting the index i 3 .

Our first theorem concerns identification of the X i as the eigenvalues of a set of matrices and is the cornerstone of our argument. The proof of this result is constructive and will be the basis for our estimator in Section 4 below.

Theorem 1 (Columns of X i ). If X i 1 and X i 2 both have full column rank and X {i 1 ,i 2 } is observable, then X i 3 is identified up to a permutation matrix if all its columns are different.

Proof. Without loss of generality, fix (i 1 , i 2 , i 3 ) = (1, 2, 3) throughout the proof. In each direction i, the three-way array X consists of a collection of κ i matrices. Let A 1 , A 2 , . . . , A κ 3 denote these matrices for i = 3. So, the matrix A k is obtained from X by fixing its third index to the value k, that is, A k = X(:, :, k), using obvious array-indexing notation. Also, let A 0 = X {1,2} . Note that all of A 0 and A 1 , A 2 , . . . , A κ 3 are observable matrices of dimension κ 1 × κ 2 .

The lower-dimensional submodel A 0 has the structure

(3.3) A 0 = X 1 ΠX 2 .
Because the matrices X 1 and X 2 both have rank r and because all π j are non-zero by definition, the matrix A 0 , too, has rank r. Therefore, it has a singular-value decomposition

A 0 = U SV
for unitary matrices U and V of dimension κ 1 × r and κ 2 × r, respectively, and a non-singular r × r diagonal matrix S. Now construct W 1 = S -1/2 U and W 2 = S -1/2 V . Then,

W 1 A 0 W 2 = (W 1 X 1 Π 1/2 )(W 2 X 2 Π 1/2 ) = QQ -1 = I r ,
where I r denotes the r × r identity matrix and

Q = W 1 X 1 Π 1/2 .
Moving on, each of A 1 , A 2 , . . . , A κ 3 has the form

A k = X 1 ΠD k X 2 , D k = diag k X 3 ,
where diag k X denotes the diagonal matrix whose diagonal equals the kth row of matrix X. Applying the same transformation to A 1 , A 2 , . . . , A κ 3 yields the collection of r × r matrices

(3.4) W 1 A k W 2 = QD k Q -1 .
So, the matrices {W 1 A k W 2 } are diagonalizable in the same basis, namely, the columns of matrix Q. The associated eigenvalues {D k } equal the columns of the matrix X 3 . These eigenvalues are unique up to a joint permutation of the eigenvectors and eigenvalues provided there exist no k 1 = k 2 so that the vectors of eigenvalues of W 1 A k 1 W 2 and W 1 A k 2 W 2 are equal (see, e.g., De Lathauwer, De Moor and Vandewalle 2004, Theorem 6.1). Now, this is equivalent to demanding that the columns of X 3 are all distinct. As this is true by assumption, the proof is complete.

The proof of Theorem 1 shows that access to lower-dimensional submodels allows to disentangle the scale of the columns of the X i and the weights on the diagonal of Π. This is so because the matrix Π equally shows up in the lower-dimensional submodels, and so transforming A k to W 1 A k W 2 absorbs the weights into the joint diagonalizer Q in (3.4).

Also note that the dimension of the matrices in (3.4) is r × r, independent of the size of the original matrices X i . On the other hand, larger matrices X i could be beneficial for identification, as it becomes easier for them to satisfy the requirement of full column rank.

The full-rank condition that underlies Theorem 1 has a simple testable implication. Indeed, by (3.3), it implies that the matrix A 0 has rank r. As this matrix is observable, so is its rank and, hence, our key identifying assumption is refutable. In applications this can be done using any of a number of available rank tests. We refer to [START_REF] Kasahara | Nonparametric identification and estimation of the number of components in multivariate mixtures[END_REF] and [START_REF] Bonhomme | Nonparametric estimation of finite mixtures from repeated measurements[END_REF] for practical details on the implementation of such procedures.

Theorem 1 can be applied to recover the tri-adic decomposition of X up to an arbitrary joint permutation matrix. We present the result in the form of two theorems.

Theorem 2 (Vectors). If X 1 , X 2 , and X 3 have full column rank and for each pair

(i 1 , i 2 ) ∈ {i 1 , i 2 ∈ {1, 2, 3} : i 1 < i 2 } X {i 1 ,i 2 } is observable, then X 1 , X 2 ,
and X 3 are all identified up to a common permutation of their columns.

Theorem 3 (Weights). If X i is identified up to a permutation of its columns and has full column rank, and if X {i} is observable, then π is identified up to the same permutation.

Proof. The one-dimensional submodel X {i} is the vector

X {i} = X i π.
Given X i , the one-dimensional submodel yields linear restrictions on the weight vector π. Moreover, if X i is known and has maximal column rank, these equations can be solved for π, giving

(3.5) π = (X i X i ) -1 X i X {i} ,
which is the least-squares coefficient of a regression of X {i} on the columns of X i .

In the supplement we apply Theorems 1-3 to the finite-mixture model and the hidden Markov model of Section 2 to obtain constructive proofs of identification.

4. Estimation by joint approximate diagonalization. The proof of Theorem 1 shows that the key restrictions underlying our results take the form of a set of matrices being simultaneously diagonalizable in the same basis. The problem of joint matrix diagonalization has recently received considerable attention in the field of independent component analysis, and computationally-efficient algorithms for it have been developed; see [START_REF] Fu | Simultaneous diagonalization with similarity transformation for non-defective matrices[END_REF], [START_REF] Iferroudjene | A new Jacobi-like method for joint diagonalization of arbitrary non-defective matrices[END_REF]2010], and [START_REF] Luciani | Joint eigenvalue decomposition using polar matrix factorization[END_REF]2014]. Such algorithms can be exploited here to construct easy-to-implement nonparametric estimators of multivariate latent-structure models.

Thus, we propose estimating the latent-structure model in (3.1) as follows. Given an estimate of the array X and of its lower-dimensional submodels, first estimate all x ij by solving a sample version of the joint diagonalization problem in (3.4), possibly after unfolding if q > 3. Next, back out the weights π 1 , π 2 , . . . , π r by solving the sample analog of the minimum-distance problem in (3.5). Asymptotic theory for this second step follows readily by the delta method. If desired, a consistent labelling can be recovered based on the proof of Theorem 2 (see the supplementary material). 4.1. Estimator. Consider a generic situation in which a set of κ r × r matrices C 1 , C 2 , . . . , C κ can be jointly diagonalized by an r × r invertible matrix Q 0 , that is, (4.1)

C k = Q 0 D k Q -1 0 ,
for diagonal matrices D 1 , D 2 , . . . , D κ . Knowledge of the joint eigenvectors implies knowledge of the eigenvalues, as

(4.2) D k = Q -1 0 C k Q 0 .
The matrix Q 0 is not unique. Moreover, let off

Q = Q -diag Q and let Q F = trace(Q Q) denote the Frobenius norm.
Then any solution to the least-squares problem

(4.3) min Q κ k=1 off(Q -1 C k Q) 2
F is a joint diagonalizer in the sense of (4.1). Each of these delivers the same set of eigenvalues in (4.2) (up to a joint permutation).

The statistical problem of interest in this section is to perform inference on the D 1 , D 2 , . . . , D κ when we only observe noisy versions of the input matrices C 1 , C 2 , . . . , C κ , say C 1 , C 2 , . . . , C κ . The sampling noise in the C k prevents them from sharing the same set of eigenvectors. Indeed, in general, there does not exist a Q such that Q -1 C k Q will be exactly diagonal for all k. For this, the least-squares formulation in (4.2)-(4.3) is important as it readily suggests using, say Q, any solution to (4.4) min

Q∈Q κ k=1 off(Q -1 C k Q) 2 F ,
where Q is an appropriately-specified space of matrices to search over; see below. The estimator Q is that matrix that makes all these matrices as diagonal as possible, in the sense of minimizing the sum of their squared off-diagonal entries. It is thus appropriate to call the estimator Q the joint approximate-diagonalizer of C 1 , C 2 , . . . , C κ . An estimator of the D k (up to a joint permutation of their eigenvalues) then is

(4.5) D k = diag( Q -1 C k Q).
Distribution theory for this estimator is not available, however, and so we provide it here. Throughout, we work under the convention that estimates are computed from a sample of size n.

4.2. Asymptotic theory. For our problem to be well-defined we assume that the matrix of joint eigenvectors is bounded. In (4.4), we may therefore restrict attention to the set of r × r matrices Q = (q 1 , q 2 , . . . , q r ) defined as Q = {Q : det Q = 1, q j F = c for j = 1, 2, . . . , r and c ≤ m} for some m ∈ (0, ∞). The restrictions on the determinant and the column norms are without loss of generality and only reduce the space of matrices to be searched over when solving (4.4). Let Q * be any solution to (4.3) on Q and let Q 0 ⊂ Q be the set of all matrices Q * ∆Θ for permutation matrices ∆ and diagonal matrices Θ whose diagonal entries are equal to 1 and -1 and have det Θ = 1. Then Q 0 is the set of solutions to (4.3) on Q.

Construct the r × rκ matrix C = (C 1 , C 2 , . . . , C κ ) by concatenation and define C similarly.

Theorem 4 (Consistency). If the set Q 0 belongs to the interior of Q, C = C + o p (1), and Q ∈ Q satisfies κ k=1 off( Q -1 C k Q) 2 F = min Q∈Q κ k=1 off(Q -1 C k Q) 2 F + o p (1), then lim n→∞ Pr( Q ∈ O) = 1 for any open subset O of Q containing Q 0 .
Each Q ∈ Q 0 has associated with it a permutation matrix ∆ and a diagonal matrix Θ as just defined so that Q = Q * ∆Θ. Theorem 4 states that (up to a subsequence) we have that

Q p → Q * ∆ 0 Θ 0 for well-defined ∆ 0 and Θ 0 . We may then set Q 0 = Q * ∆ 0 Θ 0 in (4.1). It then equally follows that D k p → D k = ∆ 0 D * k ∆ 0 ,
where D k is as in (4.2) and

D * k = Q -1 * C k Q * ,
both of which are equal up to a permutation. Thus, the consistency of the eigenvalues (up to a joint permutation) follows from the consistency of the estimator of the input matrices C.

To provide distribution theory, let

D k 1 D k 2 = (D k 1 ⊗ I dim D k 2 ) -(I dim D k 1 ⊗D k 2 )
denote the Kronecker difference between the square matrices D k 1 and D k 2 . Construct the r 2 × r 2 κ matrix

T = ((D 1 D 1 ), (D 2 D 2 ), . . . , (D κ D κ ))
by concatenation and let

G = (I r ⊗ Q 0 ) κ k=1 (D k D k ) 2 + T (I κ ⊗ Q 0 ⊗ Q -1 0 ),
where Q + is the Moore-Penrose pseudo inverse of Q. Theorem 5 contains distribution theory for our estimator of the matrix of joint eigenvectors Q in (4.4).

Theorem

5 (Asymptotic distribution). If C -C F = O p (n -1/2 ), then √ n vec( Q -Q 0 ) = G √ n vec( C -C) + o p (1)
as n → ∞.

If, further, √ n vec( C -C) d
→ N (0, V ) for some covariance matrix V , Theorem 5 implies that

√ n vec( Q -Q 0 ) d → N (0, G V G )
as n → ∞. In our context, √ n-consistency and asymptotic normality of the input matrices is not a strong requirement. Indeed, the proof of Theorem 1 showed that the input matrices are of the form C k = W 1 A k W 2 , where W 1 and W 2 follow from a singular-value decomposition of A 0 . An estimator of C k can thus be constructed using a sample analog of A 0 to estimate W 1 and W 2 , together with a sample analog of A k . If the estimators of A 0 and A k are √ n-consistent and asymptotically normal and all non-zero singular values of A 0 are simple, then

√ n vec( C -C) d → N (0, V ) holds.
A detailed derivation of V is readily obtained from the argument on the estimation of eigendecompositions of normal matrices in the supplementary material to Bonhomme, Jochmans and Robin [2014, Lemma S.2].

We next present the asymptotic behavior of D = ( D 1 , D 2 , . . . , D κ ), our estimator of the eigenvalues D = (D 1 , D 2 , . . . , D κ ). To state it, let S r = diag(vec I r ) be an r 2 ×r 2 selection matrix; note that S r vec

Q = vec(diag Q). Let H = (I κ ⊗ S r ) (I κ ⊗ Q 0 ⊗ Q -1 0 ). Theorem 6 follows. Theorem 6 (Asymptotic distribution). If C -C F = O p (n -1/2 ), then √ n vec( D -D) = H √ n vec( C -C) + o p (1)
as n → ∞.

Again, if √ n vec( C -C) d → N (0, V ), then √ n vec( D -D) d → N (0, H V H )
as n → ∞.

5. Application to density estimation. With discrete outcomes, both the finite-mixture model in (2.1) and the hidden Markov model in (2.5) are finite dimensional. Further, the matrices to be simultaneously diagonalized are contingency tables. These tables can be estimated by simple empirical cell probabilities and are √ n-consistent and asymptotically normal. Hence, the theory on the asymptotic behavior of the eigenvalues from the previous section (i.e., Theorem 6) can directly be applied to deduce the large-sample behavior of the parameter estimates.

With continuous outcomes, as in (2.3), the main parameters of the model are density functions. Such an infinite-dimensional problem is not directly covered by the arguments from the previous section. Nonetheless, we will show that Theorem 5 can be used to obtain density estimators with standard asymptotic properties. 5.1. Estimator. We provide convergence rates and distribution theory for series estimators based on (2.4). By the results of Subsection 2.3, this also covers the estimation of emission densities in a hidden Markov model with continuous outcome variables. Recall from above that the projections

Proj κ i f ij = ϕ κ i b ij yield the multilinear restrictions B = E[ q i=1 ϕ κ i (Y i )ρ(Y i )] = r j=1 π j q i=1 E[ϕ κ i (Y i )ρ(Y i )|Z = j] = r j=1 π j q i=1 b ij ,
where ϕ κ i is the vector containing the κ i leading polynomials from the orthogonal system {ϕ k , k > 0}. As we will show, for fixed κ 1 , κ 2 , . . . , κ q , the array B provides sufficient information for nonparametric identification of Fourier coefficients through the associated joint diagonalizer. Moreover, in the asymptotic analysis, κ 1 , κ 2 , . . . , κ q are all held fixed.

For the purpose of this section we may fix attention to a given index i. By unfolding B towards direction i we obtain the (equivalent) three-way array

B i = E φ Q 1 ⊗ φ Q 2 ⊗ ϕ κ i (Y i )ρ(Y i ) ,
where Q 1 and Q 2 partition the index set {1, 2, . . . , q}\{i} (see Section 3) and we have introduced the notational shorthand

φ Q = i ∈Q ϕ κ i (Y i )ρ(Y i ).
The array B i can be analyzed using our diagonalization approach. Following the notation from the proof of Theorem 1, the two-dimensional submodel associated with B i is the matrix

A 0 = E φ Q 1 ⊗ φ Q 2 ,
while the array B i itself consists of the first κ i matrices of the set {A k , k > 0}, where

A k = E φ Q 1 ⊗ φ Q 2 ϕ k (Y i )ρ(Y i ) .
All these matrices are of dimension

i 1 ∈Q 1 κ i 1 × i 2 ∈Q 2 κ i 2 .
A singular-value decomposition of A 0 provides matrices W 1 and W 2 so that the κ i matrices W 1 A k W 2 are jointly diagonalizable by, say, Q. From the proof of Theorem 1, the matrix Q is unique (up to the usual normalizations on the sign and norm of its columns and a joint permutation of the columns, as discussed before) as soon as the conditions in Theorem 1 are satisfied.

Given Q, we can compute

Q -1 (W 1 A k W 2 ) Q = diag (b i1k , b i2k , . . . , b irk ), where, recall, b ijk = E[ϕ k (Y i )ρ(Y i )|Z = j]
for any integer k (including those k that exceed κ i ). Equivalently, the kth Fourier coefficient of f ij can be written as

(5.1) b ijk = e j Q -1 (W 1 A k W 2 ) Q e j ,
where e j is the r × 1 selection vector whose jth entry is equal to one and its other entries are all equal to zero.

Our orthogonal-series estimator of f ij is based on sample analogs of the b ijk in (5.1). We estimate the array B as

B = n -1 n m=1 q i=1 ϕ κ i (Y im )ρ(Y im ),
where {Y 1m , Y 2m , . . . , Y qm } n m=1 is a size-n sample drawn at random from the mixture model. From this we estimate b ijk for any k as

bijk = e j Q -1 ( W 1 A k W 2 ) Q e j = n -1 n m=1 e j Ω m e j ϕ k (Y im )ρ(Y im ),
using obvious notation to denote sample counterparts in the first expression and introducing the matrix

Ω m = Q -1 ( W 1 φ Q 1 m ⊗ φ Q 2 m W 2 ) Q in the second expression; here, we let φ Q m = i ∈Q ϕ κ i (Y i m )ρ(Y i m ). The associated orthogonal-series estimator of f ij (y) for some chosen integer κ is fij (y) = κ k=1 bijk ϕ k (y) = n -1 n m=1 e j Ω m e j κ k=1 ϕ k (Y im )ϕ k (y)ρ(Y im ).
(5.2) Note that, in the absence of e j Ω m e j , this expression collapses to a standard series estimator of the marginal density of Y i . Hence, the term e j Ω m e j can be understood as a weight that transforms this estimator into one of the conditional density of Y i given Z = j. Equation (5.2) generalizes the kernel estimator of [START_REF] Bonhomme | Nonparametric estimation of finite mixtures from repeated measurements[END_REF]. The term e j Ω m e j plays the same role as the posterior classification probability (normalized to sum up to one across observations) in the EM algorithm as well as in its nonparametric version (Levine, Hunter and Chauveau 2011, Equations ( 15)-( 17)). A computational advantage here is that the series estimator is available in closed form once e j Ω m e j has been computed while EM requires iterative computation of density estimates and classification probabilities until convergence.

A natural way of choosing the number of series terms in (5.2) would be by minimizing the squared

L 2 ρ -loss, fij -f ij 2 2 ,
as a function of κ. In the supplement we show that an empirical counterpart of this criterion (up to terms that do not involve κ) is

κ k=1 b2 ijk - 2n -1 n -1 n m=1 o =m e j Ω m e j e j Ω o e j κ k=1 ϕ k (Y io )ϕ k (Y im )ρ(Y io )ρ(Y im ).
Apart from the weight functions, this is the usual cross-validation objective for orthogonal-series estimators [START_REF] Hall | Cross-validation and the smoothing of orthogonal series density estimators[END_REF]. Before turning to the statistical properties of fij we note that, although we maintain a hard thresholding procedure in (5.2), our approach can equally be combined with other popular smoothing policies that shrink the impact of higher-order Fourier coefficients; see Efromovich [1999, Chapter 3] for a discussion on such policies. 5.2. Asymptotic theory. Under mild conditions, the series estimator in (5.2) exhibits standard large-sample behavior. The precise conditions depend on the choice of orthogonal system, i.e., {ϕ k , k > 0}. We give two sets of conditions that cover the most popular choices.

When the component densities are supported on compact intervals we can restrict attention to [-1, 1] without loss of generality; translation to generic compact sets is straightforward. In this case we will allow for polynomial systems that satisfy the following general requirements. Here and later we let • ∞ denote the supremum norm.

A.1 The sequence {ϕ k , k > 0} is dominated by a function ψ, which is continuous on (-1, 1) and positive almost everywhere on [-1, 1]. ρ, ψρ, and ψ 2 ρ are integrable, and there exists a sequence of constants {ζ κ , κ > 0} so that

ϕ κ ϕ κ ∞ ≤ ζ κ .
These conditions are rather weak. They are satisfied for the popular class of Jacobi polynomials, for example, which includes Chebychev polynomials of the first kind, Chebychev polynomials of the second kind, and Legendre polynomials.

In this case we will need the following regularity from the component densities.

A.2 The (ψρ) 4 f ij are integrable.

The weaker requirement that the (ψρ) 2 f ij are integrable will suffice to obtain the convergence rates in Theorem 7 below, but A.2 will be needed to obtain the pointwise asymptotic-normality result in Theorem 8.

When the component densities are supported on the whole real line, we will take {ϕ k , k > 0} to be the orthonormalized system of Hermite functions.

B.1

The sequence {ϕ k , k > 0} has members

ϕ k (y) = 2 -(k-1)/2 ((k -1)!) -1/2 π -1/4 e -y 2 /2 h k-1 (y),
where {h k , k ≥ 0} is the system of the Hermite polynomials, in which case

ϕ κ ϕ κ ∞ ≤ ζ κ for ζ κ ∝ √ κ.
We will also impose the following regularity and smoothness conditions.

C.1 The f ij are continuous.

C.2 Proj κ f ij -f ij ∞ = O(κ -β
) for some constant β ≥ 1.

C.3

The singular values of A 0 are all simple.

Convergence in L 2 ρ -norm implies that lim κ→∞ κ k=1 b 2 ijk is finite, and so that the Fourier coefficient associated with ϕ k shrinks to zero as k → ∞. The constant β is a measure of how fast the Fourier coefficients shrink. In general, β is larger the smoother the underlying function that is being approximated. Simplicity of the singular values of A 0 holds generically and is used here to ensure that the matrices W 1 , W 2 are continuous transformations of A 0 . This is a technical requirement used to derive the convergence rates of their plug-in estimators.

Under these assumptions we obtain standard integrated squared-error and uniform convergence rates.

Theorem 7 (Convergence rates). Let either A.1-A.

fij -f ij 2 2 = O p (κ/n + κ -2β ), fij -f ij ∞ = O p (ζ κ κ/n + κ -β ),
for all i, j.

The rates in Theorem 7 equal the conventional univariate rates of series estimators; see, e.g., [START_REF] Newey | Convergence rates and asymptotic normality for series estimators[END_REF]. Thus, the fact that Z is latent does not affect the convergence speed of the density estimates.

To present distribution theory for the orthogonal-series estimator at a fixed point y let σij

(y) = n -1 n m=1 e j Ω m e j κ k=1 ϕ k (Y im )ϕ k (y)ρ(Y im ) -fij (y) 2 ,
which is a sample standard deviation, and denote f i = r j=1 π j f ij in the following theorem.

Theorem 8 (Asymptotic distribution). Suppose that n, κ → ∞ so that κ 2 /n → 0 and nκ -2β → 0. Then

fij (y) -f ij (y) σij (y)/ √ n d → N (0, 1),
for each y ∈ Y that lies in an interval on which f i is of bounded variation.

Under A.1-A.2 σij (y) grows like ϕ κ (y) F , and this depends on the polynomial system used. Because A.1 states that ϕ κ ϕ κ ∞ = O(ζ κ ), a weak bound on the convergence rate that holds for all y is O p (ζ κ / √ n). With Legendre polynomials, for example, the orthogonal-series estimator has a variance of order κ/n, which is the same as that of an estimator based on a random sample from f ij [START_REF] Hall | Cross-validation and the smoothing of orthogonal series density estimators[END_REF]. Likewise, under B.1 we have that σij (y) grows like κ 1/4 and so the variance of the estimator is of the order √ κ/n. This is again the standard convergence rate for conventional Hermite series estimators [START_REF] Liebsher | Hermite series estimators for probability densities[END_REF]).

6. Monte Carlo illustrations. We evaluated the performance of the orthogonal-series estimator via simulation. We report root mean integrated squared error (RMISE) calculations for designs taken from [START_REF] Levine | Maximum smoothed likelihood for multivariate mixtures[END_REF]. This allows us to compare our estimator to the EM-like approaches proposed in the literature. We also investigate the accuracy of the pointwise asymptotic approximation of the density estimator in Theorem 8 in a Monte Carlo experiment based on a hidden Markov model. Throughout this section we use Hermite polynomials as basis functions, set κ i = 10 for all i, and use the cross-validation technique introduced above to select the number of series terms. Joint approximate diagonalization was done using the algorithm of [START_REF] Luciani | Joint eigenvalue decomposition using polar matrix factorization[END_REF]2014]. We also computed the estimator using the algorithms of [START_REF] Fu | Simultaneous diagonalization with similarity transformation for non-defective matrices[END_REF] and [START_REF] Iferroudjene | A new Jacobi-like method for joint diagonalization of arbitrary non-defective matrices[END_REF]2010] and found very similar results to the ones reported below 6.1. RMISE comparisons. We evaluate the RMISE of the estimator fij ,

E fij -f ij 2 2 ,
as approximated by 500 Monte Carlo replications. The first set of designs involves mixtures of normals, where

f ij (y) = φ (y -µ ij ) .
The second set of designs deals with mixtures of central and non-central t-distributions, that is,

f ij (y) = t 10 (y; µ ij ),
where we let t d (y; µ) denote a t-distribution with d degrees of freedom and non-centrality parameter µ. We set q = 3, r = 2, so the data is drawn from a three-variate two-component mixture. The parameters of the component densities are set to (µ 11 , µ 21 , µ 31 ) = (0, 0, 0) for the first component and (µ 12 , µ 22 , µ 32 ) = (3, 4, 5) for the second component. We consider various choices for the mixing proportions π = (π 1 , π 2 ) . Figure 1 plots the RMISE as a function of the mixing proportion π 1 for samples of size n = 500. The results for the first and second component for each outcome variable are labelled consecutively as •, , and as , , respectively. The patterns of the RMISE are comparable to those for the EM-like estimators in Levine, Hunter and Chauveau [2011, Figure 1], although the magnitudes are larger here. The latter observation agrees with the intuition that joint estimation of classification probabilities and component densities (as in EM) should be more efficient than sequential estimation (as here). However, a precise comparison between the methods is complicated by the fact that the EM approaches are kernel based while we work with orthogonal series, and because the tuning parameters (the bandwidths for EM and the number of series terms here) were selected in a different manner.

Our least-squares estimator of the mixing proportions was also evaluated in these designs and was found to perform well. The Monte Carlo results are provided in the supplementary material. 6.2. Inference in a hidden Markov model. We next consider inference in a hidden Markov model with r = 2 latent states and q = 3 outcome variables. The latent Markov chain has transition matrix and stationary distribution equal to K = .8 .2 .2 .8 , π = .5 .5 , respectively. The emission densities f 1 and f 2 are skew-normal densities [START_REF] Azzalini | A class of distributions which includes the normal ones[END_REF], f j (y) = 2φ(y -µ j ) Φ(α j (y -µ j )),

with µ 1 = -2, α 1 = 5 and µ 2 = -µ 1 , α 2 = -α 1 . The sign of the skewness parameters α 1 , α 2 implies that f 1 is skewed to the right while f 2 is skewed to the left.

In each of 500 Monte Carlo replications, we estimated the two emission densities f 1 and f 2 using our orthogonal-series estimator and constructed 95% confidence intervals at the percentiles of f 1 and f 2 . We present results for n = 500 (left plot) and n = 5, 000 (right plot) graphically in Figure 2. Results for additional sample sizes are available in the supplementary material. Each plot in Figure 2 contains the true functions f 1 and f 2 (solid lines), and the mean (across the Monte Carlo replications) of our orthogonal-series (dashed lines) as well as of an infeasible kernel-density estimator (dashed-dotted lines) computed from the subsample of observations that are in the respective latent state (see the supplementary material for more detail.) The plots show that, even in small samples, our estimator essentially co-incides with the infeasible estimator, on average.

Figure 2 also contains average 95% confidence intervals (-•), based on the pointwise distributional result in Theorem 8, for the emission densities at their respective percentiles. To assess the adequacy of our asymptotic approximation, the plots in the figure also provide 95% confidence intervals at the percentiles constructed using the empirical standard deviation of the

  2 and C.1-C.3 or B.1 and C.1-C.3 hold. Then

Fig 1 .

 1 Fig 1. RMISE of the orthogonal-series density estimator

Fig 2 .

 2 Fig 2. Emission densities in the hidden Markov model

Acknowledgements. We thank the Editor (Runze Li), an Associate Editor, three referees, Xiaohong Chen, Ignat Domanov, Marc Henry, and Nick Vannieuwenhoven for comments. We are grateful to Laurent Albera and Xavier Luciani for the code for their diagonalization algorithm in Luciani and Albera [2010; 2014] with us. Early versions of this paper circulated as 'Nonparametric spectral-based estimation of latent structures'.

* Supported by European Research Council grant ERC-2010-StG-0263107-ENMUH. † Supported by Sciences Po's SAB grant 'Nonparametric estimation of finite mixtures'. ‡ Supported by European Research Council grant ERC-2010-AdG-269693-WASP and by Economic and Social Research Council grant RES-589-28-0001 through the Centre for Microdata Methods and Practice. AMS 2000 , 62G05; secondary, 15A18, 15A23, 62G20, 62H17, 62H30.

point estimates across the Monte Carlo replications (- * ). Figure 2 shows that our estimated standard error captures well the small-sample variability of the orthogonal-series estimator.

Supplement. The supplement to this paper [START_REF] Bonhomme | Supplement to "Estimating multivariate latent-structure models[END_REF] contains additional details and discussion, omitted proofs, and additional simulation results.