Skip to content

Commit b78e319

Browse files
paldayararslan
andauthored
display fix for unlikely but possible type inference failure in bootstrap table (#865)
* display fix for unlikely but possible type inference failure in bootstrap table * format --------- Co-authored-by: Alex Arslan <[email protected]>
1 parent b09fe96 commit b78e319

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
MixedModels v5.0.4 Release Notes
2+
==============================
3+
- Small update in some code related to displaying dispersion parameters in cases where inference has failed. [#865]
4+
15
MixedModels v5.0.3 Release Notes
26
==============================
37
- `lowerbd(::MixedModel)` returns the _canonical_ lower bounds of a model's parameters, i.e. the expected bounds after rectification in unconstrained optimization. [#864]
@@ -700,3 +704,4 @@ Package dependencies
700704
[#860]: https://github.com/JuliaStats/MixedModels.jl/issues/860
701705
[#861]: https://github.com/JuliaStats/MixedModels.jl/issues/861
702706
[#864]: https://github.com/JuliaStats/MixedModels.jl/issues/864
707+
[#865]: https://github.com/JuliaStats/MixedModels.jl/issues/865

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MixedModels"
22
uuid = "ff71e718-51f3-5ec2-a782-8ffcbfa3c316"
33
author = ["Phillip Alday <[email protected]>", "Douglas Bates <[email protected]>"]
4-
version = "5.0.3"
4+
version = "5.0.4"
55

66
[deps]
77
Arrow = "69666777-d1a9-59fb-9406-91d4454c9d45"

src/bootstrap.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,11 @@ function StatsBase.confint(
359359
par = filter(collect(propertynames(tbl))) do k
360360
k = string(k)
361361
# σ is missing in models without a dispersion parameter
362-
if k == "σ" && Missing <: eltype(tbl.σ)
362+
= eltype(tbl.σ)
363+
# If inference failed when constructing `tbl.σ`, we can't rely on the element
364+
# type to know whether missing values may be present
365+
if k == "σ" &&
366+
((Tσ === Any && any(ismissing, tbl.σ)) || (Tσ !== Any && Missing <: Tσ))
363367
return false
364368
end
365369
return !startswith(k, 'θ') && k != "obj"

0 commit comments

Comments
 (0)