How to use the spreg.user_output.check_constant function in spreg

To help you get started, we’ve selected a few spreg examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pysal / spglm / spglm / glm.py View on Github external
def __init__(self, y, X, family=family.Gaussian(), offset=None, y_fix = None,
            constant=True):
        """
        Initialize class
        """
        self.n = USER.check_arrays(y, X)
        USER.check_y(y, self.n)
        self.y = y
        if constant:
            self.X = USER.check_constant(X)
        else:
            self.X = X
        self.family = family
        self.k = self.X.shape[1]
        if offset is None:
            self.offset = np.ones(shape=(self.n,1))
        else:
            self.offset = offset * 1.0
        if y_fix is None:
	        self.y_fix = np.zeros(shape=(self.n,1))
        else:
	        self.y_fix = y_fix
        self.fit_params = {}

spreg

PySAL Spatial Econometric Regression in Python

BSD-3-Clause
Latest version published 20 days ago

Package Health Score

78 / 100
Full package analysis