An open API service indexing awesome lists of open source software.

https://github.com/hdarjus/sparvaride

Variance Identification for Sparse Factor Analyses
https://github.com/hdarjus/sparvaride

econometrics factor-analysis latent-factors parameter-identification r

Last synced: 2 months ago
JSON representation

Variance Identification for Sparse Factor Analyses

Awesome Lists containing this project

README

          

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# 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](https://doi.org/10.1016/j.jmva.2025.105536).

The package is still under development and the API is subject to change.
For a Matlab implementation, see [`sparvaride-matlab`](https://github.com/hdarjus/sparvaride-matlab).

## Installation

You can install the development version of `sparvaride` from [GitHub](https://github.com/hdarjus/sparvaride) with:

``` r
# 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.

```{r setup}
library(sparvaride)
```

We define two matrices as above in R:

```{r examples}
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:

```{r counting_rule_holds}
counting_rule_holds(delta1)
counting_rule_holds(delta2)
```

## Citation

For citing our work, please check the `citation` function in R:

```{r citation}
citation("sparvaride")
```