Skip to content

Fix handling of cluster in ddd()#26

Merged
marcelortizv merged 2 commits into
mainfrom
25-issue-with-cluster-parameter
Aug 11, 2025
Merged

Fix handling of cluster in ddd()#26
marcelortizv merged 2 commits into
mainfrom
25-issue-with-cluster-parameter

Conversation

@marcelortizv
Copy link
Copy Markdown
Owner

Summary
This PR fixes a bug in ddd() when the cluster parameter is used rised in issue #25. If a cluster variable is provided, the function now defaults to multiplier bootstrap with cband = TRUE and validates that the cluster variable is time-invariant.

Changes
• When cluster is supplied, use multiplier bootstrap and set cband = TRUE for clustered inference sending a warning for the user.
• Validate that the cluster variable is time-invariant; error with a clear message if not.
• Add unit tests covering clustered paths and the time-invariance check.

Notes
• No API changes beyond stricter validation.
• Backward compatible for users not passing cluster.

@marcelortizv marcelortizv self-assigned this Aug 10, 2025
@marcelortizv marcelortizv added the bug Something isn't working label Aug 10, 2025
@marcelortizv marcelortizv requested a review from pedrohcgs August 10, 2025 19:06
@marcelortizv marcelortizv merged commit 6520841 into main Aug 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue with cluster parameter in ddd() function - no effect and error with custom data

1 participant