Linear regression with a minimum intercept value

4 次查看(过去 30 天)
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

采纳的回答

Matt J
Matt J 2018-2-15
编辑:Matt J 2018-2-15
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 个评论
Brian Scannell
Brian Scannell 2018-2-15
编辑:Brian Scannell 2018-2-15
Thanks Matt - yes, I did mean my y vales. Thanks for pointer towards lsqlin; not one I’ve used before. Appreciated. Brian

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear Algebra 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by