I am using the ols.py code downloaded at scipy Cookbook (the download is in the first paragraph with the bold OLS) but I need to understand rather than using ra
ols.py
the ols function takes the entire independent data set as the second argument. Try
m = ols(y, [x1, x2, x3], ...)
though I suspect you may need to wrap it in numpy arrays:
x = numpy.ndarray([3, len(x1)]) x[0] = numpy.array(x1) x[1] = numpy.array(x2) x[2] = numpy.array(x3) m = ols(y, x, ...)