## Not run: ------------------------------------
#
# set.seed(1)
# x1 <- rnorm(100)
# x2 <- rnorm(100)
# x3 <- rnorm(100) + 4*x1
# data <- cbind(x1, x2, x3)
# fitobj <- mgmfit(data, type=c('g', 'g', 'g'), lev=rep(1,3), d=1, ret.warn = FALSE)
#
# fitobj$wadj # We get a strong dependency between x1-x3
#
# # We compute nodewise predictions and errors
# predobj <- predict.mgm(fitobj, data)
#
# # And look at nodewise errors
# predobj$error
#
## ---------------------------------------------
Run the code above in your browser using DataLab