title: How to force R to use a specified factor level as reference in a regression?
body: <p>How can I tell R to use a certain level as reference if I use binary explanatory variables in a regression?</p>
  
  <p>It's just using some level by default. </p>
  
  <pre><code>lm(x ~ y + as.factor(b)) 
  </code></pre>
  
  <p>with <code>b {0, 1, 2, 3, 4}</code>. Let's say I want to use 3 instead of the zero that is used by R. </p>