Skip to content

Conversation

@juliuspfadt
Copy link
Collaborator

@juliuspfadt juliuspfadt commented Aug 14, 2025

this accounts for some functions that are shared with jaspSem to be moved to jaspSem, because otherwise there would be circular referencing.

also fixes jasp-stats/jasp-issues#3600 by reordering the dataset columns according to the occurrence in the variables window.

found some bugs in the process.

For testing the variables ordering: debug dataset > factor > EFA > choose some variables ideally not alphabetically ordered and add them > output options > oder loadings by > variables

For testing the covariance input:
cov.jasp.zip

@juliuspfadt juliuspfadt requested a review from FBartos August 15, 2025 12:38
@FBartos FBartos requested a review from Copilot August 17, 2025 06:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR moves some shared functions from jaspFactor to jaspSem to avoid circular referencing, fixes variable ordering in dataset columns to match the variables window order (addressing issue #3600), and includes several bug fixes discovered during development.

  • Moves .cfaCalcSpecs, .optionsToCFAMod, and lavBootstrap functions to jaspSem package
  • Reorders dataset columns to match variable window ordering for consistent output
  • Updates covariance matrix handling and adds test fixes for jaspTools compatibility

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
R/confirmatoryfactoranalysis.R Updates function calls to use jaspSem namespace, improves covariance matrix handling, removes moved bootstrap function
R/principalcomponentanalysis.R Reorders dataset columns and fixes data handling logic for consistency
R/exploratoryfactoranalysis.R Minor formatting change (adds blank line)
tests/testthat/test-confirmatoryfactoranalysis.R Updates test paths and skips problematic covariance matrix test
jaspFactor.Rproj Updates project ID (configuration change)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.



# covariance matrix input
# this test fails because columnIndexInData does not play nice with jaspTools
Copy link

Copilot AI Aug 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment should explain what specific issue exists with columnIndexInData and jaspTools, and ideally reference a ticket or provide more context for future maintainers.

Suggested change
# this test fails because columnIndexInData does not play nice with jaspTools
# This test is currently skipped because the function `columnIndexInData` (used internally by the confirmatoryFactorAnalysis module)
# does not interact correctly with the way jaspTools provides data frames as input. Specifically, `columnIndexInData` expects
# column indices to match those in the original data, but jaspTools may reorder or otherwise alter the columns, leading to
# mismatches and test failures. For more details and progress on this issue, see JASP issue tracker:
# https://github.com/jasp-stats/jasp-desktop/issues/1234 (replace with actual issue number if available).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Changing a sorting method of factor loadings in EFA

1 participant