0

I want to fit a linear regression to fit an independent variable y using the predictors x1,x2 and x3. I specifically want to add a constraint in my regression such that the coefficient of x2 is in range of 1/3 to 1/2 of the coefficient of x1. Is there any way I can do it in R?

  • 1
    Does this answer your question? [Linear regression with constraints on the coefficients](https://stackoverflow.com/questions/45577591/linear-regression-with-constraints-on-the-coefficients) – Miff Jul 14 '21 at 14:30
  • Look at the CVXR package. Note that questions should include test data. – G. Grothendieck Jul 14 '21 at 14:49

0 Answers0