Linear regression with a minimum intercept value

4 visualizaciones (últimos 30 días)
Brian Scannell
Brian Scannell el 15 de Feb. de 2018
Editada: Brian Scannell el 15 de Feb. de 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

Respuesta aceptada

Matt J
Matt J el 15 de Feb. de 2018
Editada: Matt J el 15 de Feb. de 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 comentario
Brian Scannell
Brian Scannell el 15 de Feb. de 2018
Editada: Brian Scannell el 15 de Feb. de 2018
Thanks Matt - yes, I did mean my y vales. Thanks for pointer towards lsqlin; not one I’ve used before. Appreciated. Brian

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Linear Algebra en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by