Hi!
This forum has helped me a lot, thank you for all the information you are sharing! I would like to do a multilevel sPLS model and used the tune.splslevel.wrapper function I found here. It worked perfectly. But when I repeated the analysis, I ran into an error I had not faced before. This error now shows up for the tune.splslevel as well as for the tune.splslevel.wrapper function. Did anyone face this error before and has suggestions how to solve it? I appreciate any help!
=== NCOMP: 1 ===
Error in tune.splslevel(X, Y, multilevel = design, mode = āregressionā, : Promise already under evaluation: recursive default argument reference or earlier problem?
Traceback shows the following:
4. tune.splslevel(X, Y, multilevel = design, mode = āregressionā, ncomp = ncomp, test.keepX = test.keepX, test.keepY = test.keepY, already.tested.X ā tmp.atX, already.tested.Y ā tmp.atY)
3. withCallingHandlers(expr, message = function(c) if (inherits(c, classes)) tryInvokeRestart(āmuffleMessageā))
2. suppressMessages(tune.splslevel(X, Y, multilevel = design, mode = āregressionā, ncomp = ncomp, test.keepX = test.keepX, test.keepY = test.keepY, already.tested.X ā tmp.atX, already.tested.Y ā tmp.atY))
- tune.splslevel.wrapper(X = X_impu_nipals, Y = Y_ROI, ncomp = 2, design, test.keepX = list.keepX, test.keepY = list.keepY)
PS: At the same time, I am facing another error when using tune.spls on data matrices that contain NAs. In case these two issues might be connected to one another I wanted to provide this information: Here
I have no idea, what might cause this error, so I didnāt know which of my code to provide except for this very basic one:
list.keepX <- c(3:10)
list.keepY <- c(5:15)
tune.spls.multi <- tune.splslevel(
X = X_impu, #containing missing data
Y = Y_ROI, # no missing data
multilevel = design,
ncomp = 2,
mode = "regression",
test.keepX = list.keepX,
test.keepY = list.keepY,
already.tested.X = 1,
already.tested.Y = 1,
BPPARAM = BiocParallel::SerialParam()
)
I am happy to share further information.