## Not run: ------------------------------------
#
# # create some data from a mixed graphical model
#
# n <- 100 # number of samples
# type <- c("g", "c", "c") # one gaussian, two categorical
# lev <- c(1, 3, 2) # the categorical variables have 3 and 2 categories, resp
# graph <- matrix(0, now=3, ncol=3)
# graph[1, 2] <- graph[2, 1] <- .5 # edge weight .5
# thresh <- list(c(0), c(0, 0, 0), c(0, 0))
# data <- mgmsampler(n, type, lev, graph, thresh, parmatrix=NA, nIter=1000)
#
# # fit a mixed graphical model
# fit <- mgmfit(data, type, lev=lev, d=2)
# grapht <- graph
# grapht[grapht!=0] <- 1 # binarize true graph
#
# # compute derivatives of confusion matrix
# confusion(grapht, fit$adj)
#
## ---------------------------------------------
Run the code above in your browser using DataLab