I am trying to run the tuning step for a MINT.splsda. I can get the example stemcell data to run normally, but every time I run my data I get this error message. My sample sizes are quite small (see table) and I have 50 variables. Trying different measure, and dist, did not help. The rest of the MINT.plsda steps were running fine up until this stage.
Calling ‘tune.mint.splsda’ with Leave-One-Group-Out Cross Validation (nrepeat = 1)
Error in [<-
(*tmp*
, classification == groups[j], j, value = 1) :
subscript out of bounds
Exp 1 Exp2 Exp3
Naive Mother 7 3 7
Infected Mother 9 7 9
Also, why do we use tune here and not tune.mint.splsda?
Thank you in advance
Note: by playing around with the number of variables like this, I find that reducing the number of variables does reduce the error rate:
res.mint.splsda ← mint.splsda(X, Y, study = study, ncomp = 2, keepX = c(10, 30))
perf.mint ← perf(res.mint.splsda, dist = “centroids.dist”)
perf.mint$global.error