Decode known latent signal distributed across 3 matrices with SiMLR and RGCCA. For each run, we:
energyType variable, default CCA-like)Under the above simulation, a better method will more reliably explain the underlying true latent signal.
The key metrics will compare the ability to predict the known latent signal in testing data based on the embeddings derived in an unsupervised dimensionality reduction step. This is one of the primary ways in which SiMLR may be used to study high-dimensional datasets.
The main metric will be the R\(^2\) value between the model fit and the true latent signal in the test data. Higher values (averaged over simulations) are associated with better performance.
The simulation study has several parameter the user may explore to gain more insight. Default options corrupt each matrix by an amount drawn from a random uniform distribution. We also add modality-specific covariation via a smoothing operation. This operation also dampens signal.
Note: every run re-simulates the input data, re-runs SiMLR and RGCCA and compares the findings to the same applied to permuted data. In a real example, you would only run SiMLR and RGCCA on permuted data in each loop.
Result: Demonstrate well-above chance recovery of latent signal competitive with or better than RGCCA and its sparse counterpart, SGCCA.
Result: SiMLR demonstrates more consistent signal recovery than RGCCA (strongly) and SGCCA (smaller but still distinct advantage).
The reduced variance in performance in likely due in part to both graph-based regularization and the primal formulation i.e. that we directly optimize the smoothed and sparsified feature vectors instead of using the dual formulation.
set.seed( 808 )
library( ANTsR )
library( RGCCA )
# library( smoother )
doA = TRUE
smoothRows <- function( x ) {
window = sample( 25:150, 1 )
nr = nrow( x )
nc = ncol( x )
xout = x * 0
for ( k in 1:nr ) {
vex = x[k,]
xout[ k, ] = vex # smoother::smth.gaussian( vex, window=window, tails=TRUE )
}
antsrimpute( xout )
}
doCorruption = TRUE
if ( ! exists( "energyType" ) ) energyType = 'cca'
nComp = 4 # n components
if ( ! exists( "nsims" ) ) nsims = 120
nits = 100 # n-iterations
nz = 0 # simulated signal parameter - not sensitive to this choice
nzs = 1.5 # simulated signal parameter - not sensitive to this choice
nzs2 = 1 # simulated signal parameter - not sensitive to this choice
nna = rep( NA, nsims )
# this data frame will hold the results and allow us to answer questions about how noise impacts the outcome
simdatafrm = data.frame(
symRSQ = nna,
rgccaRSQ = nna,
sgccaRSQ = nna,
prmRSQ = nna,
corrupt1 = nna,
corrupt2 = nna,
corrupt3 = nna,
nTrueEmbeddings = nna,
nForSim = nna
)
################################################################################
for ( sim in c(1:nsims) ) {
set.seed( sim )
smaller = rnorm( 1, 0.8, 0.2 )
nsub = round( 400 * smaller ) # number of subjects
npix = c( nsub*4, nsub*2, nsub * 8 ) # size of matrices are wildly different
ntrain = 0.8 * round( nsub )
train = sample( c( rep(T, ntrain ) ,rep(F, nsub - ntrain )) ) # train and test split
test = !train
nEmbeddings = nk = sample( 5:25, 1 )# for latent signal
# the outcome's first column is the latent signal that we are seeking
mixmats = diag( nk )
outcome = scale( matrix(runif( nsub * nk, nz, nzs2 ),ncol=nk) )
# the 3 matrices below represent modality specific distributions
view1tx = scale(matrix( rnorm( npix[1] * nk, nz, nzs ), nrow=nk ))
view2tx = scale(matrix( rnorm( npix[2] * nk, nz, nzs*1.5 ), nrow=nk ))
view3tx = scale(matrix( rnorm( npix[3] * nk, nz, nzs*0.8 ), nrow=nk ))
# below we mix the independent basis matrices with the true signal
outcomex = outcome
# throw some difference in here - so really just the first column is the latent signal
reo=2:nk
outcomex[,reo]=sample(outcomex[,reo])
# here, we resample the diagonal matrix to provide some variability about
# where the signals appear across different modalities
# we also smooth to provide some modality specific covariation
smoosig = abs( rnorm( 3, 6, 1.5 ) ) # draw from a distribution of smoothing parameters
if ( doA ) mixmat = as.matrix( smoothImage( as.antsImage( mixmats[sample(1:nrow(mixmats)),] %*% view1tx) , smoosig[3] ) ) else mixmat = smoothRows( mixmats[sample(1:nrow(mixmats)),] %*% view1tx )
# mix in the real signal --- repeat the same procedures for all 3 views of data
mat1 = (outcomex %*% mixmat )
outcomex=outcome
outcomex[,reo]=sample(outcomex[,reo])
if ( doA ) mixmat = as.matrix( smoothImage( as.antsImage( mixmats[sample(1:nrow(mixmats)),] %*% view2tx), smoosig[2] ) ) else mixmat = smoothRows( mixmats[sample(1:nrow(mixmats)),] %*% view2tx )
mat2 = (outcomex %*% mixmat )
outcomex = outcome
outcomex[,reo] = sample(outcomex[,reo])
if ( doA ) mixmat = as.matrix( smoothImage( as.antsImage( mixmats[sample(1:nrow(mixmats)),] %*% view3tx), smoosig[1] ) ) else mixmat = smoothRows( mixmats[sample(1:nrow(mixmats)),] %*% view3tx )
mat3 = (outcomex %*% mixmat )
# small additive noise for each matrix
mat1 = mat1 + matrix( rnorm( prod(dim(mat1)), 0, 0.25 ), nrow=nsub)
mat2 = mat2 + matrix( rnorm( prod(dim(mat2)), 0, 0.25 ), nrow=nsub)
mat3 = mat3 + matrix( rnorm( prod(dim(mat3)), 0, 0.25 ), nrow=nsub)
if ( doCorruption ) {
# corrupt a portion of matrices - with random amounts of corruption each simulation
ruinRate = runif(3,0.1,0.9)
corrSDs = abs( rnorm( 3, 10, 10 ) )
corrMNs = rnorm( 3, 0, 10 )
corrInds = round(npix[3] * ruinRate[3] ):npix[3]
mat3[ ,corrInds] = matrix( rnorm( prod(dim(mat3[ , corrInds])), corrMNs[3], corrSDs[3] ), nrow=nsub)
corrInds = round(npix[2] * ruinRate[2] ):npix[2]
mat2[ ,corrInds] = matrix( rnorm( prod(dim(mat2[ , corrInds])), corrMNs[2], corrSDs[2] ), nrow=nsub)
corrInds = round(npix[1] * ruinRate[1] ):npix[1]
mat1[ ,corrInds] = matrix( rnorm( prod(dim(mat1[ , corrInds])), corrMNs[1], corrSDs[1] ), nrow=nsub)
}
# automate the regularization selection using up to 50 neighbors for each matrix
inmats = list( vox = mat1[train,], vox2 = mat2[train,], vox3 = mat3[train,] )
regs = regularizeSimlr( list( mat1[train,], mat2[train,], mat3[train,] ),
rep( 50, 3 ), sigma = rep( 10.0, 3 ) )
result = simlr(
inmats,
smoothingMatrices = regs,
energyType = energyType,
initialUMatrix = nComp,
verbose = FALSE,
iterations = nits,
mixAlg = mixingMethod ) # allows different methods to be compared
p1 = mat1 %*% abs(result$v[[1]]); colnames(p1) = paste0("PC",1:ncol(p1))
p2 = mat2 %*% abs(result$v[[2]]); colnames(p2) = paste0("PC",1:ncol(p1))
p3 = mat3 %*% abs(result$v[[3]]); colnames(p3) = paste0("PC",1:ncol(p1))
nnn = 1:nComp
temp=data.frame( outc = outcome[,1], sym1=p1[,nnn], sym2=p2[,nnn], sym3=p3[,nnn] )
mdlsym=lm( outc~.,data=temp[train,])
dfPred = data.frame( true_test_outcome = temp$outc[test], predicted_outcome = predict(mdlsym,newdata=temp[test,]))
mdlsymPred = lm( true_test_outcome ~ predicted_outcome, data=dfPred )
rsqsym = cor( temp$outc[test], predict(mdlsym,newdata=temp[test,]) )^2
rsqsym
if ( sim == 1 ) {
library( rtemis )
rtlayout(1, 3, byrow = TRUE, autolabel = TRUE)
rtemis::mplot3.xy( temp[test,]$sym1.PC1, temp[test,]$sym2.PC1, main='SiMLR: PC1_1 vs PC2_1', se.fit = TRUE, fit='lm' )
# rtemis::mplot3.xy( temp[test,]$sym2.PC1, temp[test,]$sym3.PC1, main='SiMLR: PC2_1 vs PC3_1', se.fit = TRUE, fit='lm' )
rtemis::mplot3.xy( temp[test,]$sym3.PC1, temp[test,]$sym3.PC3, main='SiMLR: PC3_1 vs PC3_3', se.fit = TRUE, fit='lm' )
# rtemis::mplot3.xy( temp[test,]$sym2.PC3, temp[test,]$sym1.PC4, main='SiMLR: PC2_3 vs PC1_4', se.fit = TRUE, fit='lm' )
rtemis::mplot3.xy( dfPred$true_test_outcome, dfPred$predicted_outcome, main='SiMLR: Test Data', se.fit = TRUE, fit='lm' )
}
# compare to permuted data
s1 = sample( 1:nsub)
s2 = sample( 1:nsub)
s3 = sample( 1:nsub)
pmat1=mat1[s1,]
pmat2=mat2[s2,]
pmat3=mat3[s3,]
inmats = list( vox = pmat1[train,], vox2 = pmat2[train,], vox3 = pmat3[train,] )
resultp = simlr(
inmats,
smoothingMatrices = regs,
energyType = energyType,
initialUMatrix = nComp,
verbose = F, iterations=5, mixAlg=mixingMethod )
p1p = pmat1 %*% abs(resultp$v[[1]])
p2p = pmat2 %*% abs(resultp$v[[2]])
p3p = pmat3 %*% abs(resultp$v[[3]])
temp=data.frame( outc = outcome[,1], p1p[,nnn], p2p[,nnn], p3p[,nnn] )
mdlprm=lm( outc~.,data=temp[train,])
rsqprm = cor( temp$outc[test], predict(mdlprm,newdata=temp[test,]) )^2
# compare to RGCCA - follow the recommended SABSCOV formulation
myrgcca = rgcca( # this initializes with SVD
A = list( mat1[train,],mat2[train,],mat3[train,]),
C = 1 - diag( 3 ),
tau = rep( 1, 3 ), # for rgcca
scheme = 'centroid',
ncomp = rep( nComp, 3 ),
scale = TRUE,
verbose = FALSE )
prgcca = cbind(
mat1 %*% myrgcca$a[[1]][,nnn],
mat2 %*% myrgcca$a[[2]][,nnn],
mat3 %*% myrgcca$a[[3]][,nnn] )
temp=data.frame( outc = outcome[,1], prgcca[,1:(max(nnn)*3)] )
mdlrgcca=lm( outc~.,data=temp[train,])
rsqrgcca = cor( temp$outc[test], predict(mdlrgcca,newdata=temp[test,]) )^2
# compare to SGCCA - follow suggested glioma example in documentation
myrgcca = sgcca( # this initializes with SVD
A = list( mat1[train,],mat2[train,],mat3[train,]),
scheme = "centroid",
ncomp = rep( nComp, 3 ),
scale = TRUE,
c1 = rep( 0.5, 3 ), # use something like simlr
verbose = FALSE )
prgcca = cbind(
mat1 %*% myrgcca$a[[1]][,nnn],
mat2 %*% myrgcca$a[[2]][,nnn],
mat3 %*% myrgcca$a[[3]][,nnn] )
temp=data.frame( outc = outcome[,1], prgcca[,1:(max(nnn)*3)] )
mdlrgcca=lm( outc~.,data=temp[train,])
rsqsgcca = cor( temp$outc[test], predict(mdlrgcca,newdata=temp[test,]) )^2
simdatafrm[sim,] = c(
rsqsym,
rsqrgcca,
rsqsgcca,
rsqprm, ruinRate, nk, nsub )
print( paste("Simulation:",sim,"rsqsym",rsqsym, "rsqsgcca", rsqsgcca))
print( simdatafrm[sim,] )
cat("<<<<********>>>>\n")
}
## [1] "Simulation: 1 rsqsym 0.18650592410261 rsqsgcca 0.018726097942524"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 1 0.1865059 0.08271954 0.0187261 0.0352632 0.6097639 0.1657645 0.2102564
## nTrueEmbeddings nForSim
## 1 18 270
## <<<<********>>>>
## [1] "Simulation: 2 rsqsym 0.548101844304453 rsqsgcca 0.595573100376879"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 2 0.5481018 0.1663712 0.5955731 0.0477582 0.4274195 0.8341307 0.503782
## nTrueEmbeddings nForSim
## 2 7 248
## <<<<********>>>>
## [1] "Simulation: 3 rsqsym 0.699965654101412 rsqsgcca 0.449030498392422"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 3 0.6999657 0.3909184 0.4490305 0.01022773 0.3815088 0.8738479 0.3846142
## nTrueEmbeddings nForSim
## 3 23 243
## <<<<********>>>>
## [1] "Simulation: 4 rsqsym 0.558937246159763 rsqsgcca 0.504529295978701"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 4 0.5589372 0.2380919 0.5045293 0.02950606 0.3743984 0.2930968 0.7249775
## nTrueEmbeddings nForSim
## 4 21 337
## <<<<********>>>>
## [1] "Simulation: 5 rsqsym 0.462375652640425 rsqsgcca 0.553934741260822"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 5 0.4623757 0.4183328 0.5539347 0.0006249933 0.4553291 0.5243792 0.7343283
## nTrueEmbeddings nForSim
## 5 14 253
## <<<<********>>>>
## [1] "Simulation: 6 rsqsym 0.537340032877412 rsqsgcca 0.566153587511158"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 6 0.53734 0.5761825 0.5661536 0.000244215 0.6356254 0.5923085 0.7961964
## nTrueEmbeddings nForSim
## 6 20 342
## <<<<********>>>>
## [1] "Simulation: 7 rsqsym 0.641171254378337 rsqsgcca 0.655560290093703"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 7 0.6411713 0.5894104 0.6555603 0.002951721 0.5721252 0.4228447 0.64963
## nTrueEmbeddings nForSim
## 7 20 503
## <<<<********>>>>
## [1] "Simulation: 8 rsqsym 0.658329765336938 rsqsgcca 0.641991566398773"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 8 0.6583298 0.5973998 0.6419916 0.02191644 0.850412 0.5317252 0.3854239
## nTrueEmbeddings nForSim
## 8 16 313
## <<<<********>>>>
## [1] "Simulation: 9 rsqsym 0.651386395935548 rsqsgcca 0.709779240852967"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 9 0.6513864 0.5016047 0.7097792 0.03569298 0.2962562 0.5647676 0.3991453
## nTrueEmbeddings nForSim
## 9 6 259
## <<<<********>>>>
## [1] "Simulation: 10 rsqsym 0.755004828832078 rsqsgcca 0.647042973433406"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 10 0.7550048 0.6591293 0.647043 5.988288e-05 0.8285033 0.1398677 0.2981007
## nTrueEmbeddings nForSim
## 10 5 321
## <<<<********>>>>
## [1] "Simulation: 11 rsqsym 0.615438504545648 rsqsgcca 0.487634845631952"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 11 0.6154385 0.463435 0.4876348 0.01587947 0.2858025 0.4138801 0.465193
## nTrueEmbeddings nForSim
## 11 6 273
## <<<<********>>>>
## [1] "Simulation: 12 rsqsym 0.353549676298877 rsqsgcca 0.556552317212778"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 12 0.3535497 0.4937726 0.5565523 0.0005073276 0.6473258 0.397628 0.646168
## nTrueEmbeddings nForSim
## 12 15 202
## <<<<********>>>>
## [1] "Simulation: 13 rsqsym 0.443554344165812 rsqsgcca 0.187849234612155"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 13 0.4435543 0.08321715 0.1878492 0.001793947 0.6888443 0.1847571 0.2689542
## nTrueEmbeddings nForSim
## 13 24 364
## <<<<********>>>>
## [1] "Simulation: 14 rsqsym 0.606104237609869 rsqsgcca 0.547674808826771"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 14 0.6061042 0.4086983 0.5476748 0.01737329 0.6714665 0.8571574 0.6680247
## nTrueEmbeddings nForSim
## 14 9 267
## <<<<********>>>>
## [1] "Simulation: 15 rsqsym 0.64247301406288 rsqsgcca 0.633558410137305"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 15 0.642473 0.5900965 0.6335584 0.0007876908 0.2550545 0.8027444 0.2884029
## nTrueEmbeddings nForSim
## 15 23 341
## <<<<********>>>>
## [1] "Simulation: 16 rsqsym 0.489132191689451 rsqsgcca 0.378181848044538"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 16 0.4891322 0.300542 0.3781818 0.001238147 0.8224056 0.2788775 0.3789082
## nTrueEmbeddings nForSim
## 16 20 358
## <<<<********>>>>
## [1] "Simulation: 17 rsqsym 0.486050201380128 rsqsgcca 0.325216816997708"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 17 0.4860502 0.2446114 0.3252168 0.01406967 0.3827463 0.1016975 0.498994
## nTrueEmbeddings nForSim
## 17 16 239
## <<<<********>>>>
## [1] "Simulation: 18 rsqsym 0.473850465257363 rsqsgcca 0.487545156122575"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 18 0.4738505 0.4760749 0.4875452 0.04221235 0.5939755 0.8541631 0.8179487
## nTrueEmbeddings nForSim
## 18 21 394
## <<<<********>>>>
## [1] "Simulation: 19 rsqsym 0.634898042666787 rsqsgcca 0.610320351851101"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 19 0.634898 0.5842467 0.6103204 0.2091458 0.5315619 0.8480022 0.8151635
## nTrueEmbeddings nForSim
## 19 15 225
## <<<<********>>>>
## [1] "Simulation: 20 rsqsym 0.625397341392009 rsqsgcca 0.631717335166447"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 20 0.6253973 0.5748232 0.6317173 0.01856109 0.894567 0.3830734 0.7762652
## nTrueEmbeddings nForSim
## 20 20 413
## <<<<********>>>>
## [1] "Simulation: 21 rsqsym 0.463515513978206 rsqsgcca 0.424489898976203"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 21 0.4635155 0.4008263 0.4244899 0.0003476155 0.5307914 0.6875179 0.4006813
## nTrueEmbeddings nForSim
## 21 12 383
## <<<<********>>>>
## [1] "Simulation: 22 rsqsym 0.571914828566403 rsqsgcca 0.494342717311942"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 22 0.5719148 0.5103097 0.4943427 0.1243679 0.8267991 0.8716003 0.1569747
## nTrueEmbeddings nForSim
## 22 21 279
## <<<<********>>>>
## [1] "Simulation: 23 rsqsym 0.388713181659241 rsqsgcca 0.393342607460417"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 23 0.3887132 0.4023419 0.3933426 0.007292697 0.1604842 0.6603718 0.6257906
## nTrueEmbeddings nForSim
## 23 18 335
## <<<<********>>>>
## [1] "Simulation: 24 rsqsym 0.566071628600214 rsqsgcca 0.540257822588242"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 24 0.5660716 0.5114599 0.5402578 0.05906201 0.1296695 0.1695853 0.1227204
## nTrueEmbeddings nForSim
## 24 25 276
## <<<<********>>>>
## [1] "Simulation: 25 rsqsym 0.573974513830053 rsqsgcca 0.380594555044674"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 25 0.5739745 0.2873388 0.3805946 9.205907e-06 0.8768807 0.6860525 0.1169671
## nTrueEmbeddings nForSim
## 25 6 303
## <<<<********>>>>
## [1] "Simulation: 26 rsqsym 0.626712412221635 rsqsgcca 0.192686681356382"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 26 0.6267124 0.2956608 0.1926867 0.01638005 0.6882603 0.6693866 0.2517785
## nTrueEmbeddings nForSim
## 26 19 150
## <<<<********>>>>
## [1] "Simulation: 27 rsqsym 0.504144409127359 rsqsgcca 0.446730557125625"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 27 0.5041444 0.3633363 0.4467306 0.01373914 0.6904371 0.3571471 0.5333443
## nTrueEmbeddings nForSim
## 27 19 473
## <<<<********>>>>
## [1] "Simulation: 28 rsqsym 0.711332847734013 rsqsgcca 0.694456226136815"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 28 0.7113328 0.6131814 0.6944562 0.03455445 0.620296 0.8436519 0.458144
## nTrueEmbeddings nForSim
## 28 6 168
## <<<<********>>>>
## [1] "Simulation: 29 rsqsym 0.641063194092556 rsqsgcca 0.687258593145159"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 29 0.6410632 0.5377198 0.6872586 0.02748813 0.5194642 0.8266058 0.6277783
## nTrueEmbeddings nForSim
## 29 11 217
## <<<<********>>>>
## [1] "Simulation: 30 rsqsym 0.598835308741512 rsqsgcca 0.361962147639716"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 30 0.5988353 0.2458016 0.3619621 0.02962481 0.3032608 0.7383811 0.5852181
## nTrueEmbeddings nForSim
## 30 20 217
## <<<<********>>>>
## [1] "Simulation: 31 rsqsym 0.447711082740758 rsqsgcca 0.526921066150372"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 31 0.4477111 0.4618586 0.5269211 0.0006909942 0.7282429 0.2031838 0.4044328
## nTrueEmbeddings nForSim
## 31 18 324
## <<<<********>>>>
## [1] "Simulation: 32 rsqsym 0.565644765070838 rsqsgcca 0.524980373796632"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 32 0.5656448 0.3883998 0.5249804 0.002252317 0.3501221 0.5624648 0.4493418
## nTrueEmbeddings nForSim
## 32 8 321
## <<<<********>>>>
## [1] "Simulation: 33 rsqsym 0.211029361346842 rsqsgcca 0.268563043104229"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 33 0.2110294 0.08773133 0.268563 0.005705694 0.436592 0.1385706 0.3680125
## nTrueEmbeddings nForSim
## 33 22 309
## <<<<********>>>>
## [1] "Simulation: 34 rsqsym 0.316890789587054 rsqsgcca 0.392154570116717"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 34 0.3168908 0.2082791 0.3921546 0.001416089 0.1544002 0.8155863 0.2192953
## nTrueEmbeddings nForSim
## 34 15 309
## <<<<********>>>>
## Warning in sgccak(R, C, c1 = c1, scheme = scheme, init = init, bias = bias, :
## The SGCCA algorithm did not converge after 1000 iterations.
## [1] "Simulation: 35 rsqsym 0.70119042369903 rsqsgcca 0.692674333583416"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 35 0.7011904 0.4506672 0.6926743 2.524593e-05 0.5851936 0.3427513 0.5000881
## nTrueEmbeddings nForSim
## 35 7 405
## <<<<********>>>>
## [1] "Simulation: 36 rsqsym 0.631936985939388 rsqsgcca 0.349633394596894"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 36 0.631937 0.405382 0.3496334 0.02434257 0.2522588 0.7206225 0.8813692
## nTrueEmbeddings nForSim
## 36 24 345
## <<<<********>>>>
## [1] "Simulation: 37 rsqsym 0.573262498018514 rsqsgcca 0.34229890230554"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 37 0.5732625 0.1316114 0.3422989 0.02825598 0.4398332 0.4602104 0.250888
## nTrueEmbeddings nForSim
## 37 7 330
## <<<<********>>>>
## [1] "Simulation: 38 rsqsym 0.00906170691072277 rsqsgcca 0.118994380725365"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 38 0.009061707 0.01403716 0.1189944 7.197528e-06 0.1679595 0.7741895 0.2491769
## nTrueEmbeddings nForSim
## 38 25 300
## <<<<********>>>>
## [1] "Simulation: 39 rsqsym 0.514444024015586 rsqsgcca 0.454043440551608"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 39 0.514444 0.337834 0.4540434 0.005266681 0.2791145 0.640759 0.8329312
## nTrueEmbeddings nForSim
## 39 25 305
## <<<<********>>>>
## [1] "Simulation: 40 rsqsym 0.462892857718415 rsqsgcca 0.36697276127582"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 40 0.4628929 0.2389479 0.3669728 0.005307226 0.1590437 0.833552 0.4547524
## nTrueEmbeddings nForSim
## 40 24 358
## <<<<********>>>>
## [1] "Simulation: 41 rsqsym 0.571326663972587 rsqsgcca 0.503186954954368"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 41 0.5713267 0.3828291 0.503187 3.349381e-06 0.4847883 0.291713 0.8222376
## nTrueEmbeddings nForSim
## 41 20 256
## <<<<********>>>>
## [1] "Simulation: 42 rsqsym 0.570136962577478 rsqsgcca 0.511858027221582"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 42 0.570137 0.3585077 0.511858 0.00957511 0.3012763 0.627033 0.3951814
## nTrueEmbeddings nForSim
## 42 20 430
## <<<<********>>>>
## [1] "Simulation: 43 rsqsym 0.666945154218736 rsqsgcca 0.574131284356983"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 43 0.6669452 0.5780918 0.5741313 0.01372637 0.7214112 0.8823007 0.3360352
## nTrueEmbeddings nForSim
## 43 17 317
## <<<<********>>>>
## [1] "Simulation: 44 rsqsym 0.637165911874456 rsqsgcca 0.584978389409612"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 44 0.6371659 0.4620259 0.5849784 3.709743e-07 0.6155342 0.8495107 0.1289159
## nTrueEmbeddings nForSim
## 44 9 372
## <<<<********>>>>
## [1] "Simulation: 45 rsqsym 0.666536066645323 rsqsgcca 0.588719287021426"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 45 0.6665361 0.5227885 0.5887193 1.501122e-05 0.1410228 0.289673 0.356922
## nTrueEmbeddings nForSim
## 45 12 347
## <<<<********>>>>
## [1] "Simulation: 46 rsqsym 0.394572200684154 rsqsgcca 0.422803589835628"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 46 0.3945722 0.2128069 0.4228036 6.917485e-05 0.3769051 0.5152114 0.2799855
## nTrueEmbeddings nForSim
## 46 19 248
## <<<<********>>>>
## [1] "Simulation: 47 rsqsym 0.441817251505314 rsqsgcca 0.517948539126346"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 47 0.4418173 0.5015011 0.5179485 0.01660657 0.8738161 0.1229469 0.30533
## nTrueEmbeddings nForSim
## 47 12 480
## <<<<********>>>>
## [1] "Simulation: 48 rsqsym 0.526283956221765 rsqsgcca 0.562433880394532"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 48 0.526284 0.5915697 0.5624339 0.005238296 0.471881 0.522434 0.8014456
## nTrueEmbeddings nForSim
## 48 19 336
## <<<<********>>>>
## [1] "Simulation: 49 rsqsym 0.687074402532415 rsqsgcca 0.704244400642284"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 49 0.6870744 0.6370647 0.7042444 0.02327206 0.6656333 0.6198922 0.866629
## nTrueEmbeddings nForSim
## 49 13 293
## <<<<********>>>>
## [1] "Simulation: 50 rsqsym 0.630613607380674 rsqsgcca 0.56595396091291"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 50 0.6306136 0.3452818 0.565954 0.02472686 0.4344102 0.6799204 0.4099741
## nTrueEmbeddings nForSim
## 50 16 364
## <<<<********>>>>
## [1] "Simulation: 51 rsqsym 0.540755852190647 rsqsgcca 0.475377230043224"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 51 0.5407559 0.3566666 0.4753772 0.01870375 0.3476936 0.8587498 0.486094
## nTrueEmbeddings nForSim
## 51 18 381
## <<<<********>>>>
## [1] "Simulation: 52 rsqsym 0.428706758219317 rsqsgcca 0.136185908409598"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 52 0.4287068 0.06545324 0.1361859 0.00410038 0.1569439 0.2231528 0.1094279
## nTrueEmbeddings nForSim
## 52 18 241
## <<<<********>>>>
## [1] "Simulation: 53 rsqsym 0.329524868567903 rsqsgcca 0.36556762450566"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 53 0.3295249 0.3179103 0.3655676 0.01367187 0.4425242 0.1883126 0.5680132
## nTrueEmbeddings nForSim
## 53 17 336
## <<<<********>>>>
## [1] "Simulation: 54 rsqsym 0.505095115683305 rsqsgcca 0.312845185739914"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 54 0.5050951 0.07820099 0.3128452 0.02709467 0.8272887 0.4393381 0.2237687
## nTrueEmbeddings nForSim
## 54 15 471
## <<<<********>>>>
## [1] "Simulation: 55 rsqsym 0.272236273145497 rsqsgcca 0.338546044894568"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 55 0.2722363 0.1876889 0.338546 0.004601637 0.2681519 0.3353227 0.4164188
## nTrueEmbeddings nForSim
## 55 12 330
## <<<<********>>>>
## [1] "Simulation: 56 rsqsym 0.523626505541274 rsqsgcca 0.561318650609173"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 56 0.5236265 0.5374709 0.5613187 0.01229873 0.2937456 0.8149369 0.8739436
## nTrueEmbeddings nForSim
## 56 12 301
## <<<<********>>>>
## [1] "Simulation: 57 rsqsym 0.603875029831969 rsqsgcca 0.540933641683108"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 57 0.603875 0.4067728 0.5409336 0.0001036901 0.1002266 0.4612999 0.2636267
## nTrueEmbeddings nForSim
## 57 7 264
## <<<<********>>>>
## [1] "Simulation: 58 rsqsym 0.548003903046213 rsqsgcca 0.433578117219692"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 58 0.5480039 0.3645029 0.4335781 0.006022662 0.7507904 0.3868264 0.6326859
## nTrueEmbeddings nForSim
## 58 17 284
## <<<<********>>>>
## [1] "Simulation: 59 rsqsym 0.41685733918851 rsqsgcca 0.45002137921813"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 59 0.4168573 0.2612097 0.4500214 0.001514491 0.5269512 0.8585265 0.2362692
## nTrueEmbeddings nForSim
## 59 5 171
## <<<<********>>>>
## [1] "Simulation: 60 rsqsym 0.127908731392253 rsqsgcca 0.154954811568022"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 60 0.1279087 0.06798344 0.1549548 0.002449438 0.1368409 0.4308373 0.1536706
## nTrueEmbeddings nForSim
## 60 5 378
## <<<<********>>>>
## [1] "Simulation: 61 rsqsym 0.430216436182918 rsqsgcca 0.478090567151587"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 61 0.4302164 0.3877688 0.4780906 0.0006514445 0.7889965 0.2945368 0.5370012
## nTrueEmbeddings nForSim
## 61 20 290
## <<<<********>>>>
## [1] "Simulation: 62 rsqsym 0.436523456358494 rsqsgcca 0.10709024086297"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 62 0.4365235 5.971027e-05 0.1070902 0.01085078 0.2928243 0.8788607 0.1882851
## nTrueEmbeddings nForSim
## 62 13 384
## <<<<********>>>>
## [1] "Simulation: 63 rsqsym 0.652043012110661 rsqsgcca 0.72597409027156"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 63 0.652043 0.631906 0.7259741 0.04972682 0.7306326 0.4942561 0.4960944
## nTrueEmbeddings nForSim
## 63 21 426
## <<<<********>>>>
## [1] "Simulation: 64 rsqsym 0.265977875429303 rsqsgcca 0.0510543583554501"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 64 0.2659779 0.1212347 0.05105436 0.02305243 0.3259776 0.2503945 0.4200655
## nTrueEmbeddings nForSim
## 64 21 183
## <<<<********>>>>
## [1] "Simulation: 65 rsqsym 0.284183266032576 rsqsgcca 0.391080548520454"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 65 0.2841833 0.1598126 0.3910805 0.01553513 0.8581586 0.3279982 0.4257686
## nTrueEmbeddings nForSim
## 65 16 224
## <<<<********>>>>
## [1] "Simulation: 66 rsqsym 0.48122254186005 rsqsgcca 0.400317684596816"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 66 0.4812225 0.2112562 0.4003177 5.795597e-05 0.4530189 0.640667 0.4527265
## nTrueEmbeddings nForSim
## 66 17 506
## <<<<********>>>>
## [1] "Simulation: 67 rsqsym 0.589894417228813 rsqsgcca 0.543582395303469"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 67 0.5898944 0.3941403 0.5435824 0.0006094737 0.1862677 0.5875123 0.4180602
## nTrueEmbeddings nForSim
## 67 24 418
## <<<<********>>>>
## [1] "Simulation: 68 rsqsym 0.515635819216045 rsqsgcca 0.393353301220279"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 68 0.5156358 0.4409409 0.3933533 0.004351431 0.4696518 0.2779817 0.2467748
## nTrueEmbeddings nForSim
## 68 19 435
## <<<<********>>>>
## [1] "Simulation: 69 rsqsym 0.525272868869474 rsqsgcca 0.428005383535426"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 69 0.5252729 0.3811938 0.4280054 0.02902595 0.1099845 0.5348248 0.5275168
## nTrueEmbeddings nForSim
## 69 8 326
## <<<<********>>>>
## [1] "Simulation: 70 rsqsym 0.449380122540692 rsqsgcca 0.52241607460703"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 70 0.4493801 0.2601868 0.5224161 0.04176881 0.6776801 0.647109 0.8815156
## nTrueEmbeddings nForSim
## 70 17 197
## <<<<********>>>>
## [1] "Simulation: 71 rsqsym 0.751460577318614 rsqsgcca 0.682346119437703"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 71 0.7514606 0.6673374 0.6823461 0.001494138 0.3003894 0.2379569 0.2127435
## nTrueEmbeddings nForSim
## 71 25 285
## <<<<********>>>>
## [1] "Simulation: 72 rsqsym 0.420593670741581 rsqsgcca 0.330786782282328"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 72 0.4205937 0.0443791 0.3307868 2.147247e-05 0.3011837 0.4871177 0.6970519
## nTrueEmbeddings nForSim
## 72 15 430
## <<<<********>>>>
## [1] "Simulation: 73 rsqsym 0.568968260501818 rsqsgcca 0.534509309466627"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 73 0.5689683 0.2497581 0.5345093 0.04018488 0.8569064 0.3947365 0.4396441
## nTrueEmbeddings nForSim
## 73 8 308
## <<<<********>>>>
## [1] "Simulation: 74 rsqsym 0.440605212989653 rsqsgcca 0.384064993077656"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 74 0.4406052 0.2561163 0.384065 0.003905675 0.6702812 0.2161957 0.5101028
## nTrueEmbeddings nForSim
## 74 20 363
## <<<<********>>>>
## [1] "Simulation: 75 rsqsym 0.548018947282819 rsqsgcca 0.512149963257713"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 75 0.5480189 0.4724307 0.51215 0.0004077945 0.7490435 0.7985777 0.1631237
## nTrueEmbeddings nForSim
## 75 19 257
## <<<<********>>>>
## [1] "Simulation: 76 rsqsym 0.488930542207569 rsqsgcca 0.581772650422497"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 76 0.4889305 0.3706199 0.5817727 0.000514846 0.6437605 0.4883076 0.4903955
## nTrueEmbeddings nForSim
## 76 18 345
## <<<<********>>>>
## [1] "Simulation: 77 rsqsym 0.345237484528801 rsqsgcca 0.0886396795793668"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 77 0.3452375 0.04884299 0.08863968 0.04472543 0.4233497 0.5933021 0.1258496
## nTrueEmbeddings nForSim
## 77 8 276
## <<<<********>>>>
## [1] "Simulation: 78 rsqsym 0.281248779694394 rsqsgcca 0.240153541495727"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 78 0.2812488 0.1660221 0.2401535 0.0002665413 0.1547818 0.1775583 0.4993309
## nTrueEmbeddings nForSim
## 78 13 377
## <<<<********>>>>
## [1] "Simulation: 79 rsqsym 0.441816788006818 rsqsgcca 0.531540284135714"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 79 0.4418168 0.3364088 0.5315403 0.06187197 0.5654484 0.5645001 0.7428239
## nTrueEmbeddings nForSim
## 79 12 409
## <<<<********>>>>
## [1] "Simulation: 80 rsqsym 0.486100163228073 rsqsgcca 0.259295257499687"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 80 0.4861002 0.0290133 0.2592953 0.05154197 0.4462618 0.7851674 0.2694984
## nTrueEmbeddings nForSim
## 80 15 308
## <<<<********>>>>
## [1] "Simulation: 81 rsqsym 0.676156732786269 rsqsgcca 0.6270887366707"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 81 0.6761567 0.5587883 0.6270887 0.000141347 0.2400547 0.3223464 0.2583558
## nTrueEmbeddings nForSim
## 81 14 237
## <<<<********>>>>
## [1] "Simulation: 82 rsqsym 0.439267242543777 rsqsgcca 0.281301104245019"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 82 0.4392672 0.2911373 0.2813011 0.003818125 0.2712748 0.7504076 0.3170967
## nTrueEmbeddings nForSim
## 82 13 222
## <<<<********>>>>
## [1] "Simulation: 83 rsqsym 0.32196553996059 rsqsgcca 0.27749133701365"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 83 0.3219655 0.2636826 0.2774913 0.1103494 0.6055685 0.6917729 0.7518633
## nTrueEmbeddings nForSim
## 83 21 130
## <<<<********>>>>
## Warning in sgccak(R, C, c1 = c1, scheme = scheme, init = init, bias = bias, :
## The SGCCA algorithm did not converge after 1000 iterations.
## [1] "Simulation: 84 rsqsym 0.594096831725874 rsqsgcca 0.562166202930219"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 84 0.5940968 0.5869723 0.5621662 0.01260076 0.5766139 0.5075706 0.1269817
## nTrueEmbeddings nForSim
## 84 14 378
## <<<<********>>>>
## Warning in sgccak(R, C, c1 = c1, scheme = scheme, init = init, bias = bias, :
## The SGCCA algorithm did not converge after 1000 iterations.
## [1] "Simulation: 85 rsqsym 0.535296541174134 rsqsgcca 0.441601070309138"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 85 0.5352965 0.2444986 0.4416011 0.009556001 0.609813 0.1514781 0.6292061
## nTrueEmbeddings nForSim
## 85 12 319
## <<<<********>>>>
## [1] "Simulation: 86 rsqsym 0.613148933954554 rsqsgcca 0.503980519434783"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 86 0.6131489 0.4446583 0.5039805 0.0002394923 0.3358441 0.3240853 0.8426786
## nTrueEmbeddings nForSim
## 86 24 377
## <<<<********>>>>
## [1] "Simulation: 87 rsqsym 0.286569539593855 rsqsgcca 0.237756026328088"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 87 0.2865695 0.1965243 0.237756 0.003967913 0.4697052 0.4237337 0.2751579
## nTrueEmbeddings nForSim
## 87 17 149
## <<<<********>>>>
## [1] "Simulation: 88 rsqsym 0.698355373632849 rsqsgcca 0.719837366483992"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 88 0.6983554 0.7052217 0.7198374 0.01799289 0.1529857 0.2631594 0.2922959
## nTrueEmbeddings nForSim
## 88 9 302
## <<<<********>>>>
## [1] "Simulation: 89 rsqsym 0.751648442206747 rsqsgcca 0.723562265811417"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 89 0.7516484 0.2954773 0.7235623 0.06427434 0.6562259 0.1322438 0.6857676
## nTrueEmbeddings nForSim
## 89 7 204
## <<<<********>>>>
## [1] "Simulation: 90 rsqsym 0.681982904647069 rsqsgcca 0.592271123229641"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 90 0.6819829 0.4240334 0.5922711 0.0002590643 0.6310118 0.6484033 0.6847723
## nTrueEmbeddings nForSim
## 90 15 326
## <<<<********>>>>
## [1] "Simulation: 91 rsqsym 0.518038047095242 rsqsgcca 0.47162886101363"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 91 0.518038 0.3279079 0.4716289 0.01592011 0.1137693 0.8786272 0.5353798
## nTrueEmbeddings nForSim
## 91 22 324
## <<<<********>>>>
## [1] "Simulation: 92 rsqsym 0.419129137979026 rsqsgcca 0.476281754919686"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 92 0.4191291 0.06712833 0.4762818 0.009676218 0.5576644 0.3941734 0.5302135
## nTrueEmbeddings nForSim
## 92 25 202
## <<<<********>>>>
## [1] "Simulation: 93 rsqsym 0.379191812981858 rsqsgcca 0.433679248222673"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 93 0.3791918 0.2630624 0.4336792 0.04132646 0.3560441 0.226927 0.5352436
## nTrueEmbeddings nForSim
## 93 13 294
## <<<<********>>>>
## [1] "Simulation: 94 rsqsym 0.689882958622961 rsqsgcca 0.668982247356921"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 94 0.689883 0.5782863 0.6689822 0.008332964 0.5291184 0.7492544 0.5367249
## nTrueEmbeddings nForSim
## 94 17 412
## <<<<********>>>>
## [1] "Simulation: 95 rsqsym 0.470871341407487 rsqsgcca 0.436839440780205"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 95 0.4708713 0.2711107 0.4368394 0.009771778 0.1295026 0.7203477 0.4332235
## nTrueEmbeddings nForSim
## 95 10 238
## <<<<********>>>>
## [1] "Simulation: 96 rsqsym 0.440560168465133 rsqsgcca 0.398062109699398"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 96 0.4405602 0.2148298 0.3980621 0.006028458 0.3888925 0.2550032 0.2558169
## nTrueEmbeddings nForSim
## 96 11 326
## <<<<********>>>>
## [1] "Simulation: 97 rsqsym 0.206168551824871 rsqsgcca 0.301835992177041"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 97 0.2061686 0.2737499 0.301836 0.05706912 0.2608804 0.2873599 0.7119718
## nTrueEmbeddings nForSim
## 97 13 181
## <<<<********>>>>
## [1] "Simulation: 98 rsqsym 0.568045398993985 rsqsgcca 0.566754553822022"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 98 0.5680454 0.4599721 0.5667546 1.78945e-05 0.4428944 0.2541065 0.3347575
## nTrueEmbeddings nForSim
## 98 10 313
## <<<<********>>>>
## [1] "Simulation: 99 rsqsym 0.64082333731191 rsqsgcca 0.494021558546621"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 99 0.6408233 0.5275812 0.4940216 0.04381442 0.5520611 0.6440624 0.1254326
## nTrueEmbeddings nForSim
## 99 10 337
## <<<<********>>>>
## [1] "Simulation: 100 rsqsym 0.650058013171172 rsqsgcca 0.393888924231565"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 100 0.650058 0.2019161 0.3938889 0.01442828 0.5527685 0.856266 0.3965549
## nTrueEmbeddings nForSim
## 100 23 280
## <<<<********>>>>
## [1] "Simulation: 101 rsqsym 0.659625213120883 rsqsgcca 0.548861671617379"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 101 0.6596252 0.4970487 0.5488617 0.01586295 0.4105611 0.8063324 0.6630487
## nTrueEmbeddings nForSim
## 101 25 294
## <<<<********>>>>
## [1] "Simulation: 102 rsqsym 0.619654408124025 rsqsgcca 0.639175816961478"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 102 0.6196544 0.6054637 0.6391758 0.0002809128 0.8525122 0.6505218 0.8316572
## nTrueEmbeddings nForSim
## 102 15 334
## <<<<********>>>>
## [1] "Simulation: 103 rsqsym 0.542912119426037 rsqsgcca 0.554842218037964"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 103 0.5429121 0.425402 0.5548422 1.338868e-05 0.5954883 0.6062012 0.8316034
## nTrueEmbeddings nForSim
## 103 20 257
## <<<<********>>>>
## [1] "Simulation: 104 rsqsym 0.367698201110156 rsqsgcca 0.395347060438571"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 104 0.3676982 0.2594474 0.3953471 0.03458467 0.4997567 0.4452579 0.4073715
## nTrueEmbeddings nForSim
## 104 24 292
## <<<<********>>>>
## [1] "Simulation: 105 rsqsym 0.533062346171424 rsqsgcca 0.501156946708329"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 105 0.5330623 0.2121226 0.5011569 0.001516936 0.5225104 0.3544439 0.8036832
## nTrueEmbeddings nForSim
## 105 14 217
## <<<<********>>>>
## [1] "Simulation: 106 rsqsym 0.401673049792979 rsqsgcca 0.454916790089812"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 106 0.401673 0.213753 0.4549168 0.02370166 0.822649 0.43779 0.8917009
## nTrueEmbeddings nForSim
## 106 21 245
## <<<<********>>>>
## [1] "Simulation: 107 rsqsym 0.664543253687994 rsqsgcca 0.613984947392843"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 107 0.6645433 0.3700447 0.6139849 0.01443427 0.2662422 0.85 0.6465484
## nTrueEmbeddings nForSim
## 107 7 321
## <<<<********>>>>
## [1] "Simulation: 108 rsqsym 0.600432059307246 rsqsgcca 0.725311962828203"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 108 0.6004321 0.6252097 0.725312 0.0455698 0.5178112 0.7085239 0.686261
## nTrueEmbeddings nForSim
## 108 22 311
## <<<<********>>>>
## [1] "Simulation: 109 rsqsym 0.0628200538147044 rsqsgcca 0.135051397560783"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 109 0.06282005 0.01966475 0.1350514 0.06303668 0.4445034 0.7832479 0.6515661
## nTrueEmbeddings nForSim
## 109 19 163
## <<<<********>>>>
## [1] "Simulation: 110 rsqsym 0.376688321999985 rsqsgcca 0.288982317370882"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 110 0.3766883 0.1305512 0.2889823 0.01388611 0.635658 0.5320764 0.4454202
## nTrueEmbeddings nForSim
## 110 24 343
## <<<<********>>>>
## [1] "Simulation: 111 rsqsym 0.483256975758758 rsqsgcca 0.378644405525776"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 111 0.483257 0.2684032 0.3786444 0.0312943 0.284206 0.150226 0.5085848
## nTrueEmbeddings nForSim
## 111 15 339
## <<<<********>>>>
## [1] "Simulation: 112 rsqsym 0.647571240038148 rsqsgcca 0.626592559497463"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 112 0.6475712 0.5214905 0.6265926 0.0357538 0.5591724 0.6889736 0.6090539
## nTrueEmbeddings nForSim
## 112 22 295
## <<<<********>>>>
## [1] "Simulation: 113 rsqsym 0.49712696205121 rsqsgcca 0.494927911559694"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 113 0.497127 0.3148347 0.4949279 0.008729177 0.1964909 0.5260146 0.4824141
## nTrueEmbeddings nForSim
## 113 15 331
## <<<<********>>>>
## [1] "Simulation: 114 rsqsym 0.438520092881572 rsqsgcca 0.315416751242309"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 114 0.4385201 0.2541153 0.3154168 0.008443574 0.5806778 0.2772731 0.357151
## nTrueEmbeddings nForSim
## 114 21 333
## <<<<********>>>>
## [1] "Simulation: 115 rsqsym 0.168320365732064 rsqsgcca 0.127296733404578"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 115 0.1683204 0.1861737 0.1272967 0.02164816 0.1475666 0.488095 0.5905698
## nTrueEmbeddings nForSim
## 115 7 371
## <<<<********>>>>
## Warning in sgccak(R, C, c1 = c1, scheme = scheme, init = init, bias = bias, :
## The SGCCA algorithm did not converge after 1000 iterations.
## [1] "Simulation: 116 rsqsym 0.619636023819991 rsqsgcca 0.561956930511183"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 116 0.619636 0.5634997 0.5619569 0.003205946 0.6726812 0.6481071 0.2589203
## nTrueEmbeddings nForSim
## 116 16 372
## <<<<********>>>>
## [1] "Simulation: 117 rsqsym 0.479862580851534 rsqsgcca 0.509535722094019"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 117 0.4798626 0.5094449 0.5095357 0.003180178 0.1696539 0.5466123 0.5343067
## nTrueEmbeddings nForSim
## 117 20 366
## <<<<********>>>>
## [1] "Simulation: 118 rsqsym 0.135024085581368 rsqsgcca 0.0132858716526127"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 118 0.1350241 0.01691603 0.01328587 0.03990654 0.3567169 0.2287202 0.388297
## nTrueEmbeddings nForSim
## 118 8 186
## <<<<********>>>>
## [1] "Simulation: 119 rsqsym 0.439676525287332 rsqsgcca 0.155943686123964"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 119 0.4396765 0.05070594 0.1559437 0.000433593 0.2709615 0.2207935 0.3327085
## nTrueEmbeddings nForSim
## 119 25 149
## <<<<********>>>>
## [1] "Simulation: 120 rsqsym 0.562243028652158 rsqsgcca 0.596779951451762"
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1 corrupt2 corrupt3
## 120 0.562243 0.3613531 0.59678 0.001718461 0.452771 0.7688931 0.8894699
## nTrueEmbeddings nForSim
## 120 14 298
## <<<<********>>>>
The r-squared value is most informative as it tells us how well the omnibus model predicts the known latent signal.
Compare SiMLR R\(^2\) vs. rgcca R\(^2\) with paired t-test.
print(t.test(simdatafrm[,"symRSQ"],simdatafrm[,"rgccaRSQ"],paired=T))
##
## Paired t-test
##
## data: simdatafrm[, "symRSQ"] and simdatafrm[, "rgccaRSQ"]
## t = 13.27, df = 119, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 0.1327483 0.1793111
## sample estimates:
## mean of the differences
## 0.1560297
Compare SiMLR R\(^2\) vs. sgcca R\(^2\) with paired t-test.
print(t.test(simdatafrm[,"symRSQ"],simdatafrm[,"sgccaRSQ"],paired=T))
##
## Paired t-test
##
## data: simdatafrm[, "symRSQ"] and simdatafrm[, "sgccaRSQ"]
## t = 5.0594, df = 119, p-value = 1.546e-06
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 0.03014308 0.06890896
## sample estimates:
## mean of the differences
## 0.04952602
Compare SiMLR R\(^2\) vs. permuted SiMLR R\(^2\) with paired t-test.
print(t.test(simdatafrm[,"symRSQ"],simdatafrm[,"prmRSQ"],paired=T))
##
## Paired t-test
##
## data: simdatafrm[, "symRSQ"] and simdatafrm[, "prmRSQ"]
## t = 34.7, df = 119, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 0.4578808 0.5132993
## sample estimates:
## mean of the differences
## 0.4855901
Compare rgcca R\(^2\) vs. permuted SiMLR R\(^2\) with paired t-test.
print(t.test(simdatafrm[,"sgccaRSQ"],simdatafrm[,"prmRSQ"],paired=T))
##
## Paired t-test
##
## data: simdatafrm[, "sgccaRSQ"] and simdatafrm[, "prmRSQ"]
## t = 28.162, df = 119, p-value < 2.2e-16
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## 0.4054036 0.4667245
## sample estimates:
## mean of the differences
## 0.4360641
mean performance
print( colMeans( simdatafrm ) )
## symRSQ rgccaRSQ sgccaRSQ prmRSQ corrupt1
## 0.5043659 0.3483362 0.4548399 0.0187758 0.4728160
## corrupt2 corrupt3 nTrueEmbeddings nForSim
## 0.5195153 0.4806745 15.9750000 308.2250000
Visualize overall results
simdatafrm = na.omit( simdatafrm )
myline = 1:nrow( simdatafrm )
plot( myline/max(myline), myline/max(myline), type='l', lty=5, main='Signal recovery comparison (r-squared): \n SiMLR vs RGCCA (blue triangle) and SGCCA (red x)', xlab='R-squared RGCCA and SGCCA', ylab='R-squared SiMLR' )
points( simdatafrm[,"rgccaRSQ"], simdatafrm[,"symRSQ"], col='blue', ylab='Rsq - SiMLR', xlab='Rsq - RGCCA', pch=2 )
points( simdatafrm[,"sgccaRSQ"], simdatafrm[,"symRSQ"], col='red', ylab='Rsq - SiMLR', xlab='Rsq - SGCCA', pch=4 )
Look at the effect of the corruption on the outcomes.
summary( lm( symRSQ ~ corrupt1 + corrupt2 + corrupt3 , data=simdatafrm))
##
## Call:
## lm(formula = symRSQ ~ corrupt1 + corrupt2 + corrupt3, data = simdatafrm)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.47992 -0.07267 0.01147 0.09076 0.32025
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.34756 0.05038 6.899 2.94e-10 ***
## corrupt1 0.14418 0.06161 2.340 0.0210 *
## corrupt2 0.13842 0.05711 2.424 0.0169 *
## corrupt3 0.03480 0.06192 0.562 0.5752
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1454 on 116 degrees of freedom
## Multiple R-squared: 0.09205, Adjusted R-squared: 0.06857
## F-statistic: 3.92 on 3 and 116 DF, p-value: 0.01045
summary( lm( rgccaRSQ ~ corrupt1 + corrupt2 + corrupt3 , data=simdatafrm))
##
## Call:
## lm(formula = rgccaRSQ ~ corrupt1 + corrupt2 + corrupt3, data = simdatafrm)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.37581 -0.10611 -0.00673 0.13422 0.45979
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.15431 0.05979 2.581 0.0111 *
## corrupt1 0.15602 0.07313 2.134 0.0350 *
## corrupt2 0.11140 0.06778 1.644 0.1030
## corrupt3 0.12979 0.07349 1.766 0.0800 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1726 on 116 degrees of freedom
## Multiple R-squared: 0.09001, Adjusted R-squared: 0.06648
## F-statistic: 3.825 on 3 and 116 DF, p-value: 0.01179
summary( lm( sgccaRSQ ~ corrupt1 + corrupt2 + corrupt3 , data=simdatafrm))
##
## Call:
## lm(formula = sgccaRSQ ~ corrupt1 + corrupt2 + corrupt3, data = simdatafrm)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.37958 -0.08963 0.01138 0.09209 0.38645
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.21803 0.05398 4.039 9.68e-05 ***
## corrupt1 0.16918 0.06602 2.562 0.01168 *
## corrupt2 0.11166 0.06120 1.825 0.07062 .
## corrupt3 0.20556 0.06635 3.098 0.00244 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1558 on 116 degrees of freedom
## Multiple R-squared: 0.1594, Adjusted R-squared: 0.1376
## F-statistic: 7.331 on 3 and 116 DF, p-value: 0.0001525
Look at the effect of the number of subjects for the simulation on the outcomes.
summary( lm( symRSQ ~ nForSim, data=simdatafrm))
##
## Call:
## lm(formula = symRSQ ~ nForSim, data = simdatafrm)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.49262 -0.07969 0.01397 0.10989 0.28134
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.4036592 0.0554567 7.279 4.06e-11 ***
## nForSim 0.0003267 0.0001744 1.873 0.0635 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1491 on 118 degrees of freedom
## Multiple R-squared: 0.02888, Adjusted R-squared: 0.02065
## F-statistic: 3.509 on 1 and 118 DF, p-value: 0.06351
summary( lm( rgccaRSQ ~ nForSim, data=simdatafrm))
##
## Call:
## lm(formula = rgccaRSQ ~ nForSim, data = simdatafrm)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.38101 -0.11110 -0.00464 0.14838 0.35957
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.215177 0.065505 3.285 0.00134 **
## nForSim 0.000432 0.000206 2.097 0.03814 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1761 on 118 degrees of freedom
## Multiple R-squared: 0.03592, Adjusted R-squared: 0.02775
## F-statistic: 4.397 on 1 and 118 DF, p-value: 0.03814
summary( lm( sgccaRSQ ~ nForSim, data=simdatafrm))
##
## Call:
## lm(formula = sgccaRSQ ~ nForSim, data = simdatafrm)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.42140 -0.10325 0.02626 0.11098 0.30883
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.3362184 0.0616501 5.454 2.75e-07 ***
## nForSim 0.0003849 0.0001939 1.985 0.0495 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1657 on 118 degrees of freedom
## Multiple R-squared: 0.03231, Adjusted R-squared: 0.02411
## F-statistic: 3.939 on 1 and 118 DF, p-value: 0.04949
Look at the effect of the number of bases for the simulation on the outcomes.
summary( lm( symRSQ ~ nTrueEmbeddings, data=simdatafrm))
##
## Call:
## lm(formula = symRSQ ~ nTrueEmbeddings, data = simdatafrm)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.47712 -0.07069 0.02518 0.12016 0.26528
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.536559 0.040845 13.137 <2e-16 ***
## nTrueEmbeddings -0.002015 0.002407 -0.837 0.404
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1508 on 118 degrees of freedom
## Multiple R-squared: 0.005905, Adjusted R-squared: -0.00252
## F-statistic: 0.7009 on 1 and 118 DF, p-value: 0.4042
summary( lm( rgccaRSQ ~ nTrueEmbeddings, data=simdatafrm))
##
## Call:
## lm(formula = rgccaRSQ ~ nTrueEmbeddings, data = simdatafrm)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.35051 -0.13142 0.01237 0.14687 0.35164
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.3603512 0.0485512 7.422 1.95e-11 ***
## nTrueEmbeddings -0.0007521 0.0028613 -0.263 0.793
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1793 on 118 degrees of freedom
## Multiple R-squared: 0.0005852, Adjusted R-squared: -0.007884
## F-statistic: 0.06909 on 1 and 118 DF, p-value: 0.7931
summary( lm( sgccaRSQ ~ nTrueEmbeddings, data=simdatafrm))
##
## Call:
## lm(formula = sgccaRSQ ~ nTrueEmbeddings, data = simdatafrm)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.46815 -0.07945 0.03686 0.11551 0.29056
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.508115 0.045323 11.211 <2e-16 ***
## nTrueEmbeddings -0.003335 0.002671 -1.249 0.214
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.1674 on 118 degrees of freedom
## Multiple R-squared: 0.01304, Adjusted R-squared: 0.004674
## F-statistic: 1.559 on 1 and 118 DF, p-value: 0.2143
Look at results via histogram
library( rtemis )
myMeth = paste0("SiMLR-mix-",mixingMethod,'-E-',energyType)
# Build dataset with different distributions
mdata <- data.frame(
method = rep( c(myMeth, "RGCCA", "SGCCA" ), each = nsims ),
value = c( simdatafrm[,1], simdatafrm[,2], simdatafrm[,3] )
)
mplot3.x( split( mdata$value, mdata$method ) )
ofn = paste0( '/results/simulation_energy', energyType, "_mix", mixingMethod, '.csv' )
if ( dir.exists( "/results/" ) ) write.csv( simdatafrm, ofn )
library(viridis)
library(ggplot2)
library(dplyr)
library( psych )
opts <- options() # save old options
options(ggplot2.continuous.colour="viridis")
options(ggplot2.continuous.fill = "viridis")
theme_set(theme_minimal())
myMeth = paste0("SiMLR-mix-",mixingMethod,'-E-',energyType)
# Build dataset with different distributions
mdata <- data.frame(
method = rep( c(myMeth, "RGCCA", "SGCCA" ), each = nsims ),
value = c( simdatafrm[,1], simdatafrm[,2], simdatafrm[,3] )
)
histBy(mdata,"value","method",main='Signal Recovery Results: \n SiMLR (blue) vs rgcca (red) vs sgcca (green)' , xlab='RSQ')
viridis_qualitative_pal7 <- c("#440154FF", "#FDE725FF", "#443A83FF",
"#8FD744FF", "#31688EFF", "#35B779FF",
"#21908CFF")
p <- mdata %>%
ggplot( aes(x=value, fill=method, color = method )) +
geom_density( alpha=0.6, position = 'identity' ) +
theme(text = element_text(size = 20 )) + theme(legend.position="top") + scale_fill_manual( values = c("#440154FF","#FDE725FF", "#21908CFF"))
print( p )