Skip to content

Commit 520162c

Browse files
committed
Add linearpredictor and linearpredictor!
1 parent e42a88a commit 520162c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/regressionmodel.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,18 @@ Return the offset used in the model, i.e. the term added to the linear predictor
117117
known coefficient 1.
118118
"""
119119
function offset end
120+
121+
"""
122+
linearpredictor(model::RegressionModel)
123+
124+
Return the model's linear predictor, `Xβ` where `X` is the model matrix and `β` is the
125+
vector of coefficients, or `Xβ + offset` if the model was fit with an offset.
126+
"""
127+
function linearpredictor end
128+
129+
"""
130+
linearpredictor!(storage, model::RegressionModel)
131+
132+
In-place version of [`linearpredictor`](@ref), storing the result in `storage`.
133+
"""
134+
function linearpredictor! end

0 commit comments

Comments
 (0)