title: R: Get p-value for all coefficients in multiple linear regression (incl. reference level)
body: <p><strong>Example</strong></p>
  
  <p>I have a linear regression, which fits a numerical dependent variable with 3 explanatory factor variables. Each of the factor variables has 2 levels.</p>
  
  <pre><code>install.packages("robustbase")
  install.packages("MASS")
  require(robustbase)
  require(MASS)
  
  # Example data
  data(npk)
  df= npk[,-1]
  str(df) 
  
  # 'data.frame':  24 obs. of  4 variables:
  # $ N    : Factor w/ 2 levels "0","1": 1 2 1 2 2 2 1 1 1 2 ...
  # $ P    : Factor w/ 2 levels "0","1": 2 2 1 1 1 2 1 2 2 2 ...
  # $ K    : Factor w/ 2 levels "0","1": 2 1 1 2 1 2 2 1 1 2 ...
  # $ yield: num  49.5 62.8 46.8 57 59.8 58.5 55.5 56 62.8 55.8 ...
  
  set.seed(0)
  model &lt;- lmrob(yield ~ N + P + K - 1, data= df)
  </code></pre>
  
  <p><strong>Task</strong></p>
  
  <p>I want to access the p-values for each coefficient of the <code>model</code> object. To avoid an unnecessary intercept I am already using <code>- 1</code> in the formula.</p>
  
  <pre><code>summary(model)$coefficients
  
  # Estimate Std. Error    t value     Pr(&gt;|t|)
  # N0 54.644672   2.400075 22.7678995 8.972084e-16
  # N1 60.166737   1.966661 30.5933467 2.858276e-18
  # P1 -1.059299   2.139443 -0.4951286 6.259053e-01
  # K1 -3.905052   2.226012 -1.7542822 9.469295e-02
  </code></pre>
  
  <p>Seems that the baseline (reference) levels for <code>P</code> and <code>K</code> are hidden.</p>
  
  <p><strong>Question</strong></p>
  
  <p>How can I change the code to access the p-values also for <code>P0</code>and <code>K0</code> as coefficients for the <code>model</code> object?</p>
  
  <p><strong>Note:</strong> I am not sure if it makes a difference for the solution, that I am actually using in my real problem <code>lmrob</code> as robust regression function, so I decided to better keep it in this reproducible example.</p>