This 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 available at arXiv.
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 δ ∈ {0, 1}m × r.
This binary matrix δ should be
the sparsity pattern of the factor loading matrix β ∈ ℝm × r
in sparse factor analysis: yi = βfi + ϵi,
where yi ∈ ℝm
is the ith vector of
observations, fi ∈ ℝr
is the ith vector of latent
factors, ϵi ∈ ℝm
is the ith vector of
idiosyncratic errors, and i = 1, ..., n. 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 δ = I(β ≠ 0),
where I() is the indicator
function. For mathematical tractability, we assume orthogonal factors,
i.e., cov(fi) = Ir
identity, and homoskedasticity for the observation series, i.e., cov(ϵi) is
diagonal.
In this setup, the covariance matrix cov(ϵi) 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 cov(ϵi). 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://arxiv.org/abs/2211.00671.
Def. Let δ ∈ {0, 1}m × r be a binary matrix. Then, the 3579 counting rule is the following condition: for all q = 1, ..., r, all submatrices of δ consisting of q columns of δ have at least 2q + 1 non-zero entries.
For example, for δ1 below the counting rule does not hold because there is a q (namely, q = 1), such that there is a submatrix of δ1 consisting of 1 column of δ1 that has only 2q = 2 non-zero entries: the middle column. For δ2, however, the counting rule holds because there is no q such that there is a submatrix of δ2 consisting of q columns of δ2 that has only 2q non-zero entries.
$$\delta_1=\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 0 & 1 \\ 1 & 0 & 1 \end{pmatrix}, \quad\quad\quad \delta_2=\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ 1 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 1 \\ 1 & 0 & 1 \end{pmatrix}$$
counting_rule_holds
FunctionWe 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:
For citing our work, please check the citation
function
in R:
citation("sparvaride")
#> To cite sparvaride in publications use:
#>
#> Hosszejni D, Frühwirth-Schnatter S (2022). "Cover It Up! Bipartite
#> Graphs Uncover Identifiability in Sparse Factor Analysis."
#> doi:10.48550/arXiv.2211.00671
#> <https://doi.org/10.48550/arXiv.2211.00671>, arXiv: 2211.00671.
#>
#> A BibTeX entry for LaTeX users is
#>
#> @Unpublished{,
#> title = {Cover It Up! Bipartite Graphs Uncover Identifiability in Sparse Factor Analysis},
#> author = {Darjus Hosszejni and Sylvia Frühwirth-Schnatter},
#> year = {2022},
#> note = {arXiv: 2211.00671},
#> doi = {10.48550/arXiv.2211.00671},
#> }