plotVar and block.spls, negative correlation warning
Issue #93
resolved
in plotVar.R (around line 350), the warning about negative correlation is generated by this code:
if (any(class.object %in% object.blocks))
{
VarX = do.call(cbind, lapply(object$variates, function(i) i[, ncomp]))
corX = cor(VarX)
if(any(corX < 0))
warning("There is negative correlation between the variates of some blocks, be careful with the interpretation of the correlation circle.")
}
When you compute VarX, ncomp is used but ncomp is equal to object$ncomp (which is equal to the number of components for each block, eg c(6,6,6,6) for a run with 4 blocks and 6 components per block). It should be comp the parameter of the function, its value is by default c(1,2).
if (any(class.object %in% object.blocks))
{
VarX = do.call(cbind, lapply(object$variates, function(i) i[, comp]))
corX = cor(VarX)
if(any(corX < 0))
warning("There is negative correlation between the variates of some blocks, be careful with the interpretation of the correlation circle.")
}
Comments (2)
-
-
- changed status to resolved
Merged FlorianR/package-mixomics/devel into devel Fix issue
#93→ <<cset 7b961c4b8493>>
- Log in to comment
Issue has been fixed commit 95fddf9. Will be available in the next release.
Thanks!