title: How to fit a linear regression in R with a fixed negative intercept?
body: <p>Background: Species richness scales to the negative -0.75 of body weight. However, when I fit my data, I get a value of 0.57. A friend told me that the summary(lm) results prints the 'best fit' slope of the data. Nevertheless, I'm wondering if I can create a regression plot wherein I force the slope to be -0.75 like the literature. </p>
  
  <p>My code is:</p>
  
  <h1>y value</h1>
  
  <p>log.nspecies.dec = c(3.05, 2.95, 2.97, 2.98, 2.84, 2.85, 2.83, 2.71, 2.64, 2.62, 2.58, 2.37,
  2.26, 2.17, 2.00, 1.88, 1.75, 1.62, 1.36, 1.30, 1.08, 1.20, 0.90, 0.30, 0.70,
  0.30, 0.48, 0.00, 0.30, 0.00)</p>
  
  <h1>x value</h1>
  
  <p>logbio.dec = c(2.1, 2.3, 2.5, 2.7, 2.9, 3.1, 3.3, 3.7, 3.9, 4.1, 4.3, 4.5, 4.7, 4.9, 5.1,
  5.3, 5.5, 5.7, 5.9, 6.1, 6.3, 6.5, 6.7, 6.9, 7.1, 7.3, 7.5, 7.7, 7.9)</p>
  
  <h1>plot a barplot and superimpose a regression line</h1>
  
  <h1>name the y variables with the x</h1>
  
  <p>names(log.nspecies.dec) = logbio.dec</p>
  
  <h1>order the y variables</h1>
  
  <p>log.nspecies.dec = log.nspecies.dec[order (as.numeric(names(log.nspecies.dec)))]</p>
  
  <h1>do the barplot</h1>
  
  <p>xpos = barplot(log.nspecies.dec, las = 2, space = 0)</p>
  
  <p>lm.fit = lm(log.nspecies.dec ~ as.numeric(names(log.nspecies.dec)))
  summary(lm.fit)</p>
  
  <p>y.init = lm.fit$coefficients[2] * as.numeric(names(log.nspecies.dec))<a href="https://i.stack.imgur.com/LJobc.jpg" rel="nofollow noreferrer">1</a> + 
    lm.fit$coefficients<a href="https://i.stack.imgur.com/LJobc.jpg" rel="nofollow noreferrer">1</a></p>
  
  <p>y.end = lm.fit$coefficients[2] * as.numeric(names(log.nspecies.dec))[length(log.nspecies.dec)] +
    lm.fit$coefficients<a href="https://i.stack.imgur.com/LJobc.jpg" rel="nofollow noreferrer">1</a></p>
  
  <p>segments(xpos<a href="https://i.stack.imgur.com/LJobc.jpg" rel="nofollow noreferrer">1</a>, y.init, xpos [length(xpos)], y.end, lwd = 2, col = 'red')</p>
  
  <p>title(main = 'ln Number of species ~ lm Weight')</p>
  
  <p>coef(lm.fit) </p>
  
  <p>gives a result wherein the slope is 0.57. How do I force the slope to -0.75? <a href="https://i.stack.imgur.com/LJobc.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LJobc.jpg" alt="enter image description here"></a></p>