Announcement

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

  • Metaprop

    I am using metaprop for the first time on a very simple dataset (4 variables, 11 observations). I read the other posts on metaprop and even the article describing the creation of it. I am typing in: metaprop pouchcd totaluc, random by(year) but I get the error message:
    order should be {n, N}
    r(9);

    but pouchcd is the numerator and totaluc is the denominator. They are both coded are numeric variables. I can't seem to figure out how to troubleshoot this. I would greatly appreciate any ideas.

    Thank you!
    Bharati

  • #2
    It's hard to help you when we cannot see a reproducible example along with some example data. The -dataex- command is already part of the fully updated Stata 14.2 and Stata 15. See -help dataex- for a quick tutorial. You are also encouraged to do this in the FAQ (see section 12.2).

    The example code provided in the help for the user-contributed -metaprop- works fine in my Stata 15. Two things you might check are:
    • every observation has numerator <= denominator
    • both numerator and denominator variables are numeric variables (use -describe pouchcd totaluc- to verify this).
    Taking another random guess, this seems to be IBD data, in which case it seems to like you might have mixed CD and UC variables.

    Comment


    • #3
      Thank you for your response. The numerator (pouchcd) is smaller than every denominator (totaluc) and both variables are numeric. This is an IBD dataset, but I'm looking at the incidence of CD of the pouch in those who have UC.

      Here is a print out from dataex:

      input str20 studyname int(totaluc pouchcd) float year
      "Goldstein NS, et al." 74 8 1997
      "Peyregne V, et al. " 43 4 2000
      "Rossi HL, et al. " 68 4 2002
      "Melton GB, et al. " 2814 87 2010
      "Haveran LA, et al. " 382 32 2011
      "Coukos JA, et al. " 142 21 2012
      "Tyler A, et al. " 50 399 2012
      "Zaghiyan K, et al. " 237 40 2016
      "Yanai H, et al. " 253 54 2017
      "Diederen K, et al. " 303 14 2017
      "Shamah S, et al. " 128 16 2018

      I greatly appreciate your help! Thank you!

      Comment


      • #4
        Hi Bharati,

        Thank you for posting your dataset for us to see. You will notice (using for example, -list if pouchcd > totaluc-) that the Tyler study has pouchcd > totaluc which isn't logical. If those two numbers should be swapped for that study, then metaprop does run.

        Comment


        • #5
          Thank you so much! I am so embarrassed, I thought I looked it over, but I think I've been working on this for too long and lost some insight.

          Comment


          • #6
            You're welcome, Bharati, and there's no need to be embarrassed. It's easy to make a data extraction/coding error.

            Comment


            • #7
              Leonardo Guizzetti you have been extremely helpful, so I'd like to bother you with another question that I can't find an answer to reading through other forums. My apologies. I need to manipulate my output (attached as a file) to not have the study numbers (1-11) and have the year instead (which is a variable in the dataset) and include the overall summary statistic with CI. I've manipulated other graphs in stata, but this is my first time using metaprop and it doesn't seem to be working the same way. Any guidance would be greatly appreciated! Thank you very much once again!
              Attached Files

              Comment


              • #8
                This may have been better suited as a separate question on the board, since it is quite different from the original question.

                While I will not open your file (for security reasons), it sounds like you are really looking to apply a custom study label. You may be interested to head the help file for metaprop by typing -help metaprop- and then looking at the -label()- option.

                Comment

                Working...
                X