Fit a multiple linear regression
statistics_linear-regressionOrdinary least squares by Householder QR with coefficient standard errors, t-tests and intervals, R-squared, F, VIF, Durbin-Watson, Breusch-Pagan and confidence and prediction intervals. Matches NIST StRD Norris and Longley. Price $0.05 USDC. POST /api/v1/statistics/linear-regression. An unpaid call returns the x402 payment terms and does not run.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"y": "<y>",
"X": "<X>"
},
"name": "statistics_linear-regression"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| X | Yes | X, array. Required. | |
| y | Yes | y, array. Required. | |
| names | No | names, array. Optional. | |
| predict | No | predict, array. Optional. | |
| intercept | No | intercept, boolean. Required. | |
| confidence | No | confidence, number. Required. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| F | No | F. Number. | |
| n | No | n. Number. | |
| dfModel | No | dfModel. Number. | |
| sources | No | sources. Array. | |
| rSquared | No | rSquared. Number. | |
| dfResidual | No | dfResidual. Number. | |
| residualSd | No | residualSd. Number. | |
| adjRSquared | No | adjRSquared. Number. | |
| droppedRows | No | droppedRows. Number. | |
| limitations | No | limitations. Array. | |
| predictions | No | predictions. Array. | |
| breuschPagan | No | breuschPagan. Object. | |
| coefficients | No | coefficients. Array. | |
| durbinWatson | No | durbinWatson. Number. |