Announcement

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

  • #16
    Originally posted by Alexander Rodriguez View Post
    Dear All,
    It has been really useful following this thread here.

    My question is to David Fisher I wrote to you about my experience with ipdover a while back but I am wondering if you can advise me on metan.

    Is there a way to have the forest plot include both the effect size and 95%CI (the default) as well as the raw counts for the outcome?

    This is useful for my analysis because I am using the command to analyse binary data in a 2x2 table for example:

    metan outcome_exposure no_outcome_exposure outcome_control no_outcome_control, or random xlab(0.1, 0.5, 1, 5, 10) label(namevar= study_id, yearvar=year)

    Can a further 2 columns be added to the forest plot which would have the outcome/no_outcome for exposure and control groups?

    Many thanks,
    Alexander
    I solved it all!

    I was referred to admetan in which the help file included an example that included counts in the command line and now my problem is solved.

    So for reference my command looks like metan outcome_exposure no_outcome_exposure outcome_control no_outcome_control, or random xlab(0.1, 0.5, 1, 5, 10) label(namevar= study_id, yearvar=year) counts
    Many thanks,
    Alexander
    (Stata v14.2 IC for Mac)

    Comment


    • #17
      Alexander,

      You can add other information to the forest plot on the left side of the forest plot using the -lcols()- option or on the right side using the -rcols()- option of metan.

      If you have a variable containing the raw counts, you can just include that variable in a left or right column.

      Red Owl
      Stata/IC 15, Windows 10 (64-bit)

      Comment


      • #18
        Hi Alexander,

        Apologies for not responding -- I realised just today that I hadn't checked on Statalist for quite some time! Glad you were able to figure it out. As you found, the "counts" option was also available in "metan" and I simply copied it across.

        As Red Owl points out, though, a fall-back option would be to create such a variable yourself (e.g. using the string() function) and add it to either lcols() or rcols(). I have also sometimes needed to remove the effect size and 95% CI (using the nostats option) and replace it with my own string variable.

        Best wishes,

        David.

        Comment


        • #19
          Dear all
          I'm using the following command to draw a forrest plot

          admetan ln_RTTR lnlci lnuci if after2000 != 0, eform effect(RTTR) random lcols(Study ages years)

          which is finally exactly how I want (thanks to this thread!) EXCEPT I would like to have x label at 0.25 0.5 1 2 3 4 rather than the 0.25 and 4 which are coming by default. I have tried the following and various other itterations with no luck

          admetan ln_RTTR lnlci lnuci if after2000 != 0, eform effect(RTTR) random lcols(Study ages years) xlabel(0.25 0.5 1 2 3 4)

          can anyone spot what I'm doing wrong?

          many thanks
          Cathy

          Comment


          • #20
            Hi Cathy,

            "...with no luck" is a bit vague, but I'm guessing that when you included the xlabel() option in your second example, you received the error "option xlabel() not allowed"?

            If so, try the following:

            Code:
            admetan ln_RTTR lnlci lnuci if after2000 != 0, eform effect(RTTR) random lcols(Study ages years) forestplot(xlabel(0.25 0.5 1 2 3 4))
            Unlike with metan, admetan requires that certain options, which are only of relevance to the graph itself, be supplied as suboptions to forestplot() rather than as options in their own right.

            Hope that helps,

            David.

            Comment


            • #21
              Thank you so much David! it worked!
              many thanks, it looks great

              Comment


              • #22



                sorry one more question, here is my code and plot is hopefully attached. In my forest plot I would like to have "population based studies" above "administrative based studies" (variable studysort), I have tried sorting the data by studysort which works in metan but it doesnt make a difference. do i need to create a new byte variable of studytype to reorder or is there a code i can use if i dont want it to be alphabetical? many thanks

                admetan ln_RTTR lnlci lnuci, eform effect(RTTR) random lcols(Study ages years) by(studysort) forestplot(xlabel(0.25 0.5 1 1.5 3))





                Attached Files

                Comment


                • #23
                  Hi Cathy,

                  Is studysort a string variable? If so, the best thing to do would be to encode it, such that e.g. 1 = Population-based and 2 = Administrative-based. Then admetan will sort by the numeric values, but display the labels; so giving you what you want:

                  Code:
                  label define studytype 1 "POPULATION BASED" 2 "ADMINISTRATIVE BASED"
                  encode studysort, gen(studytype) label(studytype)
                  admetan ln_RTTR lnlci lnuci, eform effect(RTTR) random lcols(Study ages years) by(studytype) forestplot(xlabel(0.25 0.5 1 1.5 3))
                  Best wishes,

                  David.

                  Comment


                  • #24
                    thanks David that did the job!
                    final (hopefully) query!
                    is there a way of displaying the standard error of the pooled result rather than just the CI? (either in the forest plot or the tables)
                    many thanks for great package
                    Cathy

                    Comment


                    • #25
                      Hi Cathy,
                      Not directly, no. The standard error is returned as r(se_eff), so it's accessible enough; but displaying it in the forest plot would require using the saving() option to forestplot and manipulating the saved dataset. (An example of using a saved dataset is given in the admetan help file; it's the example which begins "User has analysed data with a non-standard technique...".)
                      Hope that helps,
                      David.

                      Comment


                      • #26
                        Hi @David Fisher (or anyone else that might be able to help me)

                        I'm new to Stata.
                        I've developed a forest plot using:
                        ipdmetan intinj intnon coninj connon , or study( id ) by(group) forest(favours(Favours treatment # Favours control) box1opts(mcolor(black))) nooverall random

                        I would like to do 2 things:
                        1) remove the 'subgroup' line under each of my subgroups
                        2) reduce my scale on my x axis. It's currently .0005 - 25000. I'd like it to be .0005 - 100.

                        I've tried to follow xlab instructions above but it's not working for me.

                        Many thanks

                        Erin

                        Comment


                        • #27
                          Hi Erin,

                          1) Do you mean the subgroup-specific diamonds? If so, they may be removed with the "nosubgroup" option. However, you're then doing no pooling of data, so there'd be no need for random-effects. Have I misunderstood?

                          2) What happened when you tried to use xlabel()? Do any of your confidence intervals exceed 100? If so, you'll need to use either the "force" sub-option to xlabel, or the additional range() option. In other words, try either:

                          Code:
                          ipdmetan intinj intnon coninj connon, or study(id) by(group) random nooverall forest(favours(Favours treatment # Favours control) box1opts(mcolor(black)) xlabel(.0005 100, force))
                          or

                          Code:
                          ipdmetan intinj intnon coninj connon, or study(id) by(group) random nooverall forest(favours(Favours treatment # Favours control) box1opts(mcolor(black)) xlabel(.0005 100) range(.0005 100))
                          These options, and also the cirange() option, will give your plot slightly different appearances. Hopefully one of them does the job!

                          Thanks,

                          David.

                          Comment


                          • #28
                            Thank you so much David. It's perfect!
                            I'm unable to do meta-analysis due to heterogeneity but I still wanted to present my findings using a forest plot.

                            Much appreciated!

                            Erin

                            Comment


                            • #29
                              Hi David

                              I'm now having difficulty with my funnel plot.
                              I've used the following command:

                              metafunnel _ES _seES, xtitle(Effect size) ytitle(Standard error of effect size)

                              I would now like to label my markers and make them different shapes for my subgroups.

                              I have tried:
                              metafunnel _ES _seES, xtitle(Effect size) ytitle(Standard error of effect size) mlabel(id)

                              and get the following message:
                              Note: default data input format (theta, se_theta) assumed.
                              option mlabel() not allowed
                              r(198);

                              Thanks for your help

                              Erin

                              Comment


                              • #30
                                Hi Erin,

                                I'm not too familiar with metafunnel, I'm afraid. But a quick investigation reveals that the latest SSC version of the package (version 1.0.2, dated 18 August 2003) gives you the error you saw; whereas the Stata Journal version (v1.4.0, dated 21 May 2004) does not. Hence, it appears that the authors updated the package for the Stata Journal but did not update it on SSC. If you type "which metafunnel" into the Stata command box, you will see which version you have installed.

                                I would suggest you uninstall the SSC version (type "ssc uninstall metafunnel") and then type "findit metafunnel" and scroll down until you see the tag "st0061"; then click through and install. This should give you the 2004 version, and your code should then run successfully.

                                Note that there is also the similar command confunnel which includes contour shading. This is a more recent package, dated 2008 ... but again, there are problems with using the mlabel() option!! If you wish to use this command (discoverable using "findit confunnel"), you will need to use the following syntax:

                                Code:
                                confunnel _ES _seES, xtitle(Effect size) ytitle(Standard error of effect size) scatteropts(mlabel(id) mlabcol(black))
                                Hope that helps,

                                David.

                                Last edited by David Fisher; 31 Jan 2018, 05:13. Reason: fixed typo

                                Comment

                                Working...
                                X