"Slope - linear regression"

boki
boki New Altair Community Member
edited November 5 in Community Q&A
Hi!

I am new in working with RM, and I need help how to perform two things, to code days like 1,2,3... and to calculate slope per each case.
I have cases and their amount paid daily. I need to have something like this from data id, date, amount:

id        Date            Amount          x    y
case1  01.10.2010  322                1  322
case1  10.11.2010  100                2  100
...
case2  03.08.2010  120              1  120
case2  10.09.2010  300              2  300
case2  11.11.2010  240              3  240
...

I need slope of linear regression per each case, like in excel.

I couldn't find how to do this in RM  :(  !

Answers

  • land
    land New Altair Community Member
    Hi,
    if you make a linear regression, the slop is the same on each data point, since it is linear...You can read this slope from the table of coefficients.
    If you want to convert dates try using the Date to Numerical Operator.

    Greetings,
      Sebastian