Exemple #1
0
 def calculate(cls):
     cls.g = g = GroupSorted(cls.gind)  # pylint: disable-msg=W0201
     cls.alla = [
         (lag, sw.lagged_groups(cls.x, lag,
                                g.groupidx))  # pylint: disable-msg=W0201
         for lag in range(5)
     ]
Exemple #2
0
 def calculate(self):
     self.g = g = GroupSorted(self.gind)  # pylint: disable-msg=W0201
     self.alla = [
         (lag, sw.lagged_groups(self.x, lag,
                                g.groupidx))  # pylint: disable-msg=W0201
         for lag in range(5)
     ]
    def __init__(self, endog, exog, group, sigma_i=None):
        self.group = GroupSorted(group)
        self.n_groups = self.group.n_groups
        #self.nobs_group =   #list for unbalanced?
        nobs_i = len(endog) / self.n_groups #endog might later not be an ndarray
        #balanced only for now,
        #which is a requirement anyway in this case (full cov)
        #needs to change for parameterized sigma_i

        #
        if sigma_i is None:
            sigma_i = np.eye(int(nobs_i))
        self.cholsigmainv_i = np.linalg.cholesky(np.linalg.pinv(sigma_i)).T

        #super is taking care of endog, exog and sigma
        super(self.__class__, self).__init__(endog, exog, sigma=None)
Exemple #4
0
 def __init__(self, endog, exog, group):
     self.endog = endog
     self.exog = exog
     self.group = GroupSorted(group)
     self.n_groups = self.group.n_groups
 def calculate(self):
     self.g = g = GroupSorted(self.gind)
     self.alla = [(lag, sw.lagged_groups(self.x, lag, g.groupidx))
                  for lag in range(5)]