semfindr

A find(e)r of influential cases and outliers in SEM

https://github.com/sfcheung/semfindr

Science Score: 39.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.5%) to scientific vocabulary

Keywords

diagnostics influential-cases lavaan outlier-detection r r-package sensitivity-analysis structural-equation-modeling
Last synced: 6 months ago · JSON representation

Repository

A find(e)r of influential cases and outliers in SEM

Basic Info
Statistics
  • Stars: 1
  • Watchers: 3
  • Forks: 0
  • Open Issues: 4
  • Releases: 5
Topics
diagnostics influential-cases lavaan outlier-detection r r-package sensitivity-analysis structural-equation-modeling
Created over 5 years ago · Last pushed 11 months ago
Metadata Files
Readme Changelog License

README.md

Lifecycle: stable Project Status: Active - The project has reached a stable, usable state and is being actively developed. CRAN status CRAN: Release Date CRAN RStudio mirror downloads Code size Last Commit at Master R-CMD-check <!-- badges: end -->

(Version 0.1.9, updated on 2025-03-04, release history)

semfindr: Finding influential cases in SEM

A find(e)r of influential cases in structural equation modeling based mainly on the sensitivity analysis procedures presented by Pek and MacCallum (2011).

This package supports two approaches: leave-one-out analysis and approximate case influence.

Leave-One-Out Analysis

This approach examines the influence of each case by refitting a model with this case removed.

Unlike other similar packages, the workflow adopted in semfindr separates the leave-one-out analysis (refitting a model with one case removed) from the case influence measures.

  • Users first do the leave-one-out model fitting for all cases, or cases selected based on some criteria (vignette("selecting_cases", package = "semfindr")), using lavaan_rerun().

  • Users then compute case influence measures using the output of lavaan_rerun().

This approaches avoids unnecessarily refitting the models for each set of influence measures, and also allows analyzing only probable influential cases when the model takes a long time to fit.

The functions were designed to be flexible such that users can compute case influence measures such as

  • standardized parameter estimates and generalized Cook's distance for selected parameters;
  • changes in raw or standardized estimates of parameters;
  • changes in fit measures supported by lavaan::fitMeasures().

This package can also be generate plots to visualize case influence, including a bubble plot similar to that by car::influencePlot() All plots generated are ggplot plots that can be further modified by users. More can be found in Quick Start (vignette("semfindr", package = "semfindr")).

Approximate Case Influence

This approach computes the approximate influence of each case using casewise scores and casewise likelihood. This method is efficient because it does not requires refitting the model for each case. However, it can only approximate the influence, unlike the leave-one-out approach, which produce exact influence. This approach can be used when the number of cases is very large and/or the model takes a long time to fit. Technical details can be found in the vignette Approximate Case Influence Using Scores and Casewise Likelihood (vignette("casewise_scores", package = "semfindr")).

Installation

The stable version at CRAN can be installed by install.packages():

r install.packages("semfindr")

The latest developmental version can be installed by remotes::install_github:

r remotes::install_github("sfcheung/semfindr")

You can learn more about this package at the Github page of this package and Quick Start (vignette("semfindr", package = "semfindr")).

Reference

Pek, J., & MacCallum, R. (2011). Sensitivity analysis in structural equation models: Cases and their influence. Multivariate Behavioral Research, 46(2), 202-228. https://doi.org/10.1080/00273171.2011.561068

Comments, Suggestions, and Bug Reports

Please post your comments, suggestions, and bug reports as issues at GitHub, or contact the maintainer by email. Thanks in advance for trying out semfindr.

Owner

  • Name: Shu Fai Cheung
  • Login: sfcheung
  • Kind: user
  • Location: Macao
  • Company: University of Macau

GitHub Events

Total
  • Delete event: 2
  • Push event: 31
  • Pull request event: 16
  • Create event: 4
Last Year
  • Delete event: 2
  • Push event: 31
  • Pull request event: 16
  • Create event: 4

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 47
  • Total pull requests: 85
  • Average time to close issues: 6 months
  • Average time to close pull requests: 24 minutes
  • Total issue authors: 4
  • Total pull request authors: 2
  • Average comments per issue: 1.09
  • Average comments per pull request: 0.04
  • Merged pull requests: 83
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 16
  • Average time to close issues: N/A
  • Average time to close pull requests: 11 minutes
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 16
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • sfcheung (39)
  • marklhc (6)
  • cicadawing (1)
  • yrosseel (1)
Pull Request Authors
  • sfcheung (85)
  • marklhc (4)
Top Labels
Issue Labels
enhancement (21) documentation (10) bug (6) top priority (5) low priority (3) new feature (3) project management (2)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 191 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 6
  • Total maintainers: 1
cran.r-project.org: semfindr

Influential Cases in Structural Equation Modeling

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 191 Last month
Rankings
Forks count: 28.8%
Dependent packages count: 29.8%
Stargazers count: 35.2%
Dependent repos count: 35.5%
Average: 41.0%
Downloads: 75.8%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v2 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/checkout v3 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • R >= 4.1.0 depends
  • ggplot2 * imports
  • ggrepel * imports
  • lavaan * imports
  • methods * imports
  • rlang * imports
  • stats * imports
  • utils * imports
  • knitr * suggests
  • modi * suggests
  • norm2 * suggests
  • parallel * suggests
  • rmarkdown * suggests
  • testthat >= 3.0.0 suggests