title: how to solve linear regression with conditions in R
body: <p>I would like to do a linear regression with conditions, like:
  Y = a<em>x1 + b</em>x2 +c, a>0 , b &lt;1 and c>=0</p>
  
  <pre><code>Y &lt;- c(167, 136, 195, 174, 144, 135, 89, 81, 114, 111)
  x1 &lt;- c(2.9, 3.4, 0.7, 1.1, 3.5, 5.0, 6.7, 4.7, 3.7, 8.8)
  X2 &lt;- c(60, 47, 63, 62, 40, 60, 50, 35, 40, 40)
  mydata &lt;- data.frame(Y,X1,X2)
  </code></pre>
  
  <p>Is there an easy way to do this in R? .</p>