Learn R Programming

Package sparvaride

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. For a Matlab implementation, see sparvaride-matlab.

Installation

You can install the development version of sparvaride from GitHub with:

# install.packages("devtools")
devtools::install_github("hdarjus/sparvaride")

The 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.

library(sparvaride)

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] TRUE

Citation

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 (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},
#>   }

Copy Link

Version

Install

install.packages('sparvaride')

Monthly Downloads

165

Version

1.0.0

License

GPL (>= 3)

Maintainer

Darjus Hosszejni

Last Published

December 13th, 2025

Functions in sparvaride (1.0.0)

counting_rule_holds

Verify that the counting rule CR(r,1) holds