Hi everyone,
So, I want to code a VBA function that can make a linear regression and estimate the Beta-coefficients on two variables.
I know how to do the whole thing using matrix algebra (and of course the Data Analysis Toolpack), but I would love to have a VBA function for it.
So, I have a Y-vector and then a matrix consisting of a X1 and X2 data (as attached) and I need to estimate the:
1) Intercept
2) Beta1
3) Beta2
For the linear regression function: Y = alpha + B1X + B2X
Does anybody have any ideas?
Bookmarks