def __init__(self, y, Ie, Xr, covs=None):
        """
        Args:
            y:          [N, 1] phenotype vector
            Ie:         N boolean context indicator
            U_R:        [N, N] eigenvector matrix of R
            Xr:         [N, S] genotype data of the set component
            covs:       [N, K] matrix for K covariates
        """
        if covs is None:
            covs = sp.ones((y.shape[0], 1))
        # kroneckerize covs
        W = sp.zeros((y.shape[0], 2*covs.shape[1]))
        W[:, :covs.shape[1]] = Ie[:, sp.newaxis] * covs 
        W[:, covs.shape[1]:] = (~Ie[:, sp.newaxis]) * covs 

        # store stuff 
        self.Ie  = Ie
        self.Xr  = Xr
        self.covs = covs
        self.mean = lin_mean(y, W)
def __init__ ( self , y , Ie , Xr , covs = None ) : if covs is None : covs = sp . ones ( ( y . shape [ 0 ] , 1 ) ) W = sp . zeros ( ( y . shape [ 0 ] , 2 * covs . shape [ 1 ] ) ) W [ : , : covs . shape [ 1 ] ] = Ie [ : , sp . newaxis ] * covs W [ : , covs . shape [ 1 ] : ] = ( ~ Ie [ : , sp . newaxis ] ) * covs self . Ie = Ie self . Xr = Xr self . covs = covs self . mean = lin_mean ( y , W )
Args:
            y:          [N, 1] phenotype vector
            Ie:         N boolean context indicator
            U_R:        [N, N] eigenvector matrix of R
            Xr:         [N, S] genotype data of the set component
            covs:       [N, K] matrix for K covariates