Skip to content

Commit 12262e5

Browse files
committed
slightly more efficient
1 parent f9bc08a commit 12262e5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/predict.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ end
8888

8989
function StatsAPI.predict(m::GeneralizedLinearMixedModel; type=:response)
9090
type in (:linpred, :response) || throw(ArgumentError("Invalid value for type: $(type)"))
91-
y = fitted(m)
92-
type == :response ? y : broadcast!(Base.Fix1(linkfun, Link(m)), y, y)
91+
type == :response ? fitted(m) : m.resp.eta
9392
return y
9493
end
9594

0 commit comments

Comments
 (0)