Skip to content

Commit

Permalink
Merge pull request #623 from bashtage/clean-code
Browse files Browse the repository at this point in the history
MAINT: Clean up code
  • Loading branch information
bashtage authored Nov 6, 2024
2 parents c840e31 + 1ac7b8d commit 7f29b34
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions examples/iv_basic-examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@
"outputs": [],
"source": [
"import numpy as np\n",
"from linearmodels.datasets import mroz\n",
"import pandas as pd\n",
"from statsmodels.api import add_constant\n",
"\n",
"from linearmodels.datasets import mroz\n",
"\n",
"print(mroz.DESCR)\n",
"data = mroz.load()\n",
"data = data.dropna()\n",
Expand Down Expand Up @@ -573,7 +575,7 @@
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"v = IV2SLS(data[endog], data[exog + instr], None, None).fit().resids\n",
"\n",
"v = IV2SLS(data[endog], data[exog + instr], None, None).fit().resids\n",
"\n",
Expand Down
2 changes: 2 additions & 0 deletions examples/panel_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"outputs": [],
"source": [
"import pandas as pd\n",
"\n",
"from linearmodels.datasets import wage_panel\n",
"\n",
"data = wage_panel.load()\n",
Expand All @@ -54,6 +55,7 @@
"outputs": [],
"source": [
"import statsmodels.api as sm\n",
"\n",
"from linearmodels.panel import PooledOLS\n",
"\n",
"exog_vars = [\"black\", \"hisp\", \"exper\", \"expersq\", \"married\", \"educ\", \"union\", \"year\"]\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/system_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"# Common libraries\n",
"import numpy as np\n",
"import pandas as pd\n",
"import seaborn as sns\n",
"import statsmodels.api as sm"
]
},
Expand Down Expand Up @@ -180,7 +181,6 @@
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"import seaborn as sns\n",
"\n",
"cov = res.sigma\n",
"std = np.sqrt(np.diag(res.sigma)[:, None])\n",
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ isort>=5.12
ipython
matplotlib
ruff
jupyterlab-code-formatter
flake8
jupyter
nbconvert
Expand Down

0 comments on commit 7f29b34

Please sign in to comment.