Multiple linear regression dependence on more than one variable e.g. dependence of runoff volume on soil type and land cover
With two independent variables, get a surface
Much like polynomial regression Sum of squared residuals
Rearrange to get Very much like normal equations for polynomial regression
Once again, solve by any matrix method Cholesky is appropriate - symmetric and positive definite
Example: Strength of concrete depends on cure time and cement/water ratio
Samples
Solve by Cholesky decomposition Backsubstitution
General least squares Given z are functions, e.g
Can express as and define Sr
As usual, take partials to minimize lead to matrix equations Solve this for [a] Cholesky LU or Gauss elimination Matrix inverse
Confidence intervals If we say the elements of are then
Use Excel to get t-distribution TINV(a,n-2)
Nonlinear regression Use Taylor series expansion to linearize original equation - Gauss Newton approach Let model be Where f is a nonlinear function of x are one of a set of n observations
Use Taylor series for f, and chop j - initial guess j+1 - improved guess
Plug the Taylor series into original equation
Given all n equations Set up matrix equation
Where
Using same least squares approach (minimizing sum of squares of residuals E) Get from Now change with and do again until convergence is reached
Example: n=14
Model it with
Choose an initial a0=1, a1=-1 Matlab demo