Skip to content

Commit 4a5fa02

Browse files
author
Christopher Fonnesbeck
committed
Tweak to section 4
1 parent d3669cb commit 4a5fa02

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

4. Statistical Data Modeling.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,8 +1145,8 @@
11451145
"input": [
11461146
"from statsmodels.formula.api import ols as OLS\n",
11471147
"\n",
1148-
"data = pd.DataFrame(dict(x=x, x2=x**2, y=y))\n",
1149-
"cubic_fit = OLS('y ~ x + x2', data).fit()\n",
1148+
"data = pd.DataFrame(dict(x=x, y=y))\n",
1149+
"cubic_fit = OLS('y ~ x + I(x**2)', data).fit()\n",
11501150
"\n",
11511151
"cubic_fit.summary()"
11521152
],

0 commit comments

Comments
 (0)