Announcement

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

  • metan - a replacement for dp(#) - how to set the number of decimal places in output?

    Hello all,
    I am using metan in Stata/SE 14.1.

    Previously, there was an option dp(#) that allowed the user to specify the number of decimal places displayed for the effect size in the forest plot. This does not appear to work now, nor can i find an alternative in output_options or forest_plot_options.

    For example:
    metan percentage lcl ucl, by(group) xlab(0,20,40,60,80,100) dp(1)

    returns:
    r(198); "option dp() not allowed"


    I see that as recently as June 2015 users of Stata 12.1 were still able to use dp(#) successfully.
    http://www.statalist.org/forums/forum/general-stata-discussion/general/1299384-metan-command-risk-differences-with-whole-numbers

    Am I doing something wrong? Have I missed something? Is there a work-around?

    Thank you.

  • #2
    Glancing at the source code, it does seem to accept the dp() option. Make sure you have the most current version (which metan). Version 3.04 seems to allow that option. Have you tried dp(3) as in the previous post? Can you provide example data to reproduce your results? [please use the dataex program per the FAQ; ssc install dataex then help dataex].
    Stata/MP 14.1 (64-bit x86-64)
    Revision 19 May 2016
    Win 8.1

    Comment


    • #3
      Dear all,

      I'm writing with a similar question on this relatively older post. I'm using -metan- in Stata 15.1, and have generated a forest plot where all the estimates and CI estimates have numbers to the hundredths place; I would prefer tenths place only. Therefore, I am searching for a dp(#) option, but can find none.

      Typing which metan shows that I apparently have metan 3.03 (19May2009). However, typing update all yields the message that all files are up to date. I do not know how to update -metan- to v 3.04, which apparently has the dp(#)option, without using the update function.

      Is anyone able to offer guidance? I know there are several other metan-like commands with which I am not familiar--if one of these commands would also solve my problem, please let me know.

      Many thanks in advance for your help,
      Maria

      Comment


      • #4
        Dear Maria,

        I can confirm that -metan- v3.04 accepts the dp(#) option, and displays it correctly in the forest plot. However, I am unsure as to why you are unable to update from 3.03.

        Of the "other metan-like commands", I would like to recommend -admetan- (ssc install admetan; conflict of interest statement: I am its author!). I have designed it to resemble the syntax of -metan- wherever possible, so hopefully you will be able to "translate" your existing command without too much difficulty. Note in particular that options relating specifically to the forest plot (such as dp(#)) must be supplied as sub-options to the forestplot(...) option rather than directly to -admetan-.

        I hope it works out for you!

        Best wishes,

        David.



        Comment


        • #5
          Dear David,
          I'm a new STATA user and I'm trying to do a forest plot with -admetan- function starting from my own odds ratio and CI.
          In the graph I obtained (attached) the column OR (95% CI) shows only two decimals I think it's due to the fact that the variable _EFFECT has Type: str17 and format: %-17s.
          I would like to see three decimals in OR and in the confidence limits.

          Below you can see my proc :

          admetan B LNLower LNUpper,by (Var_New) rcols(pvalue) study(A) eform effect(OR) ///
          nowt nooverall keeporder keepall forest(hetstat(p) leftj) saving(ekwon, replace) nograph
          use ekwon, clear
          label var _LABELS `"`"{bf:Independent}"' `"{bf:Factors}"'"'
          replace _LABELS = `"{bf:"' + _LABELS + `"}"' if _USE==0

          forestplot, nosubgroup nobox useopts spacing(4) aspect(1) favours(Decreased Risk # Increased Risk) xlabel(1) nostats nowt rcols(_EFFECT pvalue)

          Thank you in advance for your help!
          Elena
          Attached Files

          Comment


          • #6
            Dear Elena,

            You should be able to get three decimals by adding the option dp(3) to your admetan command as a forest()suboption. That is:

            Code:
            admetan B LNLower LNUpper, by(Var_New) rcols(pvalue) study(A) eform effect(OR) ///
            nowt nooverall keeporder keepall forest(hetstat(p) leftj dp(3)) saving(ekwon, replace) nograph
            Best wishes,

            David.

            Comment

            Working...
            X