Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Admetan

    Hi Statalist

    I am using admetan to make a forest plot (not interested in the meta analysis aspect). My code so far is:

    Code:
    admetan Hazard_ratio Lower_CI Upper_CI,  ///
    nooverall ///
    nosubgroup ///
    study(Analysis_name) ///
    by(Order) ///
    forestplot(xlab(0.4 1.8)) ///
    nowt ///
    effect (Hazard ratio)
    This however gives a "line" that runs through 0. As I'm working with HR I would like it to run through 1. I tried to used
    Code:
    null(0)
    however this is not recognised - is there a different solution?

    I would also like to remove the grey square around the diamond if possible?
    I have attached a screenshot but no data:
    Click image for larger version

Name:	Skærmbillede 2022-08-26 kl. 15.39.30.png
Views:	1
Size:	22.8 KB
ID:	1679428



  • #2
    Any suggestions?

    Comment


    • #3
      Please, don't attach screenshots (at all, ideally), and please do attach your data. You're asked to specify that you're using user written commands.

      Anyways, there are a few problems here. One, you seem to wanna use a blowtorch to grill brisket. You can use it, but it might be a little overkill and might not be worth the effort. If you're not interested in the meta-analysis and you just want the cool looking graph, my recommendation is that you use coefplot, the user written command by Ben Jann from ssc.

      Second, the command's help file you're using says
      NOTE: As of November 2020, this command is no longer maintained. Please use the latest version of metan instead.
      So instead of using this command, we'll use metan.

      Code:
      use http://fmwww.bc.edu/repec/bocode/m/metan_example_data, clear
      
      cls
      metan OR ORlci ORuci, label(namevar=id) wgt(bweight) ///
                      model( 0.924 0.753 1.095, label(Bayesian) extralabel(param V=3.86, p=0.012) ) ///
                      forestplot( xlabel(0.25 0.5 1 2 4, force) null(4) scheme(white_tableau) diamopts(fcol(none)) ) ///
              pointopt( msymbol(square) mcolor(cyan)) boxopt( mcolor(cyan))
      This gives me a reference line at 4, and cyan boxes. You may adjust these options as is convenient for you. oh, and also, please, for pretty much every question you ask, give a data example using dataex so that we can reproduce your errors, it's super hard to give helpful feedback when this along with code isn't provided. Morten Hans Jensen

      Comment

      Working...
      X