Announcement

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

  • Lowess smoothing - probability instead of log odds, confidence interval?

    Hello,
    I have this simple command: lowess dead travelmin, logic
    where dead is obviously binary (0/1) and travelmin is continuous

    Is it possible for lowess to display probability instead of log odds?
    Additionally, is it possible for lowess to display 95% confidence interval?

    Thank you.

  • #2
    -lowess- itself can't do either of those things. You can nevertheless get a plot of the probability with a little extra work:

    Code:
    sysuse auto, clear
    lowess foreign mpg, logit gen(fhat)
    gen phat = invlogit(fhat)
    graph twoway line phat mpg, sort
    I can't think of any way to get confidence intervals without, in effect, writing your own version of -lowess- specifically to do that. Nor am I aware of any user-written commands that will do it. I'm not even sure whether the idea of a confidence interval makes sense in this context. I tend to think it doesn't, but I'm too tired this late in the day to think it through carefully.

    Comment


    • #3
      lpolyci would given you something similar.

      normally the bootstrap is used to create CI for lowess.

      Comment


      • #4
        it is not clear why you want this lowess - if for calibration, then Nattino, et al., have written a command that gives confidence belts around the curve. it appeared in volume 17 #4 of the SJ and is available here: https://www.stata-journal.com/sj17-4.html

        Comment


        • #5
          Thank you for your recommendations Clyde and George! I appreciate it.

          Comment

          Working...
          X