tools.tools.isestimable()

statsmodels.tools.tools.isestimable

statsmodels.tools.tools.isestimable(C, D) [source]

True if (Q, P) contrast C is estimable for (N, P) design D

From an Q x P contrast matrix C and an N x P design matrix D, checks if the contrast C is estimable by looking at the rank of vstack([C,D]) and verifying it is the same as the rank of D.

Parameters:

C : (Q, P) array-like

contrast matrix. If C has is 1 dimensional assume shape (1, P)

D: (N, P) array-like

design matrix

Returns:

tf : bool

True if the contrast C is estimable on design D

Examples

>>> 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

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.tools.tools.isestimable.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部