Multilevel design issues

Hi,

Thank you for creating this amazing package. Hope you can resolve some issues with the multilevel design. I’ll take the vac18 data as an example because it outputs the same errors as when I am using my own data. Note: I was running the code step by step as it was shown on the mixomics website.

While using R version 4.2.1 I receive the following error for pca function:

pca.multilevel.vac18 ← pca(X, scale = TRUE, center = TRUE,

  •                         multilevel = design)
    

Error in pca(X, scale = TRUE, center = TRUE, multilevel = design) :
unused argument (multilevel = design)

I’ve changed R version to 4.3.0 and pca function was implemented with notification “Splitting the variation for 1 level factor”. However this time splsda function throws me an error:

final.splsda.multilevel.vac18 ← splsda(X, Y, ncomp=4,

  •                                     keepX = c(65,15,70,50),
    
  •                                     multilevel = design)
    

Error in rowSums(Y) : ‘x’ must be an array of at least two dimensions

Thank you so much. I would appreciate your valuable feedback.

A quick update:
Issue with pca function in 4.2.1 version is resolved after I removed mdatools package library (it had pca function of its own). The issue with splsda in 4.3.0 version persists.

Thank you,
Ecaterina

hi @katea909,

thanks for notifying the clash with mdatools.

For the sPLS-DA, I m not sure what is happening as I dont have enough information.

  • try first a non multilevel and see if it runs. If not, something is not correctly input in your data.
  • try then by using the external withinVariation() function on X, which you will then input in a normal sPLS-DA (this is what a multilevel sPLS0DA is doing ‘manually’).

Let me know if it works / does not work and we can take it further.

Kim-Anh