title: How to determine what the Seemingly Unrelated Regression (SUR) error means in R
body: <p>I am using the <code>systemfit()</code> function to conduct a seemingly unrelated regression (SUR) and am getting the following error:</p>
  
  <pre><code>Error in solve(sigma, tol = solvetol) : 
  Lapack routine dsptrf returned error code 1
  </code></pre>
  
  <p>Yet, I'm unable to find the meaningful interpretation of what the error suggests is going on. Below is some simulated code that works to show what functions I'm using (the simulated code does not produce an error). Thanks for thoughts on this error.</p>
  
  <pre><code>y &lt;- sample(seq(1:4), 100, replace = TRUE)
  x1 &lt;- sample(seq(0:1), 100, replace = TRUE) -1
  x2 &lt;- sample(seq(0:1), 100, replace = TRUE) - 1
  x3 &lt;- sample(seq(1:4), 100, replace = TRUE)
  frame &lt;- as.data.frame(cbind(y,x1,x2, x3))
  
  mod_1 &lt;- y ~ x1 + x3 + x1:x3
  mod_2 &lt;- y ~ x2 + x3 + x2:x3
  
  output &lt;- systemfit(list(mod_1, mod_2), data = frame, method = "SUR")
  </code></pre>