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
My data consists of four columns, lets say a, b, c, d. Where a and b is categorical data with 3 and 5 categories each. My formula is d = C(a) + C(b) + c and even tried d = 0 + C(a) + C(b) + c but none of them is giving me full-ranked data so that I've all 3 and 5 categories in my final input data. Is there way to force patsy to give me full-ranked data?
The text was updated successfully, but these errors were encountered:
Something like C(a, np.eye(3)) for a variable with 3 levels would get you started. It wouldn't much more work to define a proper coding class that automatically handles different numbers of levels and gives you nicer column names -- search for MyTreat in the docs linked above for an example. And the next step beyond that would be to write up some tests and submit a pull request adding your coding class to patsy itself :-)
My data consists of four columns, lets say
a, b, c, d
. Wherea
andb
is categorical data with 3 and 5 categories each. My formula isd = C(a) + C(b) + c
and even triedd = 0 + C(a) + C(b) + c
but none of them is giving me full-ranked data so that I've all 3 and 5 categories in my final input data. Is there way to force patsy to give me full-ranked data?The text was updated successfully, but these errors were encountered: