Creating a least-squares matrix of partial derivatives

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
BifSlamkovich
Messages
23
Reaction score
0
In the ordinary least squares procedure I have obtained an expression for the sum of squared residuals, S, and then took the partial derivatives of it wrt β0 and β1. Help me to condense it into the matrix, -2X'y + 2X'Xb.

∂S/∂β0 = -2y1x11 + 2x110x11 + β1x12) + ... + -2ynxn1 + 2xn10xn1 + β1xn2)

∂S/∂β1 = -2y1x12 + 2x120x11 + β1x12) + ... + -2ynxn2 + 2xn20xn1 + β1xn2)

At least, help me to understand why the two partial derivatives equal the matrix above.
 
Physics news on Phys.org