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
- Host: GitHub
- URL: https://github.com/hdarjus/sparvaride
- Owner: hdarjus
- License: gpl-3.0
- Created: 2021-10-12T08:46:01.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-12-11T15:10:29.000Z (6 months ago)
- Last Synced: 2025-12-12T19:13:08.714Z (6 months ago)
- Topics: econometrics, factor-analysis, latent-factors, parameter-identification, r
- Language: C++
- Homepage: https://hdarjus.github.io/sparvaride/
- Size: 151 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE.md
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")
```