Nonlinear Fitting
Linearizing nonlinear Functions Not recommended unless you have information on the errors in your y data and you weight the fit according to those errors. Note these errors will change due to the transformation!
Example x y 1 0.5 2 1.7 3 3.4 4 5.7 5 8.7
Fitting Polynomials (Polynomial Regression) A system of 3 x 3 equations must be solved, meaning you must have at least three data points to fit a quadratic.
Fitting Polynomials (Polynomial Regression)
Fitting Polynomials (Polynomial Regression) Form the objective function:
Example inv(X'*X)*(X'*a) In Matlab you would write Switch to octave…. 1 2 5 3 8 4 17 16 In Matlab you would write inv(X'*X)*(X'*a) Switch to octave….
Errors in parameters Sigma^2 is estimated from the sum of squared errors (residuals) as before:
Errors in parameters The diagonals of the Cov(a) are the standard errors (variances) of the parameters