Constructing networks from different types of variables

In many situations one is interested in constructing a network from different types of variables, for example age (continuous), type of medication (categorical) and number of diagnoses (count). In this blog post on R-bloggers.com, I describe how to construct such a network using the R-package “mgm”: