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

Stop relying on TableRegressionModel #128

Open
nalimilan opened this issue Sep 11, 2022 · 1 comment
Open

Stop relying on TableRegressionModel #128

nalimilan opened this issue Sep 11, 2022 · 1 comment

Comments

@nalimilan
Copy link

We're going to stop using TableRegressionModel in GLM.jl (JuliaStats/GLM.jl#339) as it's really not convenient for users to have that wrapper instead of just working with LinearModel and GeneralizedLinearModel. TableRegressionModel will probably be deprecated soon in StatsModels.

I see that RegressionTables.jl is one of the few packages that use TableRegressionModel. In particular standardized coefficients are only supported for these models:

if standardize_coef && isa(rr[resultIndex],StatsModels.TableRegressionModel)
thiscoef = [ thiscoef[i]*std(rr[resultIndex].model.pp.X[:,i])/std(rr[resultIndex].model.rr.y) for i in 1:length(thiscoef) ]

IIUC, you use this to detect that some models are GLM.jl objects and access their private fields. I suspect you could achieve the same result for any model (not just GLM) by calling modelmatrix and response instead. Can you confirm this? It would be too bad to lose support for GLM.jl in RegressionTables.jl.

@jmboehm
Copy link
Owner

jmboehm commented Sep 11, 2022

Yes, I've been meaning for a while to write this in a more general way. In any case I'll make sure that GLM.jl will always be supported.

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