jackstraw
Statistical Inference for Unsupervised Learning
Description
Test for association between the observed data and their estimated latent variables. The jackstraw package provides a resampling strategy and testing scheme to estimate statistical significance of association between the observed data and their latent variables. Depending on the data type and the analysis aim, the latent variables may be estimated by principal component analysis (PCA), factor analysis (FA), K-means clustering, and related unsupervised learning algorithms. The jackstraw methods learn over-fitting characteristics inherent in this circular analysis, where the observed data are used to estimate the latent variables and used again to test against that estimated latent variables. When latent variables are estimated by PCA, the jackstraw enables statistical testing for association between observed variables and latent variables, as estimated by low-dimensional principal components (PCs). This essentially leads to identifying variables that are significantly associated with PCs. Similarly, unsupervised clustering, such as K-means clustering, partition around medoids (PAM), and others, finds coherent groups in high-dimensional data. The jackstraw estimates statistical significance of cluster membership, by testing association between data and cluster centers. Clustering membership can be improved by using the resulting jackstraw p-values and posterior inclusion probabilities (PIPs), with an application to unsupervised evaluation of cell identities in single cell RNA-seq (scRNA-seq).
Downloads
285
Last 30 days
14559th
832
Last 90 days
5K
Last year
Trend: -3.4% (30d vs prior 30d)
CRAN Check Status
Show all 14 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | OK |
| r-devel-linux-x86_64-debian-gcc | OK |
| r-devel-linux-x86_64-fedora-clang | OK |
| r-devel-linux-x86_64-fedora-gcc | OK |
| r-devel-macos-arm64 | OK |
| r-devel-windows-x86_64 | OK |
| r-oldrel-macos-arm64 | NOTE |
| r-oldrel-macos-x86_64 | NOTE |
| r-oldrel-windows-x86_64 | OK |
| r-patched-linux-x86_64 | OK |
| r-release-linux-x86_64 | OK |
| r-release-macos-arm64 | OK |
| r-release-macos-x86_64 | OK |
| r-release-windows-x86_64 | OK |
Check details (2 non-OK)
package dependencies
Packages suggested but not available for checking: 'lfa', 'gcatest'
package dependencies
Packages suggested but not available for checking: 'lfa', 'gcatest'
Additional Issues
Check History
NOTE 12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 28, 2026
package dependencies
Packages suggested but not available for checking: 'lfa', 'gcatest'
package dependencies
Packages suggested but not available for checking: 'lfa', 'gcatest'
ERROR 11 OK · 2 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 21, 2026
tests
Running ‘testthat.R’ [16s/21s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(jackstraw)
>
> test_check("jackstraw")
Saving _problems/test-jackstraw-1061.R
[ FAIL 1 | WARN 0 | SKIP 0 | PASS
...[truncated]...
ackstraw.R:1061:9'): efron_Rsq works ────────────────────────
Expected `all(r2 >= 0)` to be TRUE.
Differences:
`actual`: FALSE
`expected`: TRUE
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 1129 ]
Error:
! Test failures.
Execution halted
package dependencies
Packages suggested but not available for checking: 'lfa', 'gcatest'
package dependencies
Packages suggested but not available for checking: 'lfa', 'gcatest'
NOTE 12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 14, 2026
package dependencies
Packages suggested but not available for checking: 'lfa', 'gcatest'
package dependencies
Packages suggested but not available for checking: 'lfa', 'gcatest'
ERROR 11 OK · 2 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 10, 2026
tests
Running ‘testthat.R’ [16s/21s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(jackstraw)
>
> test_check("jackstraw")
Saving _problems/test-jackstraw-1166.R
[ FAIL 1 | WARN 0 | SKIP 0 | PASS
...[truncated]...
1. └─jackstraw (local) test_jackstraw_return_val(obj, s, B) at test-jackstraw.R:1166:13
2. └─testthat::expect_true(!anyNA(p)) at test-jackstraw.R:349:5
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 1129 ]
Error:
! Test failures.
Execution halted
package dependencies
Packages suggested but not available for checking: 'lfa', 'gcatest'
package dependencies
Packages suggested but not available for checking: 'lfa', 'gcatest'