linear regression with R in sagemath
Hi,
I know it is possible to do a linear regression directly inside sage. However, I was wondering if it was possible to call the lm function from R to do it as well. I tried the following code:
reader = r.read_csv('"databrent2.csv"', header=true, sep='";"')
a = r.lm(LLCCS00 ~ OILBRNP, data = reader)
LLCCS00 and OILBRNP are my two variables. They are in row. It is time series so for each variable, there is a value at each date (dates are columns). The issue I have is that I have a syntax error. I don't understand why.
It would be helpful if you provide the complete error message you got.
File "<ipython-input-4-8b7ce4bd7df2>", line 2 a = r.lm(LLCCS00 ~ OILBRNP, data = reader) ^ SyntaxError: invalid syntax