Announcement

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

  • RE: Twoway scatter command for logistic S curve

    Hi! I am trying to create a logisitc curve based on the estimated logit model. The twoway scatter command generated the attached graph. twoway scatter yhat rearrest age, connect(1 .) symbol(i O) sort ylabel(0 1)

    However, the probability dots/lines did not look like a logistic S curve. Is there anyway I can create a logistic S curve based on the estimated model.

    Thank you for your help!
    Attached Files
    Last edited by DY Kim; 05 Sep 2020, 14:50.

  • #2
    Graph the predictions:

    Code:
    webuse lbw, clear
    logit low age lwt smoke ptl ht i.race
    predict xb, xb
    predict pr, pr
    tw line pr xb, sort xtitle("{&beta}'x") ytitle("probability") scheme(s1color)


    Click image for larger version

Name:	Graph.png
Views:	1
Size:	43.6 KB
ID:	1571596




    Last edited by Andrew Musau; 05 Sep 2020, 16:19.

    Comment

    Working...
    X