Select the number of factors that are shared among studies q and thos that are specific to individual studies(qs).More details are in Section 3.1 of the article.
selectFac.MultiRFM(
XList,
q_max = 15,
qs_max = 4,
method = c("SSVR", "CUP"),
threshold = 1e-05,
cup.upper = 0.95,
epsELBO = 1e-05,
maxIter = 30,
verbose = TRUE,
seed = 1
)A length-M list, where each component represents a matrix and is the
an optional integer, specify the maximum number of study-shared factors; default as 15.
an optional integer, specify the maximum number of study-specified factors; default as 4.
an optional character, contains the methods of "SSVR" and "CUP", where `SSVR` is the sequential singular value ratio method while `CUP` is the criterion based on cumulative proportion of explained variance.
the cutoff of the singular values, where the singular values less than this value will be removed.
upper limit of the cumulative proportion of explained variance.
an optional positive value, tolerance of relative variation rate of the evidence lower bound value, defualt as '1e-5'.
the maximum iteration of the VEM algorithm. The default is 30.
a logical value, whether output the information in iteration.
an optional integer, specify the random seed for reproducibility in initialization;default as 1.
return a list contains the following components:(1) q, the number of shared factors; (2) qs,the number of specified factors.
None
p <- 100
nvec <- c(150,200); qs <- c(2,2)
datList <- gendata_simu_multi(seed=1, nvec=nvec, p=p, q=3, qs=qs, rho=c(5,5),
err.type='mvt', sigma2_eps = 1, nu=3)
XList <- datList$Xlist;
## Set maxIter=5 for demonstration while set it to 30 in the formal run.
hqlist <- selectFac.MultiRFM(XList, q_max=6, qs_max= rep(4,2), maxIter = 5) #
#> iter = 2, ELBO= -55798.372887, dELBO=0.999974
#> iter = 3, ELBO= -45288.919753, dELBO=0.188347
#> iter = 4, ELBO= -42867.606369, dELBO=0.053464
#> iter = 5, ELBO= -42436.976806, dELBO=0.010046
#> iter = 2, ELBO= -51743.567062, dELBO=0.999976
#> iter = 3, ELBO= -44821.711164, dELBO=0.133772
#> iter = 4, ELBO= -42101.401011, dELBO=0.060692
#> iter = 5, ELBO= -41697.435553, dELBO=0.009595
str(hqlist)
#> List of 2
#> $ q : num 3
#> $ qs: Named num [1:2] 2 2
#> ..- attr(*, "names")= chr [1:2] "qs1" "qs2"