Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for rank deficiency in bootstrap #755

Merged
merged 16 commits into from
Mar 19, 2024
Merged

Conversation

palday
Copy link
Member

@palday palday commented Mar 19, 2024

closes #754

Did behavior change? Did you add need features? If so, please update NEWS.md

  • add entry in NEWS.md
  • after opening this PR, add a reference and run docs/NEWS-update.jl to update the cross-references.

Should we release your changes right away? If so, bump the version:

  • I've bumped the version appropriately

Copy link

codecov bot commented Mar 19, 2024

Codecov Report

Attention: Patch coverage is 71.42857% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 96.45%. Comparing base (cfd3023) to head (cdc40d6).

Files Patch % Lines
src/simulate.jl 50.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #755      +/-   ##
==========================================
+ Coverage   96.33%   96.45%   +0.11%     
==========================================
  Files          34       34              
  Lines        3356     3354       -2     
==========================================
+ Hits         3233     3235       +2     
+ Misses        123      119       -4     
Flag Coverage Δ
current 96.39% <71.42%> (+0.11%) ⬆️
minimum 96.35% <71.42%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@palday palday marked this pull request as ready for review March 19, 2024 18:17
src/generalizedlinearmixedmodel.jl Outdated Show resolved Hide resolved
src/linearmixedmodel.jl Outdated Show resolved Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@palday palday requested review from dmbates and ararslan March 19, 2024 18:19
src/bootstrap.jl Outdated Show resolved Hide resolved
src/bootstrap.jl Outdated Show resolved Hide resolved
src/simulate.jl Show resolved Hide resolved
src/simulate.jl Show resolved Hide resolved
Copy link
Member

@ararslan ararslan left a comment

Choose a reason for hiding this comment

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

Confirmed that this works in the case that motivated #754 and that

dropped_idx = findall((coef(model) .=== -0.0) .& isnan.(stderror(model)))
dropped_coefs = coefnames(model)[dropped_idx]
all(nt -> !(nt.coefname in dropped_coefs) || nt.β !== -0.0, boot.β)

is true. (Extending the added test to the case of multiple dropped columns)

@palday palday merged commit 0a873b0 into main Mar 19, 2024
9 of 11 checks passed
@palday palday deleted the pa/rank_deficient_bootstrap branch March 19, 2024 21:29
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.

Error on parametricbootstrap for rank deficient models
2 participants