I have a function with 4 coefficients, which I want to estimate with OLS (see Eq-1)
The coefficients are: r,b0,b1,b2
The estimation is with, OLS attached (See Eq-2):
X- is the coefficient vector,
Xdata is the variable vector
Ydata is the R(m) vector (which is YTM).
L denote length of the yield vector (m=1,2….12)
My question is how can I do that with mathematica?
Attachment: Equiations.JPG, URL: ,