n <- 10 # number of samples
type <- c("g", "c") # one Gaussian, one categorical
lev <- c(1, 3) # the categorical variable has 3 categories
graph <- matrix(0, 2, 2)
graph[1, 2] <- graph[2, 1] <- .5 # we have an edge with weight .5 between the two nodes
thresh <- list(c(0), c(0, 0, 0)) # all thresholds are zero
data <- mgmsampler(n, type, lev, graph, thresh, parmatrix = NA, nIter = 1000)
head(data)
Run the code above in your browser using DataLab