Announcement

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

  • lfit, noconstant

    I wonder if there's a command like lfit that plots a linear regression line with the intercept constrained to zero.

    I could do in a few lines by estimating the line with -reg, noconstant- and then plotting it. But it would be even better if I could do it in one line. I'm teaching statistics to beginners, so I want to keep the code as simple as possible.

  • #2
    You could hack at aaplot from SSC.

    Comment


    • #3
      Thanks, Nick. I was looking at aaplot but didn't see a noconstant option. Are you suggesting I should modify its source code?

      Comment


      • #4
        That's my point. You need to hack at it but wiring in noconstant to regress calls within the code may get you part way to where you want to be. You may also want to remove stuff irrelevant to your teaching -- or fail to document it in the help.

        Note: aaplot is not a twoway type, but it does support addplot().

        Comment

        Working...
        X