Announcement

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

  • Limit the y-axis of qfit between 0 and 1

    I want to estimate the relationship between two variables (e.g. probability to do something versus temperature).

    I obtained (almost) the graph I want by doing

    Code:
    twoway qfit vary varx
    However, for some reason, the fitted values on the graph go beyond the y-range 0-1. In the graph below, the go below 0 while in my dataset, the probabilities do not go beyond the 0-1 range.

    I managed to change the X-axis, but I do not seem to change the y-axis. Any suggestions? Thank you very much!

    Click image for larger version

Name:	graph.png
Views:	1
Size:	87.2 KB
ID:	1409545

  • #2
    -twoway qfit- won't know about any limits you know about. -logit- with a quadratic is in essence going to fit a bell, which often is about right. Crucially, the maximum and minimum will respect the 0 and 1 limits.

    Comment

    Working...
    X