Error and warning when performing canonical pls

Hi,
I’d like to perform pls in canonical mode where X and Y have six samples.
When I try to run perf on the result, I get and error and a warning, none of which I am able to understand. Any help will be highly appreciated.
Best,
David
My code:

> pls.123 <- pls(transc, prot, ncomp = 4, mode = "canonical")
> Q2.pls.123 <- perf(pls.123, validation = "Mfold", folds = 4, nrepeat = 5)

The error:

Error in Check.entry.pls(X, Y, ncomp, keepX, keepY, mode = mode, scale = scale,  : 
  For `canonical mode', 'ncomp' needs to be lower than ncol(Y)= 0

The warning:

In internal_wrapper.mint(X = X, Y = Y, ncomp = ncomp, scale = scale,  :
  At least one study has less than 5 samples, mean centering might
    not do as expected

My questioning:
*I do not understand why ‘ncomp’ needs to be lower than ncol(Y)= 0
Why does it say At least one study has less than 5 samples,? (I get this warning also if mode = “regression”)

hi @david.rengel!

I’ll go through the customary checks:

Potential errors:

  • assuming Y = prot, is this data set including counts, or a small number of proteins? I have the feeling the method is confusing this Y with a vector.
  • do you have the same error with a smaller number of components?

Kim-Anh