sim <- generateData(n = 100, p = 8, q = 5, rho = 0.1, missing.type = "MCAR")
# \donttest{
fit <- missoNet(X = sim$X, Y = sim$Z) # fit over a grid
plot(fit) # GoF heatmap
cvfit <- cv.missoNet(X = sim$X, Y = sim$Z, kfold = 5, compute.1se = TRUE)
plot(cvfit, type = "scatter", plt.surf = TRUE) # CV error surface
yhat <- predict(cvfit, newx = sim$X, s = "lambda.min")
# }
Run the code above in your browser using DataLab