FunctionRacerProblemsRace

Room for the Intercept

BeginnerstatsmodelsPython

A regression in statsmodels has no intercept unless the data carry a column of 1s for it. Return x as a table with that column of 1s in front and the values of x as the second column.

Example 1

x [3,5,8]
returns [[1.0,3.0],[1.0,5.0],[1.0,8.0]]

Each row is a 1 followed by the value.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More statsmodels problems