Skip to content

Results.t_test allow one sided option #1193

Open

Description

@josef-pkt

t_test currently doesn't allow a choice for one-sided tests.

see stats.weightstats for options for a t-test

does TOST make sense for a regression based hypothesis (multivariate parameter)?

Can we extend wald_test to allow some one-sided hypothesis?
Not sure, I skipped reading the literature on testing inequalities in regression or MLE models so far.

Activity

  1. jseabold commented on Apr 16, 2014

    @jseabold
    Member

    This came up in the talk I gave last week as well.

  2. josef-pkt commented on Feb 25, 2020

    @josef-pkt
    MemberAuthor

    One sided hypothesis test requires that patsy doesn't change sides when computing the constraint, if it is given as a string.

    I never checked that because it is mostly irrelevant for two-sided tests

    AFAIR, it's the first time this is requested on stackoverflow
    https://stackoverflow.com/questions/60391944/left-side-pvalue-for-linear-regressions-constant-in-statsmodel

  3. josef-pkt commented on Oct 29, 2024

    @josef-pkt
    MemberAuthor

    bump

    needs checking if we can add tost, nonequivalence/minimum effect test
    assuming local behavior, i.e. use wald statistics (params and cov_params).

    for one restriction to be tested:
    possible variation use one-step dpararms to recompute statistics test statistics.
    That might be similar to score test but only with one-step parameter adjustment instead of full estimation under restrictions.

    relationship to score confidence intervals?
    I guess we can base rejection decision on whether score confidence interval is within the hypothesis margin(s).
    However, score confidence interval requires line search, while pvalue for specific margin requires only one adjusted or re-estimated params.

    update:
    we have a hidden helper functions to compute one-step approximation to impose constraints on params.
    #1668 (comment)
    base._constraints.transform_params_constraint

  4. josef-pkt commented on Nov 1, 2024

    @josef-pkt
    MemberAuthor

    https://stats.stackexchange.com/questions/656518/comparing-logistic-regression-coefficients

    a longer question where some of it requires one-sided test like non-inferiority, or superiority with a margin.

    answer points out that we can use confidence intervals to check whether non-inferiority or equivalence holds and null is rejected.

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