if (FALSE) {
## We fit a pairwise and 3-order MGM to the mixed Autism dataset (?autism_data)
# 1) Fit Pairwise MGM
# Call mgm()
fit_d2 <- mgm(data = autism_data$data,
type = autism_data$type,
level = autism_data$lev,
k = 2) # ad most pairwise interacitons
# Weighted adjacency matrix
fit_d2$pairwise$wadj # for instance, we see there is an interaction 1-2
# 2) Look at details of interaction 1-2
showInteraction(object = fit_d2,
int = c(1, 2))
# For more examples see https://github.com/jmbh/mgmDocumentation
}
Run the code above in your browser using DataLab