Menu

How to set intercept as 0 when using regress?

Help
daniel888
2007-10-18
2013-04-24
  • daniel888

    daniel888 - 2007-10-18

    Dear,

    I am using the command"regress y vs x", but the intercept is not 0 by default. How can I set the intercept to 0? Any suggestions will be really appreciated.

    open file
    read columns x y
    close
    regress y vs x
    draw curve

     
    • Dan Kelley

      Dan Kelley - 2007-10-18

      Gri lacks this capability, at the moment.  Adding the capability in a hacky way wouldn't be hard; just look near line 205 in regress.cc.  However, adding the capability in a clean way would take some time, to create a new syntax to accept an extra default to the "regress" command, to communicate the intent of that default through the subroutines, and to test and then document all of this.

      If you want a quick result, and if you know how regression works, *and* if you know how to build from source, you can start with the indicated area of regress.cc; it would only take you a minute of editing and then a 5-minute compile and you'd have a new gri that *ONLY* does zero-intercept regressions (and that is then inconsistent with the provided documentation on your system).

       

Log in to post a comment.

MongoDB Logo MongoDB