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

feat: add lmm to synthetic experiments #20

Merged
merged 6 commits into from
Apr 1, 2024

Conversation

younesStrittmatter
Copy link
Contributor

Description

add linear mixed model synthetic runner

Type of change

  • feat: A new feature

# Process each part of the random effect (intercept and slopes)
for part in random_effects_.split('+'):
part = part.strip()
std_dev = random_effects[group_var].get(part, 0.5)
Copy link
Contributor

@chadcwilliams chadcwilliams Dec 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a bug here.

In the formula, you correctly define the intercept as 1, but then in your examples you define the intercept as Intercept.

For example,
formula = 'rt ~ 1 + (1|subject) + x1'
random_effects = {'subject': {'Intercept': .1}}

This line of code is looking for the key 1 in the random_effects dictionary, which does not exist. I am submitting a PR with a quick fix for this.

Copy link
Contributor

@chadcwilliams chadcwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a comment about a small bug in this, and have created a PR that fixes the bug.

younesStrittmatter and others added 2 commits December 13, 2023 19:29
…el-to-abstract-CW

19 feat add linear mixed model to abstract cw
Copy link
Member

@hollandjg hollandjg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Contributor

@benwandrew benwandrew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@chadcwilliams chadcwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems great!

@younesStrittmatter younesStrittmatter merged commit 3337a4b into main Apr 1, 2024
12 checks passed
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

Successfully merging this pull request may close these issues.

feat: add linear mixed model to abstract
4 participants