labs.glm.glm

Module: labs.glm.glm

Inheritance diagram for nipy.labs.glm.glm:

digraph inheritance364f398220 { rankdir=LR; size="8.0, 12.0"; "glm.glm.contrast" [URL="#nipy.labs.glm.glm.contrast",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top"]; "glm.glm.glm" [URL="#nipy.labs.glm.glm.glm",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top"]; }

Classes

contrast

class nipy.labs.glm.glm.contrast(dim, type='t', tiny=1e-50, dofmax=10000000000.0)[source]

Bases: object

__init__(dim, type='t', tiny=1e-50, dofmax=10000000000.0)[source]

tiny is a numerical constant for computations.

summary()[source]

Return a dictionary containing the estimated contrast effect, the associated ReML-based estimation variance, and the estimated degrees of freedom (variance of the variance).

stat(baseline=0.0)[source]

Return the decision statistic associated with the test of the null hypothesis: (H0) ‘contrast equals baseline’

pvalue(baseline=0.0)[source]

Return a parametric approximation of the p-value associated with the null hypothesis: (H0) ‘contrast equals baseline’

zscore(baseline=0.0)[source]

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)[source]

Bases: object

__init__(Y=None, X=None, formula=None, axis=0, model='spherical', method=None, niter=2)[source]

Initialize self. See help(type(self)) for accurate signature.

fit(Y, X, formula=None, axis=0, model='spherical', method=None, niter=2)[source]
save(file)[source]

Save fit into a .npz file

contrast(c, type='t', tiny=1e-50, dofmax=10000000000.0)[source]

Specify and estimate a constrast

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.

Functions

nipy.labs.glm.glm.load(file)[source]

Load a fitted glm

nipy.labs.glm.glm.ols(Y, X, axis=0)[source]

Essentially, compute pinv(X)*Y