Skip to content

ENH: allow to plot OR or RR instead of logOR and logRR with plot_forest #7771

Closed

Description

@sbwiecko

With statsmodels.stats.meta_analysis effectsize_2proportions, we get the log odds ratio or log risk ratio when use the corresponding statistic option, and we can get the OR and RR, as well as their corresponding CI, by using exp
np.exp(res_eyding.summary_frame())
But we cannot plot the OR or RR with plot_forest.

Activity

  1. josef-pkt commented on Oct 1, 2021

    @josef-pkt
    Member

    good idea

    Just changing the plot would only be one line (or 3 total)

    (I just saw that we don't specify a plot title. That seems to be currently up to the user.
    AFAICS, the plot doesn't specify which effect size is used.)

  2. josef-pkt commented on Oct 1, 2021

    @josef-pkt
    Member

    What would be a good name for an option in plot_forest?
    use_exp=False
    anti-log or reverse log would be descriptive names

    Stats uses eform to convert log-or and similar
    #2235 my "eform" function only uses generic names like transform

    another missing:
    the plot_forest doesn't have alpha=0.05, use_t=None to forward options to summary_frame method

  3. sbwiecko commented on Oct 1, 2021

    @sbwiecko
    Author

    use_exp=False makes a lot of sense

    for the plot title, xlabels etc, it's no big deal we can always use plt.gca().set_title('blabla')

  4. josef-pkt commented on Oct 1, 2021

    @josef-pkt
    Member

    question while I'm checking the unit tests:
    is res.use_t True for the combine results with log-or and similar proportion effect sizes?

    I get a warning in the unit test, that use_t=True needs nobs

  5. josef-pkt commented on Oct 1, 2021

    @josef-pkt
    Member

    PR is #7772

  6. josef-pkt commented on Oct 1, 2021

    @josef-pkt
    Member

    In the unit test case the "or" plot doesn't look so good, because there are one or two large outliers.
    But it looks correct visually.

    image

  7. changed the title [-]allow to plot OR or RR instead of logOR and logRR with `plot_forest`[/-] [+]ENH: allow to plot OR or RR instead of logOR and logRR with `plot_forest`[/+] on Oct 30, 2021
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