Skip to main content
POST
linearRegression

Description

Get linear regression analysis between two questions.

Payload

where:
  • fromDate: start date in ISO format. (Required).
  • toDate: end date in ISO format. (Required).
  • questionId1: Question identifier for the x axis. (Required).
  • questionId2: Question identifier for the y axis. (Required).
  • filter: array of filters to filter the responses. (Optional).

Response

200 OK

  • x: n-size array where the nth is the option position for the nth answer of question 1.
  • y: n-size array where the nth is the option position for the nth answer of question 2.
  • slope: Slope or gradient. Commonly denoted as m in y = m * x + b.
  • intercept: Commonly denoted as b in in y = m * x + b.
  • r: Correlation coefficient.
  • r2: Correlation coefficient squared.
  • adjustedR2: Adjusted correlation coefficient squared.
  • stdErrorR2: a.k.a Standard error of the regression, standard error of the estimate.
  • dfRegression: Degrees of freedom for regression, set as 1.
  • dfResidual: Residual degrees of freedom.
  • dfTotal: Degrees of freedom.
  • n: Number of data points.
  • regressionSS: Regression sum of squares.
  • residualErrorSS: Residual sum of squares.
  • totalSS: Total sum of squares.
  • regressionMS: Regression mean square.
  • residualErrorMS: Residual mean square.
  • f: F-test.
  • fPValue: F-test P value.
  • slopeB: Slope B (based on standard deviation).
  • slopeBError: Standard error of B.
  • interceptB: Intercept B.
  • interceptBError: Error of intercept.
  • slopeBeta: Beta coefficient.
  • slopeBT: Slope BT.
  • slopeBPvalue: B-test P value.
  • interceptBT: Intercept BT.
  • interceptBPvalue: Intercept B-test P value.

401 Unauthorized

If user don’t have permission to use this endpoint.

500 Internal Server Error

If there is a problem with the service.
Query Parameters

Authorizations

Authorization
string
header
required

Access token obtained from the m2m-token endpoint.

Headers

Authorization
string
required

Auth token

Query Parameters

projectId
string

Body

application/json

The body is of type object.

Response

Successful response