penfa
R package for penalized factor analysis via trust-region algorithm and automatic multiple tuning parameter selection
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 4 DOI reference(s) in README -
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.7%) to scientific vocabulary
Keywords
factor-analysis
lasso
latent-variables
multiple-group
optimization
penalization
psychometrics
Last synced: 6 months ago
·
JSON representation
Repository
R package for penalized factor analysis via trust-region algorithm and automatic multiple tuning parameter selection
Basic Info
- Host: GitHub
- Owner: egeminiani
- License: gpl-3.0
- Language: R
- Default Branch: main
- Homepage: https://egeminiani.github.io/penfa/
- Size: 3.68 MB
Statistics
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 2
- Releases: 0
Topics
factor-analysis
lasso
latent-variables
multiple-group
optimization
penalization
psychometrics
Created over 4 years ago
· Last pushed about 4 years ago
Metadata Files
Readme
License
README.Rmd
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# penfa
[](https://cran.r-project.org/)
[](https://lifecycle.r-lib.org/articles/stages.html)
[)`-brightgreen.svg)](https://github.com/egeminiani/penfa/commits/main)
[](https://egeminiani.github.io/penfa/)
[](https://www.gnu.org/licenses/gpl-3.0.en.html)
[](https://github.com/egeminiani/penfa/actions)
### Overview
An R package for estimating single- and multiple-group penalized factor models
via a trust-region algorithm with integrated automatic multiple tuning parameter
selection (Geminiani et al., 2021). Supported penalties include lasso, adaptive
lasso, scad, mcp, and ridge.
### Installation
You can install the released version of penfa from CRAN with:
``` r
install.packages("penfa")
```
And the development version from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("egeminiani/penfa")
```
### Example
This is a basic example showing how to fit a *PENalized Factor Analysis* model
with the alasso penalty and the automatic tuning procedure. A shrinkage penalty
is applied to the whole factor loading matrix.
Let's load the data (see `?ccdata` for details).
```{r data}
library(penfa)
data(ccdata)
```
**Step 1** : specify the model syntax
```{r syntax}
syntax = 'help =~ h1 + h2 + h3 + h4 + h5 + h6 + h7 + 0*v1 + v2 + v3 + v4 + v5
voice =~ 0*h1 + h2 + h3 + h4 + h5 + h6 + h7 + v1 + v2 + v3 + v4 + v5'
```
**Step 2**: fit the model
```{r fit}
alasso_fit <- penfa(model = syntax,
data = ccdata,
std.lv = TRUE,
pen.shrink = "alasso")
```
```{r show}
alasso_fit
```
**Step 3**: inspect the results
```{r summary}
summary(alasso_fit)
```
### Vignettes and Tutorials
* See `vignette("automatic-tuning-selection")` for the estimation of a penalized
factor model with lasso and alasso penalties. The tuning parameter producing the
optimal amount of sparsity in the factor loading matrix is found through the
automatic tuning procedure.
* See `vignette("grid-search-tuning-selection")` for the estimation of a
penalized factor model with scad and mcp penalties. A grid search is conducted,
and the optimal tuning parameter is the one generating the penalized model with
the lowest GBIC (Generalized Bayesian Information Criterion).
* See ["multiple-group-analysis"](https://egeminiani.github.io/penfa/articles/articles/multiple-group-analysis.html) for the estimation of a multiple-group penalized factor model
with the alasso penalty. This model encourages sparsity in the loading matrices
and cross-group invariance of loadings and intercepts. The automatic multiple
tuning parameter procedure is employed for finding the optimal tuning parameter
vector.
* See ["plotting-penalty-matrix"](https://egeminiani.github.io/penfa/articles/articles/plotting-penalty-matrix.html) for details on how to produce interactive plots of the penalty matrices.
### Literature
* Geminiani, E., Marra, G., & Moustaki, I. (2021). "Single- and Multiple-Group
Penalized Factor Analysis: A Trust-Region Algorithm Approach with Integrated
Automatic Multiple Tuning Parameter Selection." Psychometrika, 86(1), 65-95. [https://doi.org/10.1007/s11336-021-09751-8](https://doi.org/10.1007/s11336-021-09751-8)
* Geminiani, E. (2020). "A Penalized Likelihood-Based Framework for Single and
Multiple-Group Factor Analysis Models." PhD thesis, University of Bologna.
[http://amsdottorato.unibo.it/9355/](http://amsdottorato.unibo.it/9355/).
### How to cite
```{r citation, echo=FALSE}
print(citation("penfa"), bibtex = TRUE)
```
GitHub Events
Total
Last Year
Committers
Last synced: over 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Elena Geminiani | g****a@g****m | 22 |
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 1
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- psychelzh (1)
Pull Request Authors
- rCarto (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- cran 264 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 2
- Total maintainers: 1
cran.r-project.org: penfa
Single- And Multiple-Group Penalized Factor Analysis
- Homepage: https://github.com/egeminiani/penfa
- Documentation: http://cran.r-project.org/web/packages/penfa/penfa.pdf
- License: GPL-3
-
Latest release: 0.1.1
published over 4 years ago
Rankings
Forks count: 21.9%
Stargazers count: 28.5%
Dependent packages count: 29.8%
Dependent repos count: 35.5%
Average: 39.5%
Downloads: 81.8%
Maintainers (1)
Last synced:
7 months ago
Dependencies
DESCRIPTION
cran
- R >= 3.5.0 depends
- GJRM * imports
- MASS * imports
- methods * imports
- mgcv * imports
- stats * imports
- trust * imports
- utils * imports
- cartography * suggests
- knitr * suggests
- plotly * suggests
- rmarkdown * suggests