Effect of variable selection on correlation table #295
-
I am using the correlation() function with 'partial = FALSE' and 'multilevel = TRUE' to get a correlation table for multiple outcome variables with multiple measurements per participant. Contrary to my expectation, I noticed that when I feed the function a data frame with columns ID, var1, var2, and var3, the correlation between var1 and var2 is not the same as when I swap var3 for var4. So I guess I have a misconception about how the mixed models are set up to estimate the correlation coefficients. I would have expected something like, var1 ~ var2 + (1|ID), for bivariate correlations with no influence from the other variables. I would be very grateful for a clarification! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Unfortunately this is a known issue and a bug :( |
Beta Was this translation helpful? Give feedback.
Unfortunately this is a known issue and a bug :(
see #290