stats_linear-regression
Perform OLS linear regression on provided x and y arrays. Computes slope, intercept, R², t-stats, p-values, standard errors, confidence intervals, and residuals.
Instructions
OLS linear regression with R-squared, t-stats, and standard errors.
Use when fitting a linear regression (OLS). Provide x and y arrays. Returns: slope, intercept, R², adjusted R², t-statistics, p-values, standard errors, confidence intervals, and residuals.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | Independent variable(s): 1D array for simple, 2D for multiple regression | |
| y | Yes | Dependent variable array | |
| confidence_level | No | Confidence level for intervals (e.g. 0.95 = 95%) |