vignettes/short_intro.Rmd
short_intro.RmdThis is a short introduction to the sparvaride package.
The package implements the variance identification algorithm for sparse
factor analysis described in the paper “Cover It Up! Bipartite Graphs
Uncover Identifiability in Sparse Factor Analysis” by Darjus Hosszejni
and Sylvia Frühwirth-Schnatter. The paper is published in the Journal of
Multivariate Analysis.
The package is still under development and the API is subject to change.
At the moment, the package has a single exported function called
counting_rule_holds with one input variable: a binary
matrix
.
This binary matrix
should be the sparsity pattern of the factor loading matrix
in sparse factor analysis:
where
is the
th
vector of observations,
is the
th
vector of latent factors,
is the
th
vector of idiosyncratic errors, and
.
In sparse factor analysis, the factor loading matrix
may be sparse, i.e.,
may only have a small number of non-zero entries. Importantly,
may have (estimated) structural zeros, and the sparsity pattern is
,
where
is the indicator function. For mathematical tractability, we assume
orthogonal factors, i.e.,
identity, and homoskedasticity for the observation series, i.e.,
is diagonal.
In this setup, the covariance matrix of the idiosyncratic errors may not be uniquely identified if there are too many zeros in (and thus in ). The 3579 counting rule is a sufficient condition for the uniqueness of the covariance matrix . More information on the 3579 counting rule can be found in the paper “Cover It Up! Bipartite Graphs Uncover Identifiability in Sparse Factor Analysis” by Darjus Hosszejni and Sylvia Frühwirth-Schnatter at https://doi.org/10.1016/j.jmva.2025.105536.
Def. Let be a binary matrix. Then, the 3579 counting rule is the following condition: for all , all submatrices of consisting of columns of have at least non-zero entries.
For example, for below the counting rule does not hold because there is a (namely, ), such that there is a submatrix of consisting of column of that has only non-zero entries: the middle column. For , however, the counting rule holds because there is no such that there is a submatrix of consisting of columns of that has only non-zero entries.
counting_rule_holds Function
We can check whether the 3579 counting rule holds for a given binary
matrix delta using the counting_rule_holds
function in the sparvaride package.
We define two matrices as above in R:
delta1 <-
matrix(c(1, 0, 0,
0, 1, 0,
0, 0, 1,
1, 1, 1,
1, 0, 1,
1, 0, 1,
1, 0, 1),
nrow = 7, ncol = 3,
byrow = TRUE)
delta2 <-
matrix(c(1, 0, 0,
0, 1, 0,
0, 0, 1,
1, 1, 1,
1, 0, 1,
1, 1, 1,
1, 0, 1),
nrow = 7, ncol = 3,
byrow = TRUE)Then, we call the counting_rule_holds function on these
matrices:
counting_rule_holds(delta1)
#> [1] FALSE
counting_rule_holds(delta2)
#> [1] TRUEFor citing our work, please check the citation function
in R:
citation("sparvaride")
#> To cite sparvaride in publications use:
#>
#> Hosszejni D, Frühwirth-Schnatter S (2026). "Cover It Up! Bipartite
#> Graphs Uncover Identifiability in Sparse Factor Analysis." _Journal
#> of Multivariate Analysis_, *211*, 105536. ISSN 0047-259X,
#> doi:10.1016/j.jmva.2025.105536
#> <https://doi.org/10.1016/j.jmva.2025.105536>.
#>
#> A BibTeX entry for LaTeX users is
#>
#> @Article{,
#> title = {Cover It Up! Bipartite Graphs Uncover Identifiability in Sparse Factor Analysis},
#> author = {Darjus Hosszejni and Sylvia Frühwirth-Schnatter},
#> journal = {Journal of Multivariate Analysis},
#> year = {2026},
#> volume = {211},
#> pages = {105536},
#> issn = {0047-259X},
#> doi = {10.1016/j.jmva.2025.105536},
#> }