Announcement

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

  • batplot command (Stata/MP 16.1)

    For the batplot command (used to create Bland-Altman plots), I would like to make the markers larger, but when I wrap the scatter plot options in moptions(), everything inside seems to get ignored.

    I was wondering if anyone has a solution. Thank you for your time.

    ssc install batplot
    help batplot
    sysuse auto.dta, clear
    batplot mpg turn, moptions(msize(large)) /*everything in moptions gets ignored, so changing 'large' to 'small' does not change the plot*/
    Last edited by spencer keene; 13 Aug 2026, 07:30.

  • #2
    If you have the impression this is a bug, maybe mailing the author directly is the fastest option: [email protected] (According to the helpfile).
    Best wishes

    Stata 18.0 MP | ORCID | Google Scholar

    Comment


    • #3
      Thank you, Felix. I tried emailing Dr Adrian Mander yesterday. I saw a Cardiff email address in the help file, but according to his LinkedIn, he was at MRC in Cambridge, then Cardiff, and now he is working in industry. I think I found another solution

      Comment


      • #4
        Hi spencer keene. Given that others may encounter the same problem in future and find this thread, it would be nice of you and helpful to them if you shared the other solution you found.


        PS- I see that Adrian Mander is still registered as a member of Statalist. If he still logs in now and again, he might respond to being tagged and offer his thoughts.
        --
        Bruce Weaver
        Email: [email protected]
        Version: Stata/MP 19.5 (Windows)
        Crypticity belongs in crosswords, not code! 🤨

        Comment


        • #5
          Sorry, I thought a colleague made an extension to batplot for internal use that would have corrected this. Unfortunately, I was wrong, and the issue has not been solved yet. I will try to look some more. Thank you for adding Adrian to this forum Bruce Weaver
          Last edited by spencer keene; 14 Aug 2026, 03:11.

          Comment


          • #6
            Hello spencer keene, you should use -scatter- option instead of -moptions- to manipulate the msymbol size. As the helpfile says, moptions specifies options for the markers that lie outside the limits of agreement, on the contrary, scatter option specifies options for the scatter part of the final plot. See example bellow:
            Code:
            sysuse auto.dta, clear
            batplot mpg turn, moptions(msize(large)) name(g1)
            batplot mpg turn, moptions(msize(tiny)) name(g2)
            batplot mpg turn, scatter(msize(large)) name(g3)
            batplot mpg turn, scatter(msize(tiny)) name(g4)
            graph combine g1 g2 g3 g4
            Click image for larger version

Name:	Graph.png
Views:	1
Size:	276.0 KB
ID:	1787048

            Comment

            Working...
            X