-1
$\begingroup$

I got this error message from a robust regression in r ; "'x' is singular: singular fits are not implemented in 'rlm'"

I could solve it by removing some variables.

My question is , can i progrom r to solve it on it's own ? so i will not have to remove variables to solve it.

$\endgroup$
  • 2
    $\begingroup$ 'How to program it' is off topic here. FWIW, the "'x' is singular' means you have multicollinearity. $\endgroup$ – gung - Reinstate Monica Nov 16 '15 at 12:46
1
$\begingroup$

I have come across the same issue with rlm() when x variables are provided as a factor with empty levels (for example, factor(c("a", "b"), levels=c("a","b", "c" ))). Simply converting the factor to a character vector solved my issue.

$\endgroup$
0
$\begingroup$

Check for NA values, multicollinearity and duplicate observations. multicollinearity For duplicate observations use jitter rnorm() as suggested: Cause of singularity in matrix for quantile regression.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.