Announcement

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

  • Metaprop Forestplot Editing

    Hello, I am trying to perform a proportion meta-analysis. The dataset is https://imgur.com/F0Eikiz

    As suggested in this paper I lauched this command: metaprop num denom, random by(tgroup)cimethod(exact) -- that gave me everything I needed and the forestplot (as in this picture).

    However, how can i label each number with author and year?



  • #2
    Hi Morrow,

    Please take a moment to read the FAQ, as you were asked to do when signing up and making this post. We prefer to use our real names here because it promotes a more open and cordial environment. The FAQ also explains why posting pictures of data are not as helpful as you might think. Mainly, we can't use the data to provide usable code.

    The option you are looking for is -label(namevar yearvar)-, where you supply either or both of the name and year variable. Year should naturally be a number. Name should be a labeled numeric variable whose labels are 20 characters or less. You may read about this from -help metaprop-.

    Comment


    • #3
      Thank you, I will read them. However it doesn't work.

      Comment


      • #4
        From #12 in the FAQ - What should i say about the commands and data I use?:

        Never say just that something "doesn't work" or "didn't work", but explain precisely in what sense you didn't get what you wanted.
        My syntax suggestion was a little off, but you can see how to use -label()- in this minimal example, taken from the first example listed in -help metaprop-. The syntax would have been explained as well by reading that page.

        Code:
        use http://fmwww.bc.edu/repec/bocode/a/arbyn2009jcellmolmedfig1.dta
        metaprop num denom, random by(tgroup) label(namevar=author, yearvar=year)
        It's even easier to add a study label -- you can use a string label for namevar.. As long as you can supply a text label for each study in your dataset, you can have your labels.

        Code:
        // continuing with the example
        . desc author
        
                      storage   display    value
        variable name   type    format     label      variable label
        ------------------------------------------------------------------------------
        author          str14   %14s

        Comment


        • #5
          Hi both,

          Just a quick question. If I would want to include the number of events and cases (in this scenario num/denom) in the Forest plot, would additional command(s) do I need to include please?

          Comment


          • #6
            #5 is a duplicate of https://www.statalist.org/forums/for...-on-prevalence

            Please don't ask the same question repeatedly. (Sorry, I don't ever do meta-analysis and have no idea what would be a good answer, but asking the same question twice is not a good idea.)

            Comment

            Working...
            X