我正在学习Manova,我想用statsmodels和我的数据对其进行测试。这里是我的数据示例:
data.head():
length nb_info text_lengths pourcents density ages sex speakers
0 1103 4 676917 0.000000 3.626473 adulte H Aven
1 2002 8 676917 0.764495 3.996004 adulte H Aven
2 1342 6 676917 1.060248 4.470939 adulte H Aven
3 1465 8 676917 1.306807 5.460751 adulte H Aven
4 925 4 676917 1.531502 4.324324 adulte H Aven
from statsmodels.multivariate.manova import MANOVA
feats_list = ['length', 'nb_info']
var_list = ['ages', 'sex']
endog, exog = np.asarray(df[feats_list]), np.asarray(df[var_list])
manov = MANOVA(endog, exog)
manov.mv_test()
此代码返回:
TypeError:--'str'和'str'的不受支持的操作数类型
知道我做错了什么吗?