labs.glm.glm¶
Module: labs.glm.glm
¶
Inheritance diagram for nipy.labs.glm.glm
:
Classes¶
contrast
¶
- class nipy.labs.glm.glm.contrast(dim, type='t', tiny=1e-50, dofmax=10000000000.0)¶
Bases:
object
- __init__(dim, type='t', tiny=1e-50, dofmax=10000000000.0)¶
tiny is a numerical constant for computations.
- pvalue(baseline=0.0)¶
Return a parametric approximation of the p-value associated with the null hypothesis: (H0) ‘contrast equals baseline’
- stat(baseline=0.0)¶
Return the decision statistic associated with the test of the null hypothesis: (H0) ‘contrast equals baseline’
- summary()¶
Return a dictionary containing the estimated contrast effect, the associated ReML-based estimation variance, and the estimated degrees of freedom (variance of the variance).
- zscore(baseline=0.0)¶
Return a parametric approximation of the z-score associated with the null hypothesis: (H0) ‘contrast equals baseline’
glm
¶
- class nipy.labs.glm.glm.glm(Y=None, X=None, formula=None, axis=0, model='spherical', method=None, niter=2)¶
Bases:
object
- __init__(Y=None, X=None, formula=None, axis=0, model='spherical', method=None, niter=2)¶
- contrast(c, type='t', tiny=1e-50, dofmax=10000000000.0)¶
Specify and estimate a contrast
c must be a numpy.ndarray (or anything that numpy.asarray can cast to a ndarray). For a F contrast, c must be q x p where q is the number of contrast vectors and p is the total number of regressors.
- fit(Y, X, formula=None, axis=0, model='spherical', method=None, niter=2)¶
- save(file)¶
Save fit into a .npz file
Functions¶
- nipy.labs.glm.glm.load(file)¶
Load a fitted glm
- nipy.labs.glm.glm.ols(Y, X, axis=0)¶
Essentially, compute pinv(X)*Y