keep rank of X when fitting model