Announcement

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

  • Display estimated equation in -binscatter-?

    Hi listers,

    when using Michael Stepner's -binscatter- I would like to display the estimated equation of the fitted line directly in the graph.
    In the help file I found only the -reportreg- option to display it in my results window when running it,
    and in the forum I found only Maarten Buis' good suggestions at Include slope on binscatter plot - Statalist on how to very manually include it.
    But is there meanwhile an option to just display it automatically?

    Thanks so much and best regards, PM

  • #2
    Either an option for a community-contributed command is documented in the help or it is undocumented but mentioned in the syntax command at the start of the the corresponding .ado file. There are complications to that disjunction in detail, but by and large there isn't a third possibility.

    Beyond that is -- my wild guess only, but here it is -- a possibility that the program author didn't want people to take such equations too literally or as anything more than a heuristic suggestion. Either exploration suggests that a straight line fit is a good idea in which case do that properly according to your ideas, or it suggests that you should try something else.

    Comment


    • #3
      Hi Nick,

      thanks so much. The regressions reported in the results window do correspond what at least I would have estimated also when using regressions instead of the binscatter visualizations and so I at least do not so far see why the author would explicitly have wanted to prevent users from displaying the equation directly in the graph, yet I do not find it in either the help file or the syntax. Hence I assume someone would have to be willing and able to add this to a future iteration of binscatter, but we'll see.

      Thanks so much, PM

      Comment


      • #4
        I have speculated enough already, so all I would add is advice to contact Michael Stepner directly. He is not obviously active here. I've met him and corresponded with him but naturally I can't speak for how active he is now with Stata or whether he is interested in adding functionality to this command.

        Stata etiquette could stretch to someone forking the code under a different name with suitable acknowledgment, but taking over someone else's code usually depends on death or donation.

        I tend to use local polynomial smoothing myself.

        Comment


        • #5
          Peter,

          Does -binsreg- (https://nppackages.github.io/binsreg/) do what you want? See Cattaneo, Crump, Farrell and Feng for discussion.
          Devra Golbe
          Professor Emerita, Dept. of Economics
          Hunter College, CUNY

          Comment


          • #6
            Hi Devra,

            thanks a lot for the pointer to -binsreg-, that seems a useful addition to -binscatter- and -binscatter2- for the underlying AER and Stata journal papers with a robust foundation on amongst others how to use controls.

            Given its greater complexity, I am still struggling to find out how to report underlying regressions even in the results window, as I would do with the -reportreg- option of -binscatter-,
            and in fact do not yet see any fitted lines in my graph despite adding the -line- option there.

            But I'll give it some more trying, and if that does not solve the problem I'll probably just use -binscatter ..., reportreg- and read the estimated equation off my results window manually.

            Thanks a lot and best regards,
            PM


            Comment

            Working...
            X