You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this great package. I wondered if you had any way to specify zero inflation covariates, like the r formula: "y ~x1 + x2| x1", and x1 is used for covariates only on the zero inflation model. I have been trying it with patsy but I get an error patsy.PatsyError: Error evaluating factor: TypeError: unsupported operand type(s) for |: 'str' and 'str' counts ~1 + tree | tree
Thanks in advance,
Bastien
The text was updated successfully, but these errors were encountered:
I think handling zero-inflation is more in the realm of the libraries built on top of design matrix builders. For example, if developers of library decide to support some custom syntax to specify covariates used for certain parts of a model, it's up to those devs to implement what's needed to support those custom cases.
Model formulas are extremely flexible and that means the same operator does not mean the same in all cases. The pipe operator | is a great example. In lme4 (in R) and Bambi (in Python) it's used for specifying random effects. In what you mention, it is used to specify zero-inflation. And in other libraries I've seen other use cases.
Oh, and finally, patsy is no longer under active development. I recommend you have a look at Formulaic
Hello,
Thanks for this great package. I wondered if you had any way to specify zero inflation covariates, like the r formula: "y ~x1 + x2| x1", and x1 is used for covariates only on the zero inflation model. I have been trying it with patsy but I get an error
patsy.PatsyError: Error evaluating factor: TypeError: unsupported operand type(s) for |: 'str' and 'str' counts ~1 + tree | tree
Thanks in advance,
Bastien
The text was updated successfully, but these errors were encountered: