statsmodels.tools.tools.isestimable
-
statsmodels.tools.tools.isestimable(C, D)[source] -
True if (Q, P) contrast
Cis estimable for (N, P) designDFrom an Q x P contrast matrix
Cand an N x P design matrixD, checks if the contrastCis estimable by looking at the rank ofvstack([C,D])and verifying it is the same as the rank ofD.Parameters: C : (Q, P) array-like
contrast matrix. If
Chas is 1 dimensional assume shape (1, P)D: (N, P) array-like :
design matrix
Returns: tf : bool
True if the contrast
Cis estimable on designDExamples
>>> D = np.array([[1, 1, 1, 0, 0, 0], ... [0, 0, 0, 1, 1, 1], ... [1, 1, 1, 1, 1, 1]]).T >>> isestimable([1, 0, 0], D) False >>> isestimable([1, -1, 0], D) True
Please login to continue.