How to reproduce least squares line with a plotted function

Tags:
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #917 Score: 0

    Hi, I have a (possibly embarrassingly simple) question. How can I reproduce the line that I added to a graph using as a least squares lines with a plotted function? I am asking in part because I want to better understand how to plot other functions, i.e., one that will fit this data well! I tried:

     

    f() = b + x

    f() = x

    But, these didn’t seem to do the trick. Thank you.

    #919
    Bill Finzer
    Keymaster

    Hi,

    The following should work:

    2.39*x-5.6

    2.39*Day-5.6

    Or you could create two sliders, a and b, adjusted to -5.6 and 2.39. Then you would plot

    b + a*Day or

    b + a*x

    I hope that helps,

    Bill

    #920
    jrosenb8@utk.edu
    Participant

    Thanks – that did the trick.

    Is it possible (or on the docket) to facilitate adding a line of best fit that uses a function other than a linear model (i.e., could you fit a quadratic function)?

    Thank you very much!

    Josh

    #922
    Bill Finzer
    Keymaster

    Hi Josh,

    It is possible, of course to add quadratic fitting. That starts us down a slippery slope, though, that includes polynomial fitting and exponential/logarithmic fitting. All that functionality can be pretty off-putting to non-math-geeks. So we’d have to figure out how to provide it without cluttering things up. Maybe in a plugin?!

    Bill

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.