set.seed(76)
X1 = MASS::mvrnorm(50, rep(0, 200), diag(200)) # covariates of the first group
X2 = MASS::mvrnorm(50, rep(0, 200), diag(200)) # covariates of the second group
X.list = list(X1, X2)
Y1 = matrix(stats::rnorm(50)) # responses for the first group
Y2 = matrix(stats::rnorm(50)) # responses for the second group
Y.list = list(Y1, Y2)
cv.parameter.set = parameter.set.G_2(
maxrankA = 1, maxrankJ = 1, gamma = 1e10
) # enumerate the set of tuning parameters
cv.ml.JICO = cv.continnum.iter(
X.list, Y.list, parameter.set = cv.parameter.set,
criteria = "min", nfold = 5, maxiter = 300
) # fit the model and use CV to find the best parameters
Run the code above in your browser using DataLab