title: Running percentage least squares regression in R
body: <p>I am interested in running a percentage least squares regression, rather than ordinary least squares regression in R. This could also be referred to as a linear model with multiplicative error. One question has been asked before regarding percentage least squares on this site, and responders suggested looking into weighted regression, with one possibility being weighting each observation by the inverse square of its X value. </p>
  
  <p><a href="http://www.stackoverflow.com/questions/15275236/least-square-percentage-regression">stackoverflow.com/questions/15275236/least-square-percentage-regression</a></p>
  
  <p>However, this assumes I know how much each observation should be weighted a priori. I don't. I don't know if the percent error is 1%, 10%, 15%, etc. What I want is a model fit as </p>
  
  <pre><code>y= b1*x + e
  </code></pre>
  
  <p>where the error term is modeled as:</p>
  
  <pre><code>e= b2*x
  </code></pre>
  
  <p>b2 would be the percentage error that needs to be minimized in the regression model. I have not been able to find any package or any code to fit a model of this type for R. any feedback on how to do this would be greatly appreciated. </p>