Skip to content

ENH ContrastResults #742

Open
Open

Description

@josef-pkt

the ContrastResults for f_test and t_test still look awful

for t_test results we should also get confidence intervals so it matches the params table

>>> tt = res.t_test(cc)
>>> print summary_params((tt, tt.effect, tt.sd, tt.tvalue, tt.pvalue, np.ones((4,2))), yname='slopes', xname=['seg>%d'%ii for ii in range(4)])
==============================================================================
                 coef    std err          t      P>|t|      [95.0% Conf. Int.]
------------------------------------------------------------------------------
seg>0          0.7054      0.059     11.964      0.000         1.000     1.000
seg>1          0.3199      0.089      3.604      0.000         1.000     1.000
seg>2          0.9765      0.062     15.737      0.000         1.000     1.000
seg>3          1.0327      0.076     13.572      0.000         1.000     1.000
==============================================================================
>>> 

update
The table for t_test results has been added in PR #1189

  • add multiple testing p-value correction, see comment below for Stata
    • for the table it would be better to drop the confidence interval and add columns with corrected p-values
    • one usecase: pairwise comparison of levels within a term. (I have experimental version.)

Activity

  1. josef-pkt commented on Oct 29, 2013

    @josef-pkt
    MemberAuthor

    related: I just saw that Stata has an option in postestimation test for multiple testing

    mtest[(opt)] test each condition separately
    with Bonferroni, Holm, Sidak and noadjust

  2. josef-pkt commented on May 19, 2019

    @josef-pkt
    MemberAuthor

    ContrastResults for F/wald_test should have restriction matrix attached

    It's useful to inspect what restriction matrix was actually used.
    Looking at an example from #5741, I am missing the restriction matrix to quickly check the results

  3. josef-pkt commented on Nov 8, 2019

    @josef-pkt
    MemberAuthor

    bump to last comment
    I'm missing it also in t_test

  4. josef-pkt commented on Nov 8, 2019

    @josef-pkt
    MemberAuthor

    update on multiple testing
    t_test_pairwise returns MultiCompResult (which is just a holder class) that includes multiple testing corrected p-values in the summary frame

    This delegates to t_test_multi.t_test_multi which calls t_test and adds the corrected p-values as additional column to the dataframe

  5. josef-pkt commented on Aug 23, 2020

    @josef-pkt
    MemberAuthor

    for t_test we don't include the "r" value in the coef effect.

    I missed this several times. I don't find a specific issue for it.

    right now I would like an affine transformation for effect and confint, and an additional nonzero null value for that affine effect

    e.g. a * params[0] - b = r

    currently we get effect/coef and confint for a * params[0], and t-value, p-value for a * params[0] = r + b

    possible implementation:

    • keep r as currently defined
    • add an effect_shift, or similarly named, keyword to t_test where effect_shift=b, with b=0 by default.

    current usecase is related to prob(x1 > x2) which can be computed as an affine transformation of the mean rank of sample 1, and we want to test whether that prob is equal to 0.5 or another hypothesized value.
    PR #6971
    aside: in GLM it might be possible to work around this by an affine reparameterization that uses offset but that would work only for one restriction, because reparameterization is restriction specific.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions