Skip to content

Conversation

@kgoldfeld
Copy link
Owner

Minor fix in genCorMat to address an issue where very small rounding differences could make correlation matrices appear non-symmetric, preventing some data generation. Matrices are now always properly symmetrized.

@kgoldfeld
Copy link
Owner Author

@assignUser I had to do this tiny fix, because I was getting a CRAN error. I'd like to merge this, but giving you a chance to take look if you'd like. There was an error in one of the checks, but it had nothing to do with simstudy, so I am going to ignore it. Thanks.

}

assertPositiveSemiDefinite(corMat = cm)
cm <- ( cm + t(cm)) / 2 # ensure symmetry even with rounding errors - fixes CRAN error
Copy link
Collaborator

Choose a reason for hiding this comment

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

My only comment would be that given the number of times this repeated it would make sense to pull it out into a function.

Copy link
Owner Author

Choose a reason for hiding this comment

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

I made that change - thanks.

@kgoldfeld kgoldfeld merged commit 7949e41 into main Dec 9, 2025
9 checks passed
@kgoldfeld kgoldfeld deleted the fix-MKL-error branch December 9, 2025 14:53
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.

3 participants