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
Test for equality of means
==============================================================================
coef std err t P>|t| [0.025 0.975]
------------------------------------------------------------------------------
subset #1 2.6667 10.929 0.244 0.819 -27.677 33.011
subset #2 66.6667 166.667 0.400 0.710 -396.074 529.408
==============================================================================
Expected
Test for equality of means
==============================================================================
coef std err t P>|t| [0.025 0.975]
------------------------------------------------------------------------------
Age 2.6667 10.929 0.244 0.819 -27.677 33.011
Income 66.6667 166.667 0.400 0.710 -396.074 529.408
==============================================================================
sorry, I'm always getting distracted before replying
The first extension would be to add something like xname as keyword argument in summary, similarly to the results.summary method of the models. (xname was initially used but it's a misnomer)
Second, DescrStatsW will need to store the names before converting to numpy arrays.
Third, creating names for the contrasts needs to take several cases into account because CompareMeans allows broadcasting and the column names do not have to be identical.
e.g. if both column names agree as in the example here, then one name is enough, otherwise we need a combination name like "column1 - column2". (maybe similar to tukey-hsd or pairwise constrast names)
Problem/question
The output of a CompareMeans summary, when pandas DataFrames are inputed, is constituted of rows labels named
"subset #1", ..., "subset #N"
.Wouldn't it be possible to get pandas columns names instead ?
Small exemple:
Code
Output
Expected
Solution ?
Apparently names are generated from that line:
statsmodels/statsmodels/stats/weightstats.py
Line 810 in 0b5cea5
What would be necessary to include columns names ?
ps: statsmodels version: 0.9.0
The text was updated successfully, but these errors were encountered: