JuliaStats / GLM.jl

Generalized linear models in Julia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

predict for LinearModel has no offset argument

AsafManela opened this issue · comments

predict for LinearModel does not support an offset argument

GLM.jl/src/lm.jl

Lines 202 to 203 in e835813

function predict(mm::LinearModel, newx::AbstractMatrix;
interval::Union{Symbol,Nothing}=nothing, level::Real = 0.95)

while that of GeneralizedLinearModel does allow (and in fact requires it when the model was fitted with an offset):

GLM.jl/src/glmfit.jl

Lines 422 to 423 in e835813

function predict(mm::AbstractGLM, newX::AbstractMatrix;
offset::FPVector=eltype(newX)[])

I realize it is really simple to add an offset to the result of predict, but the LmResp does have an offset field. Should we add this keyword argument to the predict(::LinearModel,..) too?