Two-phase linear regression model

calculates the parameters of unidimensional two-phase linear regression model
840 Downloads
Aktualisiert 25. Feb 2017

Lizenz anzeigen

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

Zitieren als

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

Kompatibilität der MATLAB-Version
Erstellt mit R14
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS Linux
Kategorien
Mehr zu Linear and Nonlinear Regression finden Sie in Help Center und MATLAB Answers
Tags Tags hinzufügen
Version Veröffentlicht Versionshinweise
2.0.0.0

Fixed to use fminsearch instead fmins

1.0.0.0