-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.Rmd
79 lines (61 loc) · 1.92 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{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 available at [arXiv](https://arxiv.org/abs/2211.00671).
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")
```