# NOT RUN {
# }
# NOT RUN {
# Fit MGM with pairwise & threeway interactions to Autism Dataset
fit_k3 <- mgm(data = autism_data$data,
type = autism_data$type,
level = autism_data$lev,
k = 3,
overparameterize = TRUE,
lambdaSel = "EBIC",
lambdaGam = .5)
# List of estimated interactions
fit_k3$interactions$indicator
# Plot Factor Graph
nodeColors <- c("white", "orange", "lightblue")
FactorGraph(object = fit_k3,
PairwiseAsEdge = FALSE,
DoNotPlot = FALSE,
colors = nodeColors,
labels = 1:7,
layout="spring")
# For more examples see https://github.com/jmbh/mgmDocumentation
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab