title: Improve curve fit to data in R
body: <p>Having trouble fitting an appropriate curve to this data.</p>
  
  <pre><code>x &lt;- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 21, 31, 41, 51, 61, 71, 
  81, 91, 110, 210, 310, 410, 510, 610, 710, 810, 910, 1100, 2100, 
  3100, 4100, 5100, 6100, 7100, 8100, 9100)
  
  y &lt;- c(75, 84, 85, 89, 88, 91, 92, 92, 93, 92, 94, 95, 95, 96, 95, 
  95, 94, 97, 97, 97, 98, 98, 98, 99, 99, 99, 99, 99, 99, 99, 99, 
  99, 99, 99, 99, 99, 99)
  </code></pre>
  
  <p>Tried so far:</p>
  
  <pre><code>fit1 &lt;- lm(y~log(x)+I(1/x))
  fit2 &lt;- lm(y~log(x)+I(1/x)+x)
  
  plot(x,y, log="x")
  lines(0.01:10000, predict(fit1, newdata = data.frame(x=0.01:10000)))
  lines(0.01:10000, predict(fit2, newdata = data.frame(x=0.01:10000)), col='red')
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/9XXQM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9XXQM.png" alt="enter image description here"></a></p>
  
  <p>The fits are ok, but arrived at entirely empirically and there is room for improvement.  I did not fit loess or splines to be any better.</p>
  
  <blockquote>
    <p>The concrete goal is to increase the R^2 of the fit and improve regression diagnostics (e.g. Q-Q plots of residuals).</p>
  </blockquote>
  
  <p><em>Edit</em>: <strong>Expected Model:</strong> this is sampling data, where more samples (x) improve the accuracy of the estimate (y); it would saturate at 100%.</p>