Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add custom summary to types in GLM.jl #469

Open
bkamins opened this issue Feb 9, 2022 · 2 comments
Open

add custom summary to types in GLM.jl #469

bkamins opened this issue Feb 9, 2022 · 2 comments

Comments

@bkamins
Copy link
Contributor

bkamins commented Feb 9, 2022

Example:

julia> model = lm(@formula(y ~ x), dataset)
StatsModels.TableRegressionModel{LinearModel{GLM.LmResp{Vector{Float64}},
 GLM.DensePredChol{Float64, LinearAlgebra.CholeskyPivoted{Float64,
 Matrix{Float64}}}}, Matrix{Float64}}

y ~ 1 + x

Coefficients:
───────────────────────────────────────────────────────────────────────
                Coef.  Std. Error     t  Pr(>|t|)  Lower 95%  Upper 95%
───────────────────────────────────────────────────────────────────────
(Intercept)  3.00009     1.12475   2.67    0.0257   0.455737   5.54444
x            0.500091    0.117906  4.24    0.0022   0.23337    0.766812
───────────────────────────────────────────────────────────────────────

Users are overwhelmed and confused about the meaning of

StatsModels.TableRegressionModel{LinearModel{GLM.LmResp{Vector{Float64}},
 GLM.DensePredChol{Float64, LinearAlgebra.CholeskyPivoted{Float64,
 Matrix{Float64}}}}, Matrix{Float64}}

part.

I am not sure what naming convention would be best as I do not know the exact type hierarchy in StatsModels.jl and GLM.jl, but maybe just omitting printing type parameters would be enough?

@nalimilan
Copy link
Member

Yes, we could probably just print TableRegressionModel{LinearModel}. And the day we get rid of TableRegressionModel this will just be LinearModel.

For GLMs, it would be useful to print something like TableRegressionModel{GeneralizedLinearModel} with Binomial family and ProbitLink.

@bkamins
Copy link
Contributor Author

bkamins commented Feb 11, 2022

@nalimilan - do you know the type hierarchy well enough to make this PR easily (I can look into it but I would need to learn GLM.jl and StatsModels.jl internals 😄)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants