Announcement

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

  • Midas value label missing in graph output - help please.

    Hi Stata team,

    i wondered if you can help a simple graph labelling challenge in Midas forest plot.
    (1st posting - so I hope I've followed instructions!)

    Using Midas command I've created a sensitivity and specificity forest plot. My issue is that I need one of the variables to show the value label and not the numeric number. Is there a way to change please? The '(value label)' added in the command line makes no difference.

    I used the following command with the data below

    Code:
     midas tp fp fn tn, id(Indextest_subgroupcode_  Author_year_ Testgroup1)(valuelabel) ms(0.75) bfor(dss))
    and data example below. The variable Testgroup1 is the one that I can't change the appearance?
    I have other numeric values in Testgroup1 not shown in data below but which are in same format - eg 2 = 2.Blood etc and about 12 different forest plots to create.

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input int(tp fp fn tn) str46 Indextest_subgroupcode_ str22 Author_year_a float Testgroup1
    36 18   0   7 "Lactate"                "De La Llana, 2020" 1
    31 23   0   7 "Lactate"                "De La Llana, 2020" 1
    21  6  62  47 "Lactate <2mmols"        "Lopez-Herce, 2014" 1
    25  9 130 160 "Lactate"                "Moler, 2017"       1
    19  3  76 184 "Lactate"                "Moler, 2015"       1
    56 39  17  21 "Lactate <2mmols"        "Lopez-Herce, 2014" 1
    28 14   4   9 "lactate <2mol"          "Meert, 2019"       1
    24  2  62  32 "Lactate <2mmols"        "Lopez-Herce, 2014" 1
    58 22  26  14 "Lactate <2mmols"        "Lopez-Herce, 2014" 1
    14 26  21 185 "Lactate"                "Scholefield, 2021" 1
    23 12 124 167 "Lactate"                "Moler, 2017"       1
    14 10  40 226 "Lactate"                "Moler, 2015"       1
    19 15   3   7 "lactate <2mol"          "Meert, 2019"       1
    49 17  34  36 "Lactate <5mmols"        "Lopez-Herce, 2014" 1
    84 11  28  10 "Lactate <5mmols"        "Lopez-Herce, 2014" 1
    57 21  29  13 "Lactate <5mmols"        "Lopez-Herce, 2014" 1
    76  6   9  29 "Lactate <5mmols"        "Lopez-Herce, 2014" 1
    40 21  16  12 "Lactate >50% clearance" "Lopez-Herce, 2014" 1
    end
    label values Testgroup1 testgroup1
    label def testgroup1 1 "1. Lactate", modify
    graph output below - its the final part of each label I need to read '1. Lactate" and not "1".

    Thank you!

    Click image for larger version

Name:	Graph_example.png
Views:	4
Size:	171.0 KB
ID:	1664295

    Attached Files

  • #2
    Using Stata v16. Apologies for 4 png uploads!

    Comment


    • #3
      Sounds like something from Goldfinger.



      what is a midas plot anyways? The FAQ asks you to explain your user written commands, especially when the command may not be typically used by everyone.


      I'm not at my computer, but maybe the help file says something about this?

      Comment


      • #4
        Agree. Great name! midas -- Meta-analytical Integration of Diagnostic Accuracy Studies

        Thanks for response. The help file got me so far.

        the command uses 'midas' followed by the 4 values of true positive (tp), false positive (fp), false negative (fn) and true negative (tn) to input into the meta-analysis.
        The following part is the labelling of the variables into the graph.

        It describes adding the labels using " id(varlist) provides a label for studies allowing for up to four variables." which i have done for my 3 variables. (Indextest_subgroupcode_ Author_year_ Testgroup1)

        Just I didn't know if there is a generic command in Stata to switch between outputting the "numeric code" or the "value label" of a variable. Unfortunately in the help file it doesn't describe this.
        Its possible that you can't and I just need to change my numeric variables back to String values, but I thought I'd ask.

        thanks


        Comment


        • #5
          I think i've solved it by simply using the 'decode' command to change my numeric to a new string variable and using that as the id(varlist) name. Sorry to disturb you all, but pleased to learn how to post!

          Comment


          • #6
            I have the same problem. However found no solution. I tried encoding and/or decoding, but it did not work. Any help or suggestions?!

            Comment

            Working...
            X