What are 'aliased coefficients'?

While building a regression model in R (lm), I am frequently getting this message

"there are aliased coefficients in the model"


What exactly does it mean?

Also, due to this predict() is also giving a warning.

Though it's just a warning, I want to know how can we detect/remove aliased coefficients before building a model.

Also, what are the probable consequences of neglecting this warning?

I suspect this is not an error of lm, but rather vif (from package car). If so, I believe you have ran into perfect multicollinearity. For instance

x1 <- rnorm( 100 )
x2 <- 2 * x1
y <- rnorm( 100 )
vif( lm( y ~ x1 + x2 ) )


In this context, ''alias'' refers to the variables that are linearly dependent on others (i.e. cause perfect multicollinearity).

The first step towards the solution is to identify which variable(s) are the culprit(s). Run

alias( lm( y ~ x1 + x2 ) )


to see an example.

• Thanks. Is 'multicollinearity' same as having 'aliased coefficients' ? Aug 19, 2014 at 11:35
• @MohitVerma : In this terminology ''alias'' refers to the variables that are linearly dependent (i.e. cause perfect multicollinearity). See stat.ethz.ch/R-manual/R-patched/library/stats/html/alias.html . I update the answer with this. Aug 19, 2014 at 11:41

This often comes up when you have singularities in your regression X'X matrix (NA values in the summary of the regression output).

Base R lm() allows for singular values/perfect multicollinearity as the default is singular.ok = TRUE. Other packages/functions are more conservative.

For example, for the linearHypothesis() function in the car package, the default is singular.ok = FALSE. If you have perfect multicollinearity in your regression, linearHypothesis() will return an error "there are aliased coefficients in the model". To deal with this error, set singular.ok = TRUE. Be careful, however, as doing this may mask perfect multicollinearity in your regression.

maybe to good to know for some: I got this error as well when I added dummies to a regression. R automatically omit one dummy, but this causes an error in the vif test. so a solution, for some, might be removing one dummy manually.