Skip to content

Commit

Permalink
Merge db887d6 into cbcc1e1
Browse files Browse the repository at this point in the history
  • Loading branch information
palday authored May 10, 2021
2 parents cbcc1e1 + db887d6 commit a5628a1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ Run-time formula syntax
* Methods for `Base./(::AbstractTerm, ::AbstractTerm)` are added, allowing
nesting syntax to be used with `Term`s at run-time as well [#470]

MixedModels v3.7.0 Release Notes
========================
* Add `condVar` and `condVartables` for computing the conditional variance on the random effects [#492]
* Bugfix: store the correct lower bound for GLMM bootstrap, when the original model was fit with `fast=false` [#518]

MixedModels v3.6.0 Release Notes
========================
* Add `likelihoodratiotest` method for comparing non-mixed (generalized) linear models to (generalized) linear mixed models [#508].
Expand Down Expand Up @@ -227,9 +232,11 @@ Package dependencies
[#486]: https://github.com/JuliaStats/MixedModels.jl/issues/486
[#489]: https://github.com/JuliaStats/MixedModels.jl/issues/489
[#490]: https://github.com/JuliaStats/MixedModels.jl/issues/490
[#492]: https://github.com/JuliaStats/MixedModels.jl/issues/492
[#493]: https://github.com/JuliaStats/MixedModels.jl/issues/493
[#495]: https://github.com/JuliaStats/MixedModels.jl/issues/495
[#501]: https://github.com/JuliaStats/MixedModels.jl/issues/501
[#506]: https://github.com/JuliaStats/MixedModels.jl/issues/506
[#507]: https://github.com/JuliaStats/MixedModels.jl/issues/507
[#508]: https://github.com/JuliaStats/MixedModels.jl/issues/508
[#518]: https://github.com/JuliaStats/MixedModels.jl/issues/518
2 changes: 1 addition & 1 deletion src/bootstrap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function parametricbootstrap(
samp,
deepcopy(morig.λ),
getfield.(morig.reterms, :inds),
copy(morig.optsum.lowerbd),
morig.optsum.lowerbd[1:length(first(samp).θ)],
NamedTuple{Symbol.(fnames(morig))}(map(t -> (t.cnames...,), morig.reterms)),
)
end
Expand Down
6 changes: 5 additions & 1 deletion test/bootstrap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,12 @@ end

@testset "Bernoulli simulate! and GLMM boostrap" begin
contra = dataset(:contra)
gm0 = fit(MixedModel, only(gfms[:contra]), contra, Bernoulli(), fast=true)
# need a model with fast=false to test that we only
# copy the optimizer constraints for θ and not β
gm0 = fit(MixedModel, only(gfms[:contra]), contra, Bernoulli(), fast=false)
bs = parametricbootstrap(StableRNG(42), 100, gm0)
# make sure we're not copying
@test length(bs.lowerbd) == length(gm0.θ)
bsci = filter!(:type => ==("β"), DataFrame(shortestcovint(bs)))
ciwidth = 2 .* stderror(gm0)
waldci = DataFrame(coef=fixefnames(gm0),
Expand Down

0 comments on commit a5628a1

Please sign in to comment.