phys2cvr.stats.regression¶
- phys2cvr.stats.regression(data, regr, denoise_mat=None, ortho_mat=None, extra_mat=None, mask=None, r2model='full', debug=False, x1D='mat.1D')[source]¶
Estimate regression parameters.
- Parameters:
- data
np.ndarray 4D dependent variable (Y).
- regr
np.ndarray Regressor of interest.
- denoise_mat
np.ndarrayorNone, optional Confounding effects (regressors)
- ortho_mat
np.ndarrayorNone, optional Confounding effects (regressors) which will be orthogonalised with respect to regr, denoise_mat, and extra_mat
- extra_mat
np.ndarrayorNone, optional Extra factors (regressors) that will be used to orthogonalise ortho_mat
- mask
np.ndarrayorNone, optional A 3D mask to reduce the number of voxels to run the regression for.
- r2model{full, partial, intercept, adj_full, adj_partial, adj_intercept}, optional
R^2 model the regression should return (and hence used for lag selection). Potentially invariant if no orthogonalisation is introduced, will change results with orthogonalisations. See stats.ols help for more details. Default: full
- debug
bool, optional If True, save regressor matrices. Default is False.
- x1D
str, optional Filename for debug export. Default is ‘mat.1D’.
- data
- Returns:
np.ndarrayBeta map
np.ndarrayT-stat map
np.ndarrayR^2 map
- Raises:
ValueErrorIf denoise_mat and regr do not have at least one common dimension.