Announcement

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

  • forcing 3 decimal places with user-written module MIDAS

    Hello--- I am using user-written module MIDAS in Stata/MP 13.0. I am using -midas tp fp fn tn, res(sum)- to generate sensitivity and specificity with 95% confidence intervals. However, the output is only 2 decimal places. I would like the output to show me 3 decimal places.

    Is there a way to force the output to show 3 decimal places? thank you in advance.

    dataex tp fp fn tn
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input int(tp fp fn tn)
     34 0 1  5
     28 0 0 38
     53 0 1  6
     75 0 0 75
     94 1 1 16
    125 2 3  8
     82 1 0  6
     99 0 2  6
     43 1 2 11
     89 1 0  6
     91 0 0 10
    208 0 4 28
     69 5 2 39
    165 3 2 60
     94 0 1  5
    129 2 4 15
     84 1 0  8
     92 0 3  5
     68 0 1  3
     93 0 1  6
    end
    midas tp fp fn tn, res(sum)

    SUMMARY PERFORMANCE ESTIMATES


    Parameter Estimate 95% CI

    Sensitivity 0.99 [ 0.98, 0.99]

    Specificity 0.96 [ 0.92, 0.98]

    Positive Likelihood Ratio 24.9 [ 12.3, 50.4]

    Negative Likelihood Ratio 0.02 [ 0.01, 0.02]

    Diagnostic Odds Ratio 1625 [ 670, 3940]



  • #2
    Welcome to the Stata Forum / Statalist,

    I have no experience with the user-written midas. That said, I wish to share a couple of remarks. First, I fail to see a good point in doing so. After all, what would be the difference between the specificity of 0.92 and 0.923? That said, hazarding a guess, you may use - format - to get it, because I assume - midas - wouldn't conflict with this resource.
    Best regards,

    Marcos

    Comment


    • #3
      Marcos, thank you for the suggestion.

      For most of the data it doesn't matter; however, some of the upper confidence intervals are being reported as 1.00. It would be ideal to know if the upper CI is truly at 100% versus being rounded up. Using -format- of %9.3f to the data set before running -midas- commands did not help with the issue.

      thank you, Gary

      Comment


      • #4
        I agree with Marcos's comment, and add that the decision of the authors of midas on the precision they report may well reflect their assessment of the precision of their methodology. After all, midas is about combining results from disparate studies of the same phenomenon, and part of that is estimating study-specific effects.

        With that said, you may want to look at the stored results returned by midas in r() as described in the midas PDF documentation. You can run return list after running midas to see the stored results, and see help return for more details on accessing and using stored results. I think at least some of the summary results are included among the stored results.

        Comment


        • #5
          William & Marcos--- thank you for the feedback.

          Executing -return list- after running -midas- indeed shows me the data I desired to see. The assistance is much appreciated.

          Comment


          • #6
            If you look at the code, it has stuff like 7.1f, 5.2f, etc. My guess is you could copy the program, rename it midas2, and make whatever formatting changes you wanted. Whether that is a good idea is another matter.
            -------------------------------------------
            Richard Williams, Notre Dame Dept of Sociology
            StataNow Version: 19.5 MP (2 processor)

            EMAIL: [email protected]
            WWW: https://www3.nd.edu/~rwilliam

            Comment


            • #7
              Richard --- mind blown. I simply edited the code to 8.3f versus 8.2f. Simplified, and less time consuming for my multiple analysis. Thank you.

              Comment

              Working...
              X