Skip to content

Commit

Permalink
Add offset to get the offset term from a model (#15)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ararslan authored Jun 6, 2022
1 parent f0921da commit e42a88a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/regressionmodel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,11 @@ function reconstruct end
In-place version of [`reconstruct`](@ref).
"""
function reconstruct! end

"""
offset(model::RegressionModel)
Return the offset used in the model, i.e. the term added to the linear predictor with
known coefficient 1.
"""
function offset end

2 comments on commit e42a88a

@nalimilan
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/61854

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.4.0 -m "<description of version>" e42a88a2141fb25f232d29bb9cabba37e8cfe01c
git push origin v1.4.0

Please sign in to comment.