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

Check all variables in Patsy interaction term in estimate_coefficient method #262

Open
christopher-wild opened this issue Feb 13, 2024 · 2 comments · Fixed by #264
Open
Assignees

Comments

@christopher-wild
Copy link
Contributor

Describe the bug
If multiple variables are present in an interaction term (i.e. self.treatment = 'variable1:variable2'), each variable needs to be checked to be a type object. This is not currently implemented as it is not known how to return a list of variables from a Patsy formula neatly.

Additional context
First look into if Patsy can return a list of variables somehow, if not manual string splitting and iterating over them.

@christopher-wild christopher-wild self-assigned this Feb 13, 2024
@christopher-wild christopher-wild linked a pull request Feb 14, 2024 that will close this issue
@jmafoster1
Copy link
Contributor

I tried to run this with a more complex interaction term driving_score ~ I(completion_score * (1 - outside_route_lanes)) and it doesn't like it because the I basically just puts everything inside it into a block, so patsy doesn't recognise to pull out completion_score and outside_route_lanes as terms. It just has I(completion_score * (1 - outside_route_lanes)).

@christopher-wild
Copy link
Contributor Author

Not closed with #264, PR changed scope

@jmafoster1 jmafoster1 mentioned this issue Sep 11, 2024
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 a pull request may close this issue.

2 participants