borsar.stats.compute_regression_t

borsar.stats.compute_regression_t(data, preds, return_p=False)[source]

Compute regression t values for whole multidimensional data space.

Parameters:
data : numpy array of shape (observations, …)

Data to perform regression on. Frist dimension represents observations (for example trials or subjects).

preds : numpy array of shape (observations, predictors)

Predictor array to use in regression.

return_p : bool

If True - also return p values. Defaults to False.

Returns:
t_vals : numpy array of shape (predictors, …)

T values for all predictors for the original data space.

p_vals : numpy array of shape (predictors, …)

P values for all predictors for the original data space.