-
Notifications
You must be signed in to change notification settings - Fork 48
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
MixedModel Equivalent to GLM's (mod.mm.assign) #661
Comments
What are you trying to accomplish? There is nothing in MixedModels.jl that directly corresponds to |
I'm creating a function to calculate Variance Inflation Factors for the GLM package(JuliaStats/GLM.jl#428). The code I am creating with can also work with Mixed Models. However, to properly assess factored variables, I need something similar to the Thank you for your time and help. |
There is already a VIF implementation for mixed models: https://palday.github.io/MixedModelsExtras.jl/stable/api/#MixedModelsExtras.vif. The implementation there would also work for GLM.jl models with an appropriate method for function termnames(f::FormulaTerm)
# copy body from MixedModelsExtras.jl
end
termnames(model::RegressionModel) = termnames(formula(model)) and cc: @kleinschmidt and @nalimilan |
Oops, sorry for not realizing that we had discussed this before. For some reason GitHub didn't add a link to JuliaStats/StatsBase.jl#698 at JuliaStats/GLM.jl#428, despite the mention. @HiramTheHero Is the implementation in MixedModelsExtras similar to what you wanted to do based on the car R package? Anyway it seems we should add empty function definitions to StatsAPI, and |
The In the example below, my function is just the
Just to input my 2 cents on the matter. Whatever is used going forward, I would suggest either implementing one function that calculates a VIF or GVIF based on the if a model contains factored variables or not, or have explicit warnings to use |
OK, great. Maybe we could have I don't like the approach of printing warnings when |
@nalimilan I have a slight preference to have As currently implemented, |
I think the MixedModels portion of this is complete and the necessary stubs have been upstreamed to StatsAPI/StatsModels. Anything else is a GLM.jl issue, so I'm closing this. 😄 |
How can I derive an equivalent output of a MixedModel like GLM's model.mm.assign property?
I'm having a hard time finding it in the documentation and source code. I apologize if the solution is rather simple.
Thank you.
The text was updated successfully, but these errors were encountered: