Linear regression with a minimum intercept value

4 Ansichten (letzte 30 Tage)
Brian Scannell
Brian Scannell am 15 Feb. 2018
Bearbeitet: Brian Scannell am 15 Feb. 2018
I am using linear regression to compute the coefficients for both y = B0 + B1*x and y = B0 + B1*x + B3*x^3. I know that the measurement technique has a minimum instrument noise level, Nmin, so I have a minimum value for B0. But the actual noise value for a set of measurements can be higher than Nmin, so B0 is not fixed - just constrained to be >= Nmin.
I can execute the regression with B0 unconstrained and test for B0 < Nmin, but if that is the case, is it then reasonable to assume that the best constrained least squares solution is achieved by fixing B0 as Nmin (i.e. just deduct Nmin from all my x values and repeat the regression with a zero intercept)?
Or is it possible that the same set of data points that give B0 < Nmin when B0 is unconstrained, could result in an intercept higher than the Nmin given the constraint that B0 >= Nmin?
I appreciate that this is more of a maths question than a Matlab question per se, but I'm hoping there might be a Matlab solution I can implement without too high a processing cost as I need to execute millions of these regressions per dataset (hence I am currently using mldivide (B = x\y) rather than regress or fitlm).
Thanks, Brian

Akzeptierte Antwort

Matt J
Matt J am 15 Feb. 2018
Bearbeitet: Matt J am 15 Feb. 2018
just deduct Nmin from all my x values and repeat the regression with a zero intercept
I think you mean deduct Nmin from all your y-values. Yes, you could do that. Or, just use a solver that handles bounds, e.g.,
B=lsqlin(x,y,[],[],[],[],[Nmin,inf])
  1 Kommentar
Brian Scannell
Brian Scannell am 15 Feb. 2018
Bearbeitet: Brian Scannell am 15 Feb. 2018
Thanks Matt - yes, I did mean my y vales. Thanks for pointer towards lsqlin; not one I’ve used before. Appreciated. Brian

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Linear Algebra finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by