Two-phase linear regression model

calculates the parameters of unidimensional two-phase linear regression model
826 download
Aggiornato 25 feb 2017

Visualizza la licenza

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

Cita come

Dimitar Atanasov (2024). Two-phase linear regression model (https://www.mathworks.com/matlabcentral/fileexchange/26804-two-phase-linear-regression-model), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R14
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Categorie
Scopri di più su Linear and Nonlinear Regression in Help Center e MATLAB Answers
Tag Aggiungi tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
2.0.0.0

Fixed to use fminsearch instead fmins

1.0.0.0