I am a bit confused by this piece of code above. I see you update the PCA by augmenting the effect matrices for each effect (1:(p-1)) by adding the residuals (EffectMatGLM[[p]]). This makes perfect sense to me. However, when i = p, it looks like you update the scores on the residuals augmented with themselves. Is this expected? I would have thought that you should loop without the residuals: for (i in 1:(p-1) { ...
Hello Manon, @ManonMartin
https://github.com/ManonMartin/limpca/blob/bb827252ca8f5d08b9581fb7e53ff76e87d87d76/R/lmpPcaEffects.R#L148-L153
I am a bit confused by this piece of code above. I see you update the PCA by augmenting the effect matrices for each effect (
1:(p-1)
) by adding the residuals (EffectMatGLM[[p]]
). This makes perfect sense to me. However, wheni = p
, it looks like you update the scores on the residuals augmented with themselves. Is this expected? I would have thought that you should loop without the residuals:for (i in 1:(p-1) { ...
Happy to hear your thoughts on this :wink: