Skip to content

Add pre-sorting of levels to RFP#906

Merged
palday merged 11 commits into
db/RFPfrom
pa/RFP-sorted
Jul 21, 2026
Merged

Add pre-sorting of levels to RFP#906
palday merged 11 commits into
db/RFPfrom
pa/RFP-sorted

Conversation

@palday

@palday palday commented Jul 21, 2026

Copy link
Copy Markdown
Member

Turned out to be less difficult than I originally thought.

@palday
palday requested a review from dmbates July 21, 2026 03:50
Comment thread test/pls.jl Outdated
spL = sparseL(fm1)
@test size(spL) == (4114, 4114)
@test 733090 < nnz(spL) < 733100
# nnz(spL) counts the exact zeros remaining in the (densely stored) filled

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Don't you mean that nnz(spL) counts the non-zeros?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

oops, yes.

ee1bf47

@dmbates

dmbates commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

I am getting a test failure of

Test Summary:        | Pass  Total  Time
likelihoodratio test |   22     22  5.4s

Poisson: Test Failed at /Users/dmbates/.julia/dev/MixedModels/test/bootstrap.jl:65
  Expression: isapprox(gm4.β, gm4sim.β; atol = norm(stderror(gm4)))
   Evaluated: isapprox([0.5293132302958539, 1.1072973757597735, -0.91841266986093, -0.022191955068345592], [0.4584581329384717, 1.2388751637383038, -0.5251807690359246, -0.02264331510499933]; atol = 0.3972560419906301)

@palday

palday commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

I am getting a test failure of

Test Summary:        | Pass  Total  Time
likelihoodratio test |   22     22  5.4s

Poisson: Test Failed at /Users/dmbates/.julia/dev/MixedModels/test/bootstrap.jl:65
  Expression: isapprox(gm4.β, gm4sim.β; atol = norm(stderror(gm4)))
   Evaluated: isapprox([0.5293132302958539, 1.1072973757597735, -0.91841266986093, -0.022191955068345592], [0.4584581329384717, 1.2388751637383038, -0.5251807690359246, -0.02264331510499933]; atol = 0.3972560419906301)

Interesting. That's not the best test, but I've loosened the tolerances and kept it in for now (2c230e6). That test is supposed to test the simulation code and show that we get similar-ish parameter estimates when we fit a model on simulated data. I've set the tolerance to 2 * norm(stderror(gm4)), which I've hand-waved as vaguely corresponding to a 95% confidence region.

@palday
palday requested a review from dmbates July 21, 2026 15:37
@palday
palday merged commit e1f4400 into db/RFP Jul 21, 2026
2 checks passed
@palday
palday deleted the pa/RFP-sorted branch July 21, 2026 16:40
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.

2 participants