pythonstatsmodelsmanova

MANOVA using stats models


I'm looking for an example of a statsmodels MANOVA implementation. I can't make heads or tails of the Statsmodels website for MANOVA. I've gotten as far as:

endog, exog = np.asarray(pre_post[feats_list]), np.asarray(pre_post[features])
man = sm.MANOVA(endog,exog).fit()

But with .fit() I get an error:

NotImplementedError: 

If I put any kind of input into .fit(), it tells me there are too many arguments.

TypeError: fit() takes 1 positional argument but 2 were given

I did read this post and managed to replicate the same error with

man = sm.MANOVA(endog,exog)
man.mv_test()

But it doesn't seem like there was ever a resolution there either.

I know it's kind of basic in terms of a programming question, but I would be indebted to anyone who can provide any insight on how to get MANOVA working and how to get the results out of the model after its been fit. It doesn't seem to be a popular package in Python and I can't find any examples online. Many thanks.


Solution

  • I just spent about an hour understanding their documentation. Managed to get my data in the correct format, just to get a NotImplementedError... The module is not implemented yet, though it pretends it is..

    Added in edit: Check out statsmodels glm. It can be used very similarly. Here are the docs.