Skip to content

Commit

Permalink
Blue style
Browse files Browse the repository at this point in the history
  • Loading branch information
palday committed Aug 24, 2021
1 parent 526dd95 commit 05e8311
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/linearmixedmodel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ function condVar(m::LinearMixedModel{T}, fname) where {T}
Lblk = LowerTriangular(densify(sparseL(m; fname=fname)))
blk = findfirst(isequal(fname), fnames(m))
λt = Array(m.λ[blk]') .* sdest(m)
vsz = size(λt, 2)
vsz = size(λt, 2)
= length(m.reterms[blk].levels)
val = Array{T}(undef, (vsz, vsz, ℓ))
scratch = Matrix{T}(undef, (size(Lblk, 1), vsz))
Expand All @@ -329,9 +329,9 @@ function condVar(m::LinearMixedModel{T}, fname) where {T}
ldiv!(Lblk, scratch)
mul!(view(val, :, :, b), scratch', scratch)
end
val
return val
end

function _cvtbl(arr::Array{T,3}, trm) where {T}
return merge(
NamedTuple{(fname(trm),)}((trm.levels,)),
Expand Down Expand Up @@ -1005,9 +1005,7 @@ are to be included.
to `fname` are dropped. The default is the first, i.e., leftmost block and hence all blocks.
"""
function sparseL(
m::LinearMixedModel{T};
fname::Symbol=first(fnames(m)),
full::Bool=false,
m::LinearMixedModel{T}; fname::Symbol=first(fnames(m)), full::Bool=false
) where {T}
L, reterms = m.L, m.reterms
sblk = findfirst(isequal(fname), fnames(m))
Expand Down

0 comments on commit 05e8311

Please sign in to comment.