Skip to content

Commit

Permalink
another type restriction
Browse files Browse the repository at this point in the history
  • Loading branch information
palday committed Jun 24, 2024
1 parent 1bab6e7 commit 2a190e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/linearmixedmodel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@ function varest(m::LinearMixedModel)
return isnothing(m.optsum.sigma) ? pwrss(m) / ssqdenom(m) : m.optsum.sigma
end

function StatsAPI.weights(m::LinearMixedModel)
function StatsAPI.weights(m::LinearMixedModel{T}) where {T}
rtwts = m.sqrtwts
return isempty(rtwts) ? ones(eltype(rtwts), nobs(m)) : abs2.(rtwts)
return isempty(rtwts) ? ones(T, nobs(m)) : abs2.(rtwts)
end

0 comments on commit 2a190e3

Please sign in to comment.