Why are perf results different when I use withinVariation?


I am trying to perform a multilevel analysis but with Pareto scaling. Since this is not an option in MixOmics, I have been doing it before calculating the model. Even though this works (perf results are not different), I am trying to do a multilevel analysis, which would require me to calculate the within variation dataset before scaling (using the withinVariation function). However, the perf function yields very different results in this case. Why could this be and how can it be fixed?

Thanks in advance for your response,

hi @NickBliziotis
Could you expand on what you mean by ‘yield very different results’? (compared to what?).

In perf() we perform cross-validation, but in a multilevel setting specified inside the function we cross-validate on the unique individuals, not the samples. So that could be one reason, but I would need you to clarify the exact process (for example with a pseudo code).