compute the correct model matrix with negative values