Be the first to rate this file! 17 Downloads (last 30 days) File Size: 2.14 KB File ID: #26804

Two-phase linear regression model

by

 

calculates the parameters of unidimensional two-phase linear regression model

| Watch this File

File Information
Description

   INPUTS:
       x - vector row with 'x' values
       y - vector row with 'y' values
       r - expected 'x'-coordinate of break point
           if r is empty it is calculated during
           the optimisation
       p - if p is equal to 1 the fit is plotted

   OUTPUT:
       th - estimated paremeters of the regression
           lines
           y_1 = th(1) + th(2) * x
           y_2 = th(3) + th(4) * x
       r - the estimated break point
       SSR - Sum of Squares of the Residuals
       SSM - Sum of Squares due to the Model
             R^2 can be calculated as RRM/(SSM + SSR)
       res - vector of residuals

Required Products Optimization Toolbox
MATLAB release MATLAB 7 (R14)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us