Skip to content

Commit e42a88a

Browse files
authored
Add offset to get the offset term from a model (#15)
Packages like GLM, MixedModels, and (at least theoretically) BetaRegression support offsets for the linear predictor. It would be nice to be able to query that in a unified way. This commit adds a function `offset` that can be extended accordingly.
1 parent f0921da commit e42a88a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/regressionmodel.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,11 @@ function reconstruct end
109109
In-place version of [`reconstruct`](@ref).
110110
"""
111111
function reconstruct! end
112+
113+
"""
114+
offset(model::RegressionModel)
115+
116+
Return the offset used in the model, i.e. the term added to the linear predictor with
117+
known coefficient 1.
118+
"""
119+
function offset end

0 commit comments

Comments
 (0)