Ensuring X is of full rank

Automatically remove redundant columns from X to ensure that it has
full rank before fitting the model.