{'fraction_non_alphanumeric': 0.041287598485178253, 'fraction_numerical': 0.013037043485831193, 'mean_word_length': 4.390309713749414, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Structure estimation for mixed graphical models in high-dimensional data

Undirected graphical models are a key component in the analysis of complex observational data in a large variety of disciplines. In many of these applications one is interested in estimating the undirected graphical model underlying a distribution over variables with different domains. Despite the pervasive need for such an estimation method, to date there is no such method that models all variables on their proper domain. We close this methodological gap by combining a new class of mixed graphical models with a structure estimation approach based on generalized covariance matrices. We report the performance of our methods using simulations, illustrate the method with a dataset on Autism Spectrum Disorder (ASD) and provide an implementation as an R-package.

1. Introduction. Determining conditional independence relationships through undirected graphical models, also known as Markov random fields (MRFs), is a key component of the statistical analysis of complex observational data in a wide variety of domains such as statistical physics, image analysis, medicine and more recently psychology (Borsboom and Cramer, 2013). In many of these applications one is interested in estimating the MRF underlying a joint distribution over variables with different domains.
As an example, consider a dataset of questionnaire responses of individuals diagnosed with Autism Spectrum Disorder (ASD), covering demographics, social environment, diagnostic measurements and aspects of well-being. A central research question in the study of Autism is how to explain individual differences in well-being. Many studies tried to answer this question by focusing on the relation between well-being and specific areas such as social functioning, cognitive ability, education and working conditions (e.g. Magiati, Tay and Howlin, 2014;Anderson, Liang and Lord, 2014). While MSC 2010 subject classifications: Primary Structure estimation, mixed distributions, graphical models; secondary Generalized covariance matrices this approach provides valuable insights, one necessarily misses the full picture of all variables and might misinterpret relationships that change when additional variables are taken into account. An alternative is an integrated analysis, in which one determines the conditional independence relationships of all variables by estimating the MRF underlying the multivariate distribution over all variables. In most datasets, however, this means that we need a method to estimate an MRF underlying a multivariate distribution over variables of different domains. In our example dataset, for instance, we have variables that are continuous (age), ordinal (IQ-scores), categorical (type of housing) and count-valued (number of different medications).
Despite the pervasive need for a method to estimate a MRF underlying a joint distribution over mixed variables in many disciplines, so far such a general method is not available. In the present paper we address this methodological gap by combining a new class of mixed joint distributions (see Section 2.2) with a structure estimation approach based on generalized covariance matrices (see Section 2.3). We thereby provide the first method that estimates a mixed MRF in which all variables are modeled on their proper domain. This avoids possible information loss due to variable transformations. In addition, our method is attractive in terms of interpretation as it is similar to the well-known Gaussian case. We introduce basic concepts in Section 2.1, describe our estimation algorithm in detail in Section 2.5, show performance benchmarks in Section 3 and apply our method to the above dataset on ASD in Section 4. In the remainder of this section, we review existing methods to estimate MRFs underlying mixed distributions.
Graphical models associated with distributions over one type of variable are well-known and used in many applications. The most prominent example is the Gaussian MRF underlying the multivariate Gaussian distribution. A corollary of the Hammersley-Clifford theorem (Lauritzen, 1996) states that zeros in the inverse covariance matrix of the multivariate Gaussian distribution indicate absent edges in the corresponding graphical model. Two classes of efficient algorithms leverage this relationship in order to estimate the Gaussian MRF: global methods estimate the whole graph by directly estimating the inverse covariance matrix using a penalized likelihood (Yuan and Lin, 2007;Banerjee, El Ghaoui and d'Aspremont, 2008;Friedman, Hastie and Tibshirani, 2008) and nodewise methods estimate the neighborhood of each node separately by solving a collection of sparse regression problems using the Lasso (Meinshausen and Bühlmann, 2006). Another graphical model that is widely used is the MRF underlying the Potts model (see e.g. Wainwright and Jordan, 2008). For the Ising model (Potts model with m = 2 categories), Ravikumar, Wainwright and Lafferty (2010) proposed a node-wise estimation method based on 1 -regularized neighborhood regression. This method was further extended by van Borkulo et al. (2014), who select the regularization parameter using the Extended Bayesian Information Criterion (EBIC), which is known to perform well in selecting sparse graphs (Foygel and Drton, 2014). For general multivariate discrete distributions, Loh and Wainwright (2013) proposed an approach based on the estimation of the inverses of generalized covariance matrices.
Work on mixed graphical models is rather recent and many of the existing methods are based on non-parametric extensions of the graphical models described above: the non-paranormal (Liu, Lafferty and Wasserman, 2009;Lafferty, Liu and Wasserman, 2012) method uses transforms that Gaussianize the data and then fits a Gaussian MRF and thereby offers a graphical model consisting of different distributions with continuous domain. Similarly, the copula-based method of Dobra and Lenkoski (2011) uses thresholded latent Gaussian variables to model ordinal variables. Other methods use non-parametric approximations such as rank-based estimators to the correlation matrix, and then fit a Gaussian MRF (Xue and Zou, 2012;Liu et al., 2012).
Another way of modeling mixed graphical models is to sidestep multivariate densities altogether and relate a set of multivariate response variables of one type to multivariate covariate variables of another type. This can be done by using multiple regression or multi-task learning models (Evgeniou and Pontil, 2007). More recent approaches also allow these multiple regression models to associate covariates with mixed types of responses (Yang, Kim and Xing, 2009). Also, in many machine learning learning procedures, mixed types of variables are accounted for implicitly by using suitable distance-or entropy-based measures (Hastie, Tibshirani and Friedman, 2009;Hsu, Chen and Su, 2007). However, the sample complexity of non-parametric methods is typically inferior to those that learn parametric models, especially in high-dimensional settings.
Parametric approaches involve methods based on latent variables that permit mixed continuous and count variables (Sammel, Ryan and Legler, 1997) or dependencies between exponential family members through a latent Gaussian MRF (Rue, Martino and Chopin, 2009). While these approaches provide statistical models for mixed data, they model dependencies between observed variables using a latent layer of unobserved variables; this typically renders techniques computationally expensive and possibly intractable when estimating these models with strong statistical guarantees. A classic model for mixed data without latent variables is the conditional Gaussian model, that combines categorical and Gaussian variables (Lauritzen, 1996). Here, Gaussian variables are modeled as a multivariate Gaussian that is conditioned on all possible states of the categorical variable, which renders the model computationally intractable. The model becomes more feasible when it is restricted to pairwise or three-way interactions (Lee and Hastie, 2012;Cheng, Levina and Zhu, 2013, respectively); however, the general problem remains. Finally, Yang et al. (2014) introduces a way to combine different conditional distributions to their joint distribution, given that each conditional is an exponential family member.
The key idea of our paper is to generalize the generalized covariance approach proposed by Loh and Wainwright (2013) for discrete random variables to the class of mixed joint distributions over random variables from the exponential family introduced by Yang et al. (2014). We thereby obtain an estimation algorithm for mixed graphical models that both models all variables on their proper domain and is easy to interpret as the estimation method is similar to the well-known Gaussian case.
2. Estimation of mixed Markov Random Fields in high-dimensional data.
2.1. Markov random fields. Undirected graphical models or Markov random fields (MRFs) are families of probability distributions that respect the structure of an undirected graph. An undirected graph G = (V, E) consists of a collection of nodes V = {1, 2, . . . , p} and a collection of edges E ⊆ V ×V . A node cutset is a subset U of nodes that breaks the graph into two or more nonempty components when it is removed from the graph. A clique is a subset C ⊆ V such that (s, t) ∈ E for all s, t ∈ C where s = t. A maximal clique is a clique that is not properly contained within any other clique. The neighborhood N (s) of node s is defined as the set of nodes that are connected to s by an edge, N (s) := {t ∈ V |(s, t) ∈ E}. The degree of a node s is denoted by deg(s) = |N (s)|. Throughout the paper we use the shorthand X \s for X V \{s} .
To each vertex s in graph G we associate a random variable X s taking values in a space X . For any subset A ⊆ V , we use the shorthand X A := {X s , s ∈ A}. For three subsets of nodes, A, B, and U , we write X A ⊥ ⊥ X B |X U to indicate that the random vector X A is independent of X B when conditioning on X U . Markov random fields can be defined in terms of the global Markov property: Definition 1. (Global Markov property). If X A ⊥ ⊥ X B |X U whenever U is a vertex cutset that breaks the graph into disjoint subsets A and B, then the random vector X := (X 1 , . . . , X p ) is Markov with respect to the graph G.
Note that the neighborhood set N (s) is always a vertex cutset for A = {s} and B = V \ {s ∪ N (s)}.
By the Hammersley-Clifford Theorem (e.g. Lauritzen, 1996), for strictly positive probability distributions, the global Markov property is equivalent to the Markov factorization property. Consider for each clique C ∈ C a clique-compatibility function ψ C (X C ) that maps configurations x C = {x s , s ∈ V } to R + such that ψ C only depends on the variables X C corresponding to the clique C.
Definition 2. (Markov factorization property). The distribution of X factorizes according to G if it can be represented as a product of clique functions Because we focus on strictly positive distributions, we can represent (1) in terms of an exponential family associated with the cliques C in G where the functions φ C (X C ) = log ψ C (X C ) are sufficient statistic functions specified by the exponential family member at hand, θ C are parameters associated with these functions and Φ(θ) is the log-normalizing constant 2.2. Mixed joint distributions. Yang et al. (2014) introduced a special case of the form (2) which allows to model any combination of conditional univariate members of the exponential family within one joint distribution which respects the neighborhoods of the conditional distributions. We first describe this class of models and then provide an example.
Consider a p-dimensional random vector X = (X 1 , . . . , X p ) with each variable X s taking values in a potentially different set X s and let G = (V, E) be an undirected graph over p nodes corresponding to the p variables. Now suppose the node-conditional distribution of node X s conditioned on all other variables X \s is given by an arbitrary univariate exponential family distribution where the functions of the sufficient statistic φ s (·) and the base measure C s (·) are specified by the choice of exponential family and the canonical parameter E s (X \s ) is a function of all variables except X s . These node-conditional distributions are consistent with a joint MRF distribution over the random vector X as in (1), that is, Markov with respect to graph G = (V, E) with clique-set C of size at most k, if and only if the canonical parameters {E s (·)} s∈V are a linear combination of k-th order products of univariate sufficient statistic functions {φ(X t )} t∈N (s) where θ s· := {θ s , θ st , ..., θ st 2 ...t k } is a set of parameters and N (s) is the set of neighbors of node s according to graph G. The corresponding joint distribution has the form where Φ(θ) is the log-normalization constant.
A limitation of this class of models is that in case they include two univariate distributions with infinite domain, they are not normalizable if neither both distributions are infinite only from one side nor the base measures are bounded with respect to the moments of the random variables (for details see Yang et al., 2014). We return to this limitation in the discussion.
As a concrete example of (4), take the Ising-Gaussian model: consider a random vector X := (Y, Z), where Y = {Y 1 , . . . , Y p } are univariate Gaussian random variables, Z = {Z 1 , . . . , Z p } are univariate Bernoulli random variables and we only consider pairwise interactions between sufficient statistics. For the univariate Gaussian distribution (with known σ 2 ) the sufficient statistic function is φ Y (Y s ) = Ys σs and the base measure The Bernoulli distribution has the sufficient statistic function φ Zr = Z r and the base measure C Z (Z r ) = 0. From (4) follows that this mixed distribution has the form If X r is a Bernoulli random variable, the node-conditional has the form Note that this form is equivalent to the node-conditional Ising model with one term added for interactions between Bernoulli and Gaussian random variables. If X s is a Gaussian random variable, the node-conditional has the form Not, let σ = 1, factor out Y s and let Finally, when taking µ 2 s 2 out of the log normalization constant, we arrive with basic algebra at the well-known form of the univariate Gaussian distribution with unit variance In order to estimate the Markov random field underlying these mixed joint distributions, we use generalized covariance matrices. We introduce these in the following section.
2.3. Generalized covariance matrices of mixed joint distributions. Consider a random vector Ψ = {X 1 , . . . , X p } that is jointly Gaussian. Then the inverse Γ of the covariance matrix cov(Ψ) is graph-structured in the sense that Γ st = 0 whenever (s, t) ∈ E (e.g. Lauritzen, 1996). While this result is well-known and leveraged by many structure estimation algorithms for the Gaussian case, the relationship between inverse covariance and graphstructure is generally unknown for general multivariate distributions. Loh and Wainwright (2013) improved this situation by showing that the inverses of covariance matrices over discrete random vectors are also graph-structured, when augmenting the covariance matrix appropriately with higher oder interactions. In the present paper, we extend this result to the more general class of mixed joint distributions as in (4). This will allow us to use the nodewise graph algorithm proposed by Loh and Wainwright (2013) also for the estimation of mixed Markov random fields underlying mixed distributions. In the remainder of this section we first introduce necessary concepts, then illustrate the method using an example and finally state all results formally.
We require the notions of triangulation, junction trees and block graph structure. Triangulation can be defined in terms of chordless cycles, which are sequences of distinct nodes {s 1 , . . . , s } such that (s i , s i+1 ) ∈ E for all 1 ≤ i ≤ − 1, (s , s 1 ) ∈ E and no other nodes in the cycle are connected by an edge. Given an undirected graph G = (V, E), a triangulation is an augmented graph G = (V, E) that does not contain chordless cycles with length larger than 3.
Any triangulation G gives rise to a junction tree representation of G. Nodes in the junction tree are subsets of V corresponding to maximal cliques in G. The intersection of two adjacent cliques C 1 and C 2 is called separator set S = C 1 ∩ C 2 . Second, any junction tree must satisfy the running intersection property, that is, for each pair V, C of cliques with intersection S, all cliques on the path between U and V contain S. We refer the reader to Koller andCowell et al. (2007) for a more detailed treatment of the notions of triangulation and junction trees.
Consider a random vector Ψ(X) that factors according to a graph G and let C be the set of all cliques in G. We say that an inverse covariance matrix Γ = (cov(Ψ(X)) −1 ) is block graph-structured, if both of the following statements are true for any A, B ∈ C: 1. If A, B are not subsets of the same maximal clique, the entry Γ(A, B) is identically zero. 2. For almost all parameters θ, the entry Γ(A, B) is nonzero whenever A and B belong to the same maximal clique.
Consider an Ising-Gaussian model as in (5) that factors according to the graph in Figure 1 (a), where X 1 , X 3 are Bernoulli random variables and X 2 , X 4 are Gaussian random variables. We let all node parameters be θ s = 0.1 for all s ∈ V and the edge parameters be θ st = 0.5 for all (s, t) ∈ E. Recall that if X was distributed jointly Gaussian, standard theory would predict that Γ is graph-structured. The empirically computed inverse covariance matrix Γ of this model is displayed in Figure 1 (b). While the absent edge (4,2) between the Gaussian nodes is reflected by a zero entry at Γ 4,1 this is not the case for the other absent edge (3,1) and Γ is therefore not graphstructured. Now we consider the same covariance matrix but augment it with the interaction X 2 X 4 and compute its inverse Γ, which is displayed in 1 (c). We now have a zero entry at Γ 3,1 , reflecting the absent edge at (3,1). However, there is a nonzero entry at Γ 4,2 , which does not reflect the absent edge (4,2). We see that augmenting interactions to the covariance matrix renders its inverse graph structured with respect to the new, triangulated graph G.
We will now state the general result regarding the relationship between the inverses of augmented covariance matrices and the underlying graph structure. Equipped with this result we will come back to the above example and explain the zero-pattern in 1(c).
Let A ⊆ C be a set of cliques and define the random vector Ψ(φ(X); Theorem 1. Consider a mixed joint distribution P θ (X) as in (4) that factorizes according to a triangulated graph G and let C be the set of all cliques in G. Then the generalized covariance matrix cov(Ψ(φ(X); C)) is invertible, and its inverse Γ is block graph structured.
The proof is based on an equality between the inverse covariance Γ and the conjugate dual Φ * (µ) of the log-normalizing constant Φ(θ). We impose the triangulation condition, because it is a sufficient condition for being able to verify the claims of Theorem 1 in Φ * (µ). We provide a proof for Theorem 1 in Section 2.4.1.
Returning to the example in Figure 1, if we take the triangulation G in which we augment the edge (4,2), and let φ(X) = X, then the set of all cliques in G is equal to It can now be shown empirically that the 11×11 inverse covariance matrix Γ = (cov(Ψ(φ(X); C))) −1 reflects the graph structure of G: there are zeros at the positions Γ A,B , corresponding to the functions φ A (X A ) = s∈A φ s (X s ) and φ B (X B ) = s∈B φ s (X s ), whenever A and B are not contained in the same maximal clique. This would be the case e.g. for A = {1} and B = {3}.
Theorem 1 requires that we augment the covariance matrix with all cliques C ∈ C. A corollary of Theorem 1 (see Corollary A.2) states that it suffices to add all non-empty subsets of all separator sets S in G to render Γ graph structured. Stated formally, let pow(A) = C∈A pow(C) be the union of all 2 |C| − 1 nonempty subsets of all cliques C ∈ A. If S is the set of all separator sets in G, then we have to augment the original covariance matrix with sufficient statistics associated with the cliques in pow(S) to render its inverse graph-structured.
So far we have seen that Theorem 1 enables us to construct a covariance matrix whose inverse reflects the graph-structure of a triangulated graph G. However, in practice, we are not interested in the graph structure of a triangulation of G, but in the graph structure of the original graph G. Using a neighborhood selection approach, the following corollary of Theorem 1 enables us to estimate the original graph G. Let A(s; d) := {U ⊆ V \ {s}, |U | = d}, the set of all candidate neighborhoods of node s with size equal to d. This result follows from Theorem 1 by constructing a particular junction tree, in which the set of candidate neighborhoods defined in Corollary 1 separates the node s from the rest of graph G. This new graph consisting of the node s and all cliques S(s; d) is triangulated, because it consists only cliques.
Recall that the candidate neighborhood is required to separate node s from the rest of graph G. This implies that we could define a much smaller set of candidate neighborhoods if we made an additional assumption about the size of the largest clique in graph G that does not include node s. For example, if we know that the true graph reflects the conditional independence structure of a pairwise model, it suffices to define the candidate neighborhood as pow(A(s; 2))), regardless of deg(s). We return to this issue in the discussion of Algorithm 1 in Section 2.5.
We can now recover the original graph G by applying Corollary 1 to each node s ∈ V and take the row s of the inverse Γ as the support of the neighborhood N (s). Because Γ s,\s is a scalar multiple of the regression vector of X s upon X \s , we can use linear regression in order to estimate Γ s,\s . Before providing a detailed description of our nodewise method for graph-estimation in Section 2.5, we provide the proof for Theorem 1 and its corollaries in the following section.
2.4. Proof of Theorem 1 and Corollary 1. Theorem 1 is an extension of Theorem 1 in Loh and Wainwright (2013) in that the following theorem is about mixed Markov random fields instead of discrete Markov random fields. We first provide a proof for Theorem 1 and then show that Corollary 1 follows.
2.4.1. Proof of Theorem 1. We follow the proof of Loh and Wainwright (2013), which consists of two parts. First, we have establish the equality of the inverse covariance matrix of sufficient statistics (cov θ {φ(X)}) −1 and the Hessian of the conjugate dual ∇ 2 Φ * (µ) of the log normalizing function Φ(θ) where the conjugate dual Φ * of a function Φ is defined as where µ ∈ R d is a fixed vector of mean parameters of the same dimension as θ, µ, θ is the Euclidean inner product m i=1 µ i θ i and µ ∈ M, where We define the mean parameter µ α associated with a sufficient statistic φ α as its expectation with respect to P θ (x) Note that, by assumption, Φ(θ) is finite, which implies that M is bounded. For an excellent treatment on the conjugate dual of the log normalizing function we refer the reader to Wainwright and Jordan (2008). Loh and Wainwright (2013) showed that equality (6) holds for regular, minimal exponential family distributions with a finite log-normalizing constant Φ(θ), that is, θ ∈ Ω = {θ : Φ(θ) < ∞} and we refer the reader to their paper for the proof of this result. Using this result, for the first part of the proof it remains to be shown that these requirements hold for the class of mixed distributions as in (4). Yang et al. (2014) show that the class is regular and has a finite log-normalizing constant, and minimality is established by Lemma 1: Lemma 1. The class of mixed distributions as in 4 is minimal.
For the proof of Lemma 1 see Appendix A.1. The second part of the proof is to show that the graph structure claimed in Theorem 1 holds in ∇ 2 Φ * (µ). In general there is no straight-forward way to compute ∇ 2 Φ * (µ), because we do not know how to compute derivatives of Φ(θ) in (7), which depends on all cliques in the graph. However, because we require the graph to be triangulated, we can represent P θ as a factorization of marginal distributions of cliques C ∈ C and separator sets S ∈ S (Lauritzen, 1996;Cowell et al., 2007) (9) P θ = C∈C P C (X C ) S∈S P S (X S ) .
If we plug the mixed joint distribution form as in (4) into (9) it is explicit that each term in the factorization depends only on the corresponding clique or separator set We obtain Φ * (µ) of Φ(θ) via its equality relation to the negative Shannon entropy H(P θ ) of the distribution P θ (11) Note, that the factorization (10) turns into a sum in the conjugate dual representation (11), which enables to verify the claims of Theorem 1 by taking partial derivatives: consider two subsets A, B ∈ C that are not contained in the same maximal clique C. As P θ (X) is Markov with respect to the triangulated graph G, all interaction parameters θ A,...,B associated with both A and B are equal to zero. When differentiating expression (11) with respect to µ A all terms that do not involve µ A drop. Now, when taking the second derivative with respect to µ B , all terms that do not involve µ B drop. The only terms left are terms involving both µ A and µ B . However, these terms are products involving a θ A,...,B = 0 and therefore we obtain ∂ 2 Φ * (µ) ∂µ A ∂µ B = 0. Together with the equality (6), this proves part (1) of the graph structure in Theorem 1.
Turning to part (2), if A, B are part of the same maximal clique we have θ A,...,B = 0 for at least one parameter θ A,...,B . Taking partial derivatives with respect to µ A and µ B preserves only terms involving both µ A and µ B . Assuming the θ's are drawn from a continuous distribution, ∂ 2 Φ * (µ) ∂µ A ∂µ B is almost surely nonzero. Together with equality (6), this proves part (2) of Theorem 1.

2.4.2.
Proof of Corollary 1. We take the conjugate dual Φ * (µ) of Φ(θ) corresponding to a model of the form (4) including only terms for cliques ({s} ∪ pow(A(s; d))). As above, we take derivatives with respect to µ s and µ B and all terms drop that do not contain both µ s and µ B . Whenever {s} = B ⊆ N (s), all terms including both µ s and µ B are equal to zero, because P θ (X) is Markov with respect to G. Therefore, whenever {s} = B ⊆ N (s), the partial derivative of Φ * (µ) with respect to µ s and µ B is equal to zero. With equality (6), this proves the claims of Corollary 1.
2.5. Nodewise regression algorithm for structure estimation of mixed graphical models. In this section we describe how to use neighborhood-regression together with the result in Corollary 1 to estimate a mixed MRF from data. Recall that we obtain the whole graph G = (V, E) by recovering the neighborhood N (s) of all s ∈ V . Corollary 1 enables us to construct an inverse covariance matrix Γ that reflects the neighborhood N (s). We can therefore estimate the neighborhood of s by estimating the row s in Γ. Recall that this row s is a scalar multiple of the regression vector of X s upon on X \s (see e.g. Lauritzen, 1996).
This means that we construct a random vector Ψ(φ(X); {s}∪pow(A(s; d)) for each node s as in Corollary 1 and we then predict the node s Ψ s by all other terms Ψ \s in Ψ. In order to get a sparse parameter vector θ , we apply 1 -regularization, whose strength is controlled by the regularization parameter λ n . The parameter vector θ is estimated by maximizing the 1penalized log likelihood. In case node s is associated with a Gaussian random variable, this is equivalent to solving the 1 -penalized least-squares problem (12) θ = arg min where b 0 > || θ|| 1 is a constant and k is the sparseness of the population parameter vector θ. For non-Gaussian variables a (link) function is used to define a linear relation between the dependent variable Ψ s and its predictors Ψ \s (for details see Friedman, Hastie and Tibshirani, 2010). Solving the lasso-problem in (12) for all s ∈ V yields two estimates θ i,j and θ j,i for each edge. We combine these estimates with an AND-rule (both parameters have to be nonzero, otherwise the edge is absent; the value is the average) or an OR-rule (at least one parameter has to be nonzero; the parameter value is the average over the non-zero parameters).
Further, we assign the parameters λ n , τ n to the scaling where || θ|| 2 is the 2 -norm of the population parameter vector θ and d is the degree of the true graph. By and we mean asymptotically larger and asymptotically over, respectively. Note the inequalities (13) contain the population parameter vector θ. In order to compute τ n , we use the estimated parameter vector θ and we select λ n using 10-fold cross-validation. We thereby obtain the following nodewise algorithm for structure estimation: Algorithm 1. (Nodewise regression method) 1. Construct the vector Ψ according to Corollary 1. 2. Select a parameter λ n using 10-fold cross-validation 3. Solve the lasso regression problem (12) with parameter λ n , and denote the solution by θ. 4. Threshold the entries of θ at level τ n 5. Combine the neighborhood estimates with the AND-or OR-rule and define the estimated neighborhood set N (s) as the support of the thresholded vector As we do not know the degree of the true graph d, we have to make an assumption about d. The straightforward choice would be d = |V | − 1 which puts no constraints on the true graph. However, note that the computational complexity of Algorithm 1 is O(2 d log p), which means choosing d = |V | − 1 renders the algorithm unfeasible for all but small graphs.
In order to make an informed assumption about d, note that the choice of d has two consequences in Algorithm 1: first, it influences the threshold τ n in (13), which reflects the sparsity assumption necessary for asymptotic consistency. Second, d determines the size of candidate neighborhoods added to the covariance matrix (see Corollary 1). If we now only consider satisfying the requirements of Corollary 1, we can choose d as the size of the largest clique in graph G that does not contain s. For example, in the case that the true model is a pairwise model, we would choose d = 2 instead of the degree d of G, which depends on the size and density of graph G. The cost of the assumption about d is, with either interpretation, that we miss edges belonging to cliques with size |C| > d.
For the sample complexity n d 3 log p, where d is the maximal degree in the true graph G, Loh and Wainwright (2013) prove asymptotic consistency for Algorithm 1. For details we refer the reader to their paper.
Because asymptotic considerations provide little information on how well a method performs in practical situations, we use simulations to test the performance of our method in recovering the graph from data in settings that resemble typical situations in exploratory data analysis.

Simulations.
We consider the following six graphical models: Binary-Gaussian, Binary-Poisson, Binary-Exponential, and Multinomial with m = 2, 3, or 4 categories. In the three mixed graphical models, half of the nodes are binary. We used the Potts model (see e.g. Wainwright and Jordan, 2008) to specify interactions between categorical variables: if we have m categories, X s , X t are two arbitrary nodes and j, k ∈ m, then θ st,jj = 1 and θ st,jk = 0, where j = k. Interactions between binary variables X s ∈ {0, 1} and continuous variables X t are specified as follows: if X s = 1 then θ st = 1 and if X s = 0 then θ st = 0. All graphs were random graphs (Erdoes and Rnyi, 1959) with p = 16 nodes and we varied sparsity by varying edge-probabilities P edge ∈ {.1, .2, .3}. We also varied the ratio between observations and variables n p ∈ exp{0, 1, 2, 3, 4, 5} ≈ {1, 3, 7, 20, 55, 148} and the size of augmented cliques (interactions) d ∈ {1, 2, 3}, where d = 1 means that we use the original covariance matrix. Noise was added by multiplying each edge-weight by a draw from a uniform distribution U(.3, 1). All thresholds were set to zero, only for Poisson and Exponential nodes we set the threshold to −.1 in order to avoid λ = 0 in case N (s) = {∅}. All edge-weights were additionally multiplied by −1, which led to less extreme category-potentials and therefore more variance in the categorical variables.
In the Binary-Gaussian case, the variance of the Gaussian univariate distributions was set to 1 and the whole random graph including noise was resampled until the weighted adjacency matrix of the Gaussian sub-graph was positive definite. For categorical variables, we required that each category is present in the data and that the category with the lowest frequency is present in more than 10% of the cases. The reason for the second condition is that we need non-zero variance in every possible response vector in 10fold cross-validation. For the same reason, we required for Poisson variables that the category with the highest frequency is present in less than 90% of the cases. In order to meet this requirement, we take the columns that do not meet the requirements and replace random row-entries by samples from categories with equal probabilities (categorical case) or by a draw from a Poisson distribution with λ = 1 2 (Poisson case) until the requirement is met. We combined parameters specifying the interaction between two categorical variables with the OR-rule and used the AND-rule to combine estimates between regressions.
Sensitivity and precision of our method for different combinations of sparsity (P edge ) and n/p-ratio for graphs consisting of categorical random variables with m = {2, 3, 4} categories is shown in Figure 2. In all conditions with d = 1, sensitivity quickly converges to 1 with increasing observations. However, in this setting precision does not converge to 1. This is consistent with our theory, as we require in Corollary 1 that all candidate neighborhoods with size up to larger or equal to the largest clique in the true graph are augmented. As we sampled data from a pairwise model, the largest clique in the true graph has size d = 2 and we violate this requirement. For k = 2, 3 we satisfy the requirements in Corollary 1 and in these settings Algorithm 1 converges in precision. The general performance drops when the number of categories m increases, because more parameters have to be estimated. We also observe that general performance drops with lower sparsity, however the effects are small. Note that for the binary case m = 2 we obtain qualitatively similar results compared to Loh and Wainwright (2013) and others who used a similar estimation method (Ravikumar, Wainwright and Lafferty, 2010;van Borkulo et al., 2014). Note that we observe a peculiar pattern in precision in the categorical MRFs with m > 2 categories. Precision increases initially with observations, but then decreases again. This is a consequence of the OR-rule, which we use to combine several parameters describing the interaction between two categorical variables into one edge-parameter. As only one of the (m − 1) 2 parameters has to be nonzero to render the corresponding edge nonzero, the algorithm becomes more liberal when the number of categories is high. While these spurious parameters are put to zero by the τ n -threshold (13) for small n, the threshold decreases with increasing n such that these spurious parameters are not set to zero anymore. Figure 3 shows sensitivity and precision of our method for the same combinations of sparsity and n/p-ratio as above for Binary-Gaussian, Binary-Poisson and Binary-Exponential. Similarly to the categorical case, we see in conditions with d = 1 that sensitivity seems to converge to 1 with increasing n in all conditions but the Binary-Gaussian cases with sparsity > .1. In conditions with d = 2, 3 sensitivity seems to converge to 1 in the Binary-Gaussian case with sparsity P edge = .1. In all other conditions with d = 2, 3 sensitivity increases with growing n. Precision converges most quickly for the Binary-Gaussian case, followed by the Binary-Poisson and Binary-Exponential case. Sparsity seems to have no impact on the precision in any of the three mixed graphs. Similarly to the categorical case, precision converges to 1 despite the fact that the theoretical sample complexity is not satisfied. As above, missing data points in precision is due to the fact that the algorithm often estimates zero edges.
4. Application to ASD Data. In this section we return to the exploratory data analysis problem introduced at the beginning of the paper. We estimate the MRF underlying a dataset consisting of responses to a questionnaire of 3521 individuals from the Netherlands diagnosed with Autism Spectrum Disorder (ASD). The variables cover demographics, social environment, diagnostic measurements and aspects of well-being (for details see Begeer, Wierda and Venderbosch, 2013).
We assumed that the maximal clique size in the true graph is two and we therefore augment second-order interactions (k = 2) to the covariance ma-trix and to combine parameters across regressions with the AND-rule. Different to the algorithm used for the simulations, we select the penalizationparameter λ using the EBIC, because the cross-validation requirement that each category is present in each fold was not satisfied in this dataset. For the layout in Figure 4, we used the force-directed algorithm of Fruchterman and Reingold (1991), that places nodes with many edges close to the center of the layout.
In Figure 4 (a), we see that the different aspects 'Demographics', 'Psychological', 'Social environment', and 'Medical' are strongly interrelated, which highlights the need for an integrated analysis. On the level of single variables, we can visually identify the importance of single variables, for example we see that 'Well-being' is central in the graph and has unique associations with many other variables. We can make the analysis of single variables more explicit by computing centrality measures for each node. Centrality measures quantify the importance of a node in a network, where the exact interpretation of importance depends on the specific centrality measure. In Figure 5 (a) we report the standardized centrality measures betweenness, closeness and degree (for details see Opsahl, Agneessens and Skvoretz, 2010). We see, for example, that 'Integration in Society' scores relatively high on closeness, degree and betweenness. This means 'Integration in Society' is relatively close to other nodes (closeness), has many connections (degree), and is often on the shortest path between any two nodes (betweenness).
We estimated the graph in Figure 4 (a) by modeling categorical variables as categorical variables, real-valued variables as Gaussian and count-valued variables as Poisson in a mixed graphical model. But does this actually give us a different graph compared with when we treat all variables as Gaussians? Figure 4 (b) shows the graph resulting from using the same estimation method as in (a), but treating all variables as Gaussians. We see that the resulting graph has less edges (density = .13 vs. .19). However, method (b) is not simply more liberal. We see also edges that are present in (a) but not in (b) such as the edge between 'Type of housing' and 'Openness about Diagnosis'. Also by comparing the centrality plots in 5 (a) and (b) we see considerable differences. For example, 'Satisfaction with Social Contacts' is one of the most central nodes in the mixed graphical model, while in the Gaussian graphical model its centrality is average or below average. These substantial differences between the two graphs highlight the importance of modeling variables on their proper domain.
5. Discussion. In the present paper, we extended the generalized covariance method of Loh and Wainwright (2013) to the class of mixed distri- butions introduced by Yang et al. (2014). We thereby provide an estimation method for the underlying graph structure of joint distributions over any combination of univariate members of the exponential family. The peculiar simulation results of increasing and then decreasing precision with growing n in conditions with m = 2, 3 and d = 1 show that it is important to make sensible choices about how to combine the set of parameters involved in an interaction including a categorical variable into one dependence parameter. One solution to this problem might be using the group lasso (Yuan and Lin, 2006;Jacob, Obozinski and Vert, 2009), which induces sparse estimation on the group level.
As mentioned in Section 2.2, a limitation of the class of mixed distributions that in case they include two univariate distributions with infinite domain, they are not normalizable if neither both distributions are infinite only from one side nor the base measures are bounded with respect to the moments of the random variables. While this is an important theoretical problem that has to be addressed in future research, it does not limit the applicability of our method in most situations. Problems would only occur in the presence of extremely large values, which are rarely found in real-world data as most measurement scales are (naturally) bounded.
As indicated in Section 3, we added additional noise after sampling to be able to perform 10-fold cross-validation to select an appropriate λ n parameter for the 1 -penalty in Algorithm 1. The proportion of data points replaced by noise until the requirement for cross-validation was met is depicted in Figure 6 in Appendix B. As can be seen in the figure, the proportion of added noise is considerable for the Binary-Gaussian and Binary-Exponential for small n p and in categorical graphs with m = 2, 3 and n p = 1. Therefore, in cases with a nonzero proportion of additionally added noise, the above simulation-results can interpreted as conservative estimates of how well the method performs in practice.
In order to make our method available to researchers, we implemented our method as the R-package mgm, that is available from the Comprehensive R Archive Network (CRAN) at http://CRAN.r-project.org/.
Statistical analyses of multivariate data based on Markov random fields are becoming increasingly popular in many areas of science. Despite the fact that most datasets involve different types of variables, up until now, there was no principled method available to estimate the Markov random field underlying a joint distribution over different types of variables. We closed this methodological gap by providing a well-performing and easy to interpret method to estimate the underlying Markov random field of a joint distribution consisting of any combination of univariate exponential family members, which includes commonly used distributions such as Gaussian, Bernoulli, multinomial, Poisson, exponential, gamma, chi-squared and beta. We provided simulation results illustrating the performance of the method in realistic situations, illustrated our method with a network of different live aspects of individuals diagnosed with ASD and presented an implementation of our method as an R-package.

APPENDIX A: PROOFS OF SUPPORTING LEMMAS
A.1. Proof of Lemma 1. The log-normalizing constant of the mixed joint distribution in (4) can be written as where ν is the count-measure, the Lebesgue-measure, or a combination of both.
To establish minimality, suppose C a C φ(x C ) = b almost surely, where the coefficients a C are real-valued and b is some constant. Plugging in x such that x s = 0 for all s ∈ V and using the fact that all states (discrete random variables) and intervals (continuous random variables) have positive probability, we see that b = 0. Now assume that not all a C are equal to 0. Let C be a set of cliques such that a C = 0 and |C | is minimal. Plugging in x such that x C = 0 and x C\C = 0, we have C a C φ(x C ) = a C by the minimality of |C |. This contradicts the fact a C = 0. Hence, we conclude that the sufficient statistics φ(x C ) are indeed linearly independent, implying that the class of mixed distributions as in (4) is minimal.
A.2. Corollary 2. Let pow(A) = C∈A pow(C) be the union of all 2 |C| − 1 nonempty subsets of all cliques C.
Corollary 2. Take any triangulation Gof the graph G and let A be the set of separator sets in G. Then the inverse Γ of the covariance matrix cov(Ψ(φ(X); ; V ∪ pow(A))) has the property that Γ({s}, {t}) = 0 whenever (s, t) / ∈ E.
A consequence of Corollary A.2 is that for all graphs with singleton separator sets (e.g. trees), the original covariance matrix cov(Ψ(φ(X), V )) is graph structured.
Proof. The proof of Corollary A.2 follows directly from the proof of Theorem 1. We take the conjugate dual Φ * (µ) as in (11) but of the log normalization function Φ(θ) corresponding to a model of the form (4) including only terms for cliques (V ∪ pow(A)). Analogously to the proof of Theorem 1 we take derivatives with respect to µ s and µ t and thereby all terms drop that do not contain both µ s and µ t . Whenever (s, t) / ∈ E, all terms including both µ s and µ t are equal to zero, because P θ (X) is Markov with respect to G.
Therefore, whenever (s, t) / ∈ E, the partial derivative of Φ * (µ) with respect to µ s and µ t is equal to zero. With equality (6), this proves Corollary A.2. APPENDIX B: ADDITIONAL NOISE PROPORTION IN SIMULATION Figure 6 depicts the proportion of noise added after sampling the data until the requirements for 10-fold cross-validation were met. A proportion of 1 means that all data points were replaced by noise.