jzluo / firthlogist

A Python implementation of Firth Logistic Regression
MIT License
5 stars 3 forks source link

Interaction terms #16

Closed Hoeze closed 1 year ago

Hoeze commented 1 year ago

Hi, I would like to test the significance of a variable with an interaction term as covariate: trait ~ sex:age + variable_to_test Can I do this with your library @jzluo?

jzluo commented 1 year ago

Hi @Hoeze, this would have to done in the data preparation just like sklearn. Say you have a dataframe df with columns trait, sex, age, variable_to_test. Two simple examples:

Let me know if it works for you!