if p != nx:
            raise ValueError('Number of covariates must match the number' +