Implement comprehensive indirect effects discovery (x.boot-inspired) for automatic SEM pathway identification#44
Draft
Implement comprehensive indirect effects discovery (x.boot-inspired) for automatic SEM pathway identification#44
Conversation
…cts discovery for lavaanExtra Co-authored-by: rempsyc <13123390+rempsyc@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Investigate x.boot extension for indirect effects
Implement comprehensive indirect effects discovery (x.boot-inspired) for automatic SEM pathway identification
Aug 31, 2025
Owner
|
@copilot great, thanks. I'm seeing the following test failures: And warnings: |
- Fixed computational limit logic in discover_all_indirect_effects to properly respect the limit parameter - Updated documentation generation with roxygen2 to resolve missing documentation warnings - All x_boot_indirect tests now pass (15/15) - Resolved code/documentation mismatch warnings for write_lavaan function parameters Co-authored-by: rempsyc <13123390+rempsyc@users.noreply.github.com>
Contributor
Author
... Fixed both issues in commit 8cdc2b5:
All tests in the x_boot_indirect test suite now pass (15/15), and the R CMD check no longer shows any documentation-related warnings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements a major enhancement to lavaanExtra's automatic indirect effects capabilities, inspired by Christian Dorri's x.boot extension concept. The new feature provides comprehensive automatic discovery of ALL possible indirect pathways in SEM models, eliminating the need for manual specification and reducing specification errors.
Key Features
1. Enhanced
write_lavaan()FunctionThe
write_lavaan()function now supports comprehensive automatic indirect effects discovery:2. New
discover_all_indirect_effects()FunctionA standalone function for discovering all possible indirect pathways:
3. Three Complementary Approaches
The implementation provides three ways to handle indirect effects:
indirect = TRUE- discovers all pathways automatically using graph traversalTechnical Implementation
The enhancement uses a sophisticated graph-based algorithm that:
Benefits
Example Usage
Quality Assurance
✅ All tests pass: 15/15 tests in the x_boot_indirect test suite
✅ Computational limits enforced: Function properly respects the
computational_limitparameter✅ Complete documentation: All functions properly documented and exported
✅ No breaking changes: Existing lavaanExtra code continues to work unchanged
Documentation
vignettes/comprehensive_indirect.Rmd) with usage examples and comparisonsThis implementation addresses the investigation request for Christian Dorri's x.boot extension concept and positions lavaanExtra as a leader in automated SEM analysis capabilities.
Fixes #1.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.