Package 'sparvaride'

Title: Variance Identification in Sparse Factor Analysis
Description: This is an implementation of the algorithm described in Section 3 of Hosszejni and Frühwirth-Schnatter (2022) <doi:10.48550/arXiv.2211.00671>. The algorithm is used to verify that the counting rule CR(r,1) holds for the sparsity pattern of the transpose of a factor loading matrix. As detailed in Section 2 of the same paper, if CR(r,1) holds, then the idiosyncratic variances are generically identified. If CR(r,1) does not hold, then we do not know whether the idiosyncratic variances are identified or not.
Authors: Darjus Hosszejni [aut, cre] , Sylvia Frühwirth-Schnatter [ths]
Maintainer: Darjus Hosszejni <[email protected]>
License: GPL (>= 3)
Version: 0.1.0
Built: 2024-11-07 04:42:11 UTC
Source: https://github.com/hdarjus/sparvaride

Help Index


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

Description

This is an implementation of the algorithm described in Section 3 of Hosszejni and Fruehwirth-Schnatter (2022). The algorithm is used to verify that the counting rule CR(r,1) holds for the sparsity pattern of the transpose of a factor loading matrix. As detailed in Section 2 of the same paper, if CR(r,1) holds, then the idiosyncratic variances are generically identified. If CR(r,1) does not hold, then we do not know whether the idiosyncratic variances are identified or not.

Usage

counting_rule_holds(delta)

Arguments

delta

an m x r matrix of 0s and 1s, where delta(i,j) == 1 if and only if the i-th observation loads on the j-th factor

Value

TRUE if CR(r,1) holds, FALSE otherwise

References

Hosszejni and Fruehwirth-Schnatter (2022). "Cover It Up! Bipartite Graphs Uncover Identifiability in Sparse Factor Analysis". arXiv:2211.00671. doi:10.48550/arXiv.2211.00671

See Also

stats::factanal()

Examples

# Two example matrices
cr_holds <-
  matrix(c(1, 0, 0,
           1, 0, 1,
           0, 1, 0,
           0, 1, 1,
           0, 1, 1,
           1, 1, 1,
           1, 1, 1),
         7, 3, byrow = TRUE)

cr_does_not_hold <-
  matrix(c(1, 0, 0,
           0, 0, 1,
           0, 1, 0,
           0, 1, 0,
           0, 1, 0,
           1, 1, 1,
           1, 1, 1),
         7, 3, byrow = TRUE)

# Check if the counting rule holds
counting_rule_holds(cr_holds)
#> [1] TRUE
counting_rule_holds(cr_does_not_hold)
#> [1] FALSE