nispace.stats.coloc.r2
- nispace.stats.coloc.r2(x, y, adj_r2=True)[source]
Compute R2 for Regression of predictor(s) x on target y. Requires numpy arrays with columns as predictors/target.
- Parameters:
x (numpy.ndarray) – shape (n_values, n_predictors)
y (numpy.ndarray) – shape (n_values, 1) or (n_values,)
adj_r2 (bool, optional) – Calculate adjusted R2. Defaults to True.
- Returns:
(adjusted) R2
- Return type:
float