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

Nonlinear operations on treatment #193

Open
jmafoster1 opened this issue May 31, 2023 · 0 comments
Open

Nonlinear operations on treatment #193

jmafoster1 opened this issue May 31, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@jmafoster1
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Having implemented the ability to pass in custom regression equations, I'm now at a point where I'd like to look at "nonlinear" operators such as powers, logs, etc. This works great for things which aren't the treatment variable, but it doesn't like it when you try to do things with the treatment variable (e.g. give it a log relationship) because the exact treatment variable name "X" isn't in the model to look up. "log(x)" is in the model, but there doesn't seem to be an easy way to relate the two such that you can tell it to go and look up "log(X)" instead.

There's a couple of solutions that could work here.

  1. Have a preprocessing function similar, to how we populate metavariables, that takes a dataframe and transforms it while keeping the column headings the same. This would be straightforward to implement but somehow feels inelegant and might be cumbersome to use.
  2. Have a backend which automatically creates the mapping between straight variable names and nonlinear operations over them. Or we could just pass in a function which defines this mapping. This would be easier to use, but would rely on only one term involving the treatment variable.
@f-allian f-allian added the enhancement New feature or request label Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants