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 "weights" parameter to API for lmer #71

Open
sandy1729-swish opened this issue Sep 2, 2020 · 6 comments
Open

Add "weights" parameter to API for lmer #71

sandy1729-swish opened this issue Sep 2, 2020 · 6 comments

Comments

@sandy1729-swish
Copy link

Would it be possible to add access to the weights field in the lmer API?

@ejolly
Copy link
Owner

ejolly commented Sep 4, 2020

Hi @sandy1729-swish can you provide a bit more context for what you mean by the weights field? Model coefficients are accessible via:

model.coef - "population" (top) level estimates
model.fixef - estimates for each group/cluster, i.e. each term after the | in the model formula
model.ranef - deviation estimates for each group, i.e. model.coef - model.fixef

@sandy1729-swish
Copy link
Author

sandy1729-swish commented Sep 7, 2020 via email

@ejolly
Copy link
Owner

ejolly commented Sep 8, 2020

Ah I see thanks for clarifying. At this time I don't have any plans to add that, but can take look if/when I get time. But because it's low on my priority list right now, if it's something you urgently need feel free to open a PR!

@ejolly
Copy link
Owner

ejolly commented Dec 9, 2022

Note: attempted this in #106, but didn't commit a change because it's a bit harder than it looks. Passing a numpy array or list to weights in lmer.lmer doesn't work without some additional conversion for some reason. Will need to take a look later...

@christopherjluke
Copy link

christopherjluke commented Mar 16, 2023

Hey Eshin, I was trying to work through a project that needs to be fit in a Python environment so came across your package but the lme4 model I use requires weights as mentioned. Was wondering if you've had taken a look lately on this? I also tried to find a quick and dirty way to pass weights through lmer.lmer but to no avail.

@ejolly
Copy link
Owner

ejolly commented Mar 16, 2023

Hey @christopherjluke unfortunately I just haven't had time. Apologies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

3 participants