There's a package called "spCCA" on https://msbi.ipb-halle.de/msbi/spCCA/. I need to run "getCCA3" function in it. My advisor ran it successfully. (It took a day to get the result.) But on my computer, with the same code, it took 1 minute and showed null results. I tried different computers, with Windows and macOS, and got nothing. Does anyone know the possible reason for this?
My data sets are OTUs(operational taxonomic units) and METs(metabolites). Sample size is 137. OTU is a 137 by 175 matrix. MET is a 137 by 731 matrix. Z is a 137*3 catagorical 0-1 matrix. They are scaled and without NAs.
Following is part of my code and the result.
install.packages("spCCA")
library("spCCA")
> scX[1:5,1:8]
Otu001 Otu002 Otu003 Otu004 Otu005 Otu006 Otu007 Otu008
24 -1.127860 -1.155401 -0.8479404 -0.7722523 -0.9398251 -1.0367999 -0.3869777 -0.7955252
68 -1.101447 -1.103471 -0.8334032 -0.7696575 -0.8626867 -0.9723455 -0.3765279 -0.7888179
50 -1.079016 -1.114280 -0.8401778 -0.7722523 -0.8712576 -1.0287908 -0.3689466 -0.7955252
52 -1.092873 -1.106604 -0.8238058 -0.7696575 -0.9181457 -1.0123911 -0.3414903 -0.7955252
32 -1.077791 -1.093289 -0.8156903 -0.7592782 -0.9015080 -0.9750152 -0.3869777 -0.7821106
> newscY[1:5,1:10]
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9]
[1,] -0.25689597 -0.06583109 -0.3033692 -0.3399333 -0.7319339 -0.9358452 -0.2598252 -0.5081042 0.3327363
[2,] 1.23534007 0.05640615 -0.1568638 -0.7552671 -0.5885719 -0.7014474 -1.2953496 1.0138803 -0.3383102
[3,] 0.04242789 -0.93063372 -0.5611901 -0.7552671 -0.1826920 -0.9036287 -0.8488069 -0.1787369 -0.9554043
[4,] -1.05511977 -0.93063372 -0.1299876 -0.7552671 0.9990045 -0.9358452 1.7862043 -0.3545300 -0.9554043
[5,] 0.93774108 1.68284446 0.2460916 0.5018554 -0.1561209 1.0407578 0.9984070 0.3147964 1.3159508
[,10]
[1,] 2.4942030
[2,] 0.8819917
[3,] -0.4450216
[4,] -0.8208717
[5,] 3.1181910
> scZ[1:5,]
numdiabetes oralhealthvar1 oralhealthvar2
[1,] -1.0640955 -0.6968215 -0.7317029
[2,] 0.9329057 -0.6968215 1.3566992
[3,] -1.0640955 -0.6968215 -0.7317029
[4,] -1.0640955 -0.6968215 -0.7317029
[5,] -1.0640955 1.4246128 -0.7317029
> getCCA3(scX[1:5,1:8], newscY[1:5,1:10], scZ[1:5,])
$cc3.weight.x
Otu001
Otu002
Otu003
Otu004
Otu005
Otu006
Otu007
Otu008
$cc3.weight.y
[1,]
[2,]
[3,]
[4,]
[5,]
[6,]
[7,]
[8,]
[9,]
[10,]
$cc3.weight.z
numdiabetes
oralhealthvar1
oralhealthvar2
$cc3.CV.x
24
68
50
52
32
$cc3.CV.y
24
68
50
52
32
$cc3.CV.z
24
68
50
52
32
$corr
NULL
$lambda
[1,]
[2,]
[3,]
$num.CV
[1] 10