Announcement

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

  • #31
    Thank you for this, it has been helpful. What does the shaded areas around the OR on the forest plot mean and how can I remove them? Graph1.gph

    Comment


    • #32
      Hi Betty,
      The shaded areas represent the relative weight each individual study (i.e. row of the forestplot) contributes to the overall (pooled) effect.
      I notice that in your forestplot there is no pooled effect, and by the look of your labels I'd guess you're not, in fact, performing a (statistical) meta-analysis. Could you tell me what command line you used to create your plot? Removing the shaded areas is simple, but the best advice might depend upon your specific circumstances.
      Thanks,
      David.

      Comment


      • #33
        Dear Fisher,

        Thank you for your response.

        Below is the command line:

        admetan Odds_ratio lower upper, study(study_id) notable nowt nooverall forestplot(favours(Decreased odds#Increased odds) xlabel(0 0.2 0.4 0.6 0.8 1 1.5 2 2.5 3 4 5 6) null(1)) ///
        lcols(Factor noofstudy) effect(OR) rcols(cpvalue)

        My main aim is to plot the effect sizes of different predictors on various outcomes.

        Thank you!

        Comment


        • #34
          Hi Betty,

          Great, thanks for the code.

          Firstly, I notice you are plotting odds ratios, but are not using a log scale. This is unusual, as it results in asymmetrical confidence intervals on your plot, and may make it harder to interpret. I'll assume you want to use a log scale to begin with.

          Since you are not doing any pooling of results, there is no need to use admetan; you can just use forestplot directly.
          In this case, to answer your original question, the shaded boxes are removed using the nobox option to forestplot. An example command line might be:

          Code:
          gen logOdds_ratio = ln(Odds_ratio)
          gen loglower = ln(lower)
          gen logupper = ln(upper)
          
          forestplot logOdds_ratio loglower logupper, labels(study_id) or nowt nobox favours(Decreased odds#Increased odds) lcols(Factor noofstudy) rcols(cpvalue) leftjustify

          If you want to keep your original "linear" (non-log) scaling, an example command line might be:

          Code:
          forestplot Odds_ratio lower upper, labels(study_id) effect(OR) xlabel(0 0.2 0.4 0.6 0.8 1 1.5 2 2.5 3 4 5 6) null(1) ///
              nowt nobox favours(Decreased odds#Increased odds) lcols(Factor noofstudy) rcols(cpvalue) leftjustify

          The nobox option could, of course, be added to the forestplot() options to admetan if that is preferred.

          I hope that helps. Let me know if you have any problems or further queries.

          Best wishes,

          David.

          Comment


          • #35
            Hi David

            I am trying to generate a forest plot for several odds ratios. I do not intend to do a meta-analysis. Furthermore, is there a way I can label each line plot as I want to plot different odds ratio of different predictor variables (with the unadjusted and adjusted model for each predictor included in the forest plot)

            Comment


            • #36
              Hi Chinonso,

              Without further knowledge of your data structure, it's difficult for me to help. Would it be possible to post a sample of your data, e.g. using dataex ? (see the Forum guidelines)

              However, this sounds like a similar issue to that described in the posts immediately above. In particular, the forestplot command is probably what you want, rather than admetan/ipdmetan. Make sure you take logs of odds ratios and confidence intervals, as described in post #34. Descriptors for individual lines should be stored in a variable to be passed to forestplot using the labels() option (see the forestplot help file).

              If you want to separate your odds ratios into groups or categories, then it may be easier to use admetan instead, with the nosubgroup and nooverall options to suppress pooling, and the by() option identifying the groups.

              I hope that helps!
              Thanks,
              David.

              Comment


              • #37
                Dear David

                Many thanks for your reply.

                I used this command to generate the forest plot for the odds ratio:

                admetan lnOR lnlci lnuci, study(Phthalatemetabolite) eform effect(Odds ratio) nowt nooverall forestplot(xlab(0.1 0.2 0.5 1 2 5))

                Though the plot is good. However, how can I include a particular colour for males and a different colour for females given that I stratified my analysis by gender.

                I have install the dataex as well.

                I look forward to hearing from you.

                Chinonso

                Comment


                • #38
                  Dear Chinonso,

                  Do you mean that you have a variable "gender" in your dataset, and that each odds ratio is either for males or for females? If so, you can use the plotid() option together with the forestplot options box#opts and so on. See the help files for admetan and for forestplot, and in particular the first example given under help forestplot.

                  At a guess, your command would end up looking something like:
                  Code:
                  admetan lnOR lnlci lnuci, study(Phthalatemetabolite) or nowt nooverall plotid(gender) forestplot(xlab(0.1 0.2 0.5 1 2 5) box1opts(mcolor(red)) ci1opts(lcolor(red)) box2opts(mcolor(blue)) ci2opts(lcolor(blue)))

                  Best wishes,

                  David.

                  Comment


                  • #39
                    Thank you all. This was very helpful.

                    Comment


                    • #40
                      Dear David,
                      I am using admetan, code below.
                      admetan coeff lci uci, by(model) forestplot(xlabel(-4 -3 -2 -1 0 1 2 3 4)) nooverall nowt nosubgroup label(namevar=dir) sortby(dir)


                      But for some reason it will not allow me to remove the box by using nobox option. I get this error
                      option nobox not allowed
                      Error in admetan.BuildResultsSet
                      (Note: meta-analysis model was fitted successfully)
                      r(198);


                      I am using the latest version not sure why? any idea?
                      . which admetan
                      c:\ado\plus\a\admetan.ado
                      *! version 3.2 David Fisher 28jan2019

                      Many thanks in advance
                      maano
                      Attached Files

                      Comment


                      • #41
                        Dear Maano,

                        When you try to use the nobox option, are you simply adding it to the end of your line of code? If so, try placing it within the forestplot() option list.

                        That is -- instead of:
                        Code:
                        admetan coeff lci uci, by(model) forestplot(xlabel(-4 -3 -2 -1 0 1 2 3 4)) nooverall nowt nosubgroup label(namevar=dir) sortby(dir) nobox
                        Try:
                        Code:
                        admetan coeff lci uci, by(model) forestplot(xlabel(-4 -3 -2 -1 0 1 2 3 4) nobox) nooverall nowt nosubgroup label(namevar=dir) sortby(dir)
                        Hopefully that will work!

                        Best wishes,

                        David.

                        Comment


                        • #42
                          Dear David,
                          Thank you very much. the code worked perfectly.
                          Best Wishes
                          maano

                          Comment


                          • #43
                            Dear David,
                            Thank you very, the code worked perfectly.
                            Many thanks and best wishes
                            maano

                            Comment


                            • #44
                              Dear all,

                              I hope someone can help me here.
                              I am trying to plot my Hazard ratios with forest plot and I was asked to put it on log scale. What do I need to add to this code:



                              gen double lHR=ln(HR)
                              gen double ln_lci=ln(lci)
                              gen double ln_uci=ln(uci)

                              *metan lHR In_lci Ln_uci , by(Level) eform effect(HR) xlabel(0.5, 5.5) force nooverall stats nosubgroup nobox nowt label(namevar=Condition) xtitle("Hazard ratio (95% CI)", size(small)) title("Diseases ", size(small))


                              Thanks!





                              Comment


                              • #45
                                Hi all,

                                I also need some help with manipulating a forest plot, produced with metan. I managed to get my forest plot almost right: the only thing wrong is that the first column (with study ID, or in my case, author and year of the study) has an unnecessary large width. This leaves a broad unused horizontal space between the study ID and the rest of the forest plot. Does anyone know how to make the first column smaller? Either in Graph Editor or with a command?

                                Thanks,

                                Jojanneke

                                Comment

                                Working...
                                X