khliland / HDANOVA

High-dimensional Multivaritate Analysis of Variance
0 stars 0 forks source link

Invalid number of components, ncomp #1

Open biga94 opened 4 days ago

biga94 commented 4 days ago

Hey there, I was trying to fit a model on repeated measures data.

Here's an head() of my data (with altered values due to privacy):

> head(df_long)
       ID  sesso   età   time variable    value
   <char> <char> <num> <char>   <char>    <num>
1:  HB001      M    36     T0    FGF-2 8.256965
2:  HB001      M    36     T0    IFN-g 2.227862
3:  HB001      M    36     T0    IL-1a 7.092083
4:  HB001      M    36     T0   IL-1ra 1.353255
5:  HB001      M    36     T0     IL-6 1.081805
6:  HB001      M    36     T0     IL-8 1.160021

Since I just want to assay time effect I've set the model formula: limmpca(value ~ r(ID) + variable*time, data = df_long) However it gives me this error:

> tmp <- limmpca(value ~ r(ID) + variable*time, data = df_long)
Errore in pls::mvr(y ~ X, ncomp = ncomp, data = dat, scale = scale, method = "svdpc") : 
  Invalid number of components, ncomp

Do you know how to overcome it? Best, DB

khliland commented 4 days ago

Hi DB,

I worked on an update regarding this over the weekend, and I just pushed it to GitHub now. Can you check if this helps your case? There are still som details to iron out if the repeated measure model misses one of the main effects.

Regards, Kristian