linearRegression
Analysis / Advanced Stats
linearRegression
Description
Get linear regression analysis between two questions.
Payload
{
"fromDate": string,
"toDate": string,
"questionId1": string,
"questionId2": string,
"filter": array
}
where:
fromDate: start date in ISO format. (Required).toDate: end date in ISO format. (Required).questionId1: Question identifier for thexaxis. (Required).questionId2: Question identifier for theyaxis. (Required).filter: array of filters to filter the responses. (Optional).
Response
200 OK
{
"x": "array",
"y": "array",
"slope": "number",
"intercept": "number",
"r": "number",
"r2": "number",
"adjustedR2": "number",
"stdErrorR2": "number",
"dfRegression": "integer",
"dfResidual": ""integer",
"dfTotal": "integer",
"n": "integer",
"regressionSS": "number",
"residualErrorSS": "number",
"totalSS": "integer",
"regressionMS": "number",
"residualErrorMS": "number",
"f": "number",
"fPValue": "number",
"slopeB": "number",
"slopeBError": "number",
"interceptB": "number",
"interceptBError": "number",
"slopeBeta": "number",
"slopeBT": "number",
"slopeBPvalue": "number",
"interceptBT": "number",
"interceptBPvalue": "number"
}
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.
POST
linearRegression
Description
Get linear regression analysis between two questions.Payload
fromDate: start date in ISO format. (Required).toDate: end date in ISO format. (Required).questionId1: Question identifier for thexaxis. (Required).questionId2: Question identifier for theyaxis. (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.