Skip to content

Commit 9a009af

Browse files
authored
Release 2.1.0 (#412)
1 parent ffb74aa commit 9a009af

9 files changed

Lines changed: 92 additions & 689 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
- id: debug-statements
1111
- id: end-of-file-fixer
1212
- repo: https://github.com/asottile/pyupgrade
13-
rev: v2.18.2
13+
rev: v2.19.0
1414
hooks:
1515
- id: pyupgrade
1616
args: [--py36-plus]
@@ -19,7 +19,7 @@ repos:
1919
hooks:
2020
- id: reorder-python-imports
2121
- repo: https://github.com/psf/black
22-
rev: 21.5b1
22+
rev: 21.5b2
2323
hooks:
2424
- id: black
2525
- repo: https://github.com/asottile/blacken-docs

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
author = "The respy Development Team"
1919

2020
# The full version, including alpha/beta/rc tags.
21-
release = "2.0.0"
21+
release = "2.1.0"
2222
version = ".".join(release.split(".")[:2])
2323

2424
# -- General configuration ------------------------------------------------

docs/development/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ for contributors.
5555
<div class="card-body flex-fill">
5656
<h5 class="card-title">Releases</h5>
5757
<p class="card-text">
58-
Informatio on version numbering and how
58+
Information on version numbering and how
5959
to release a new version.
6060
</p>
6161
</div>

docs/how_to_guides/how_to_likelihood.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@
317317
" <span class=\"badge badge-info\">How-to Guide</span>\n",
318318
"\n",
319319
" To learn more about the model options see the guide <a\n",
320-
" href=\"how_to_specify_model.html\">Specfiying a Model</a>.\n",
320+
" href=\"how_to_specify_model.html\">Specifying a Model</a>.\n",
321321
"</div>"
322322
]
323323
},
@@ -350,7 +350,7 @@
350350
"name": "python",
351351
"nbconvert_exporter": "python",
352352
"pygments_lexer": "ipython3",
353-
"version": "3.7.10"
353+
"version": "3.8.3"
354354
}
355355
},
356356
"nbformat": 4,

docs/how_to_guides/how_to_msm_estimation_exercise.ipynb

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,22 @@
6262
"cell_type": "markdown",
6363
"metadata": {},
6464
"source": [
65-
"## Setup Estimation\n",
66-
"\n",
65+
"## Setup Estimation"
66+
]
67+
},
68+
{
69+
"cell_type": "markdown",
70+
"metadata": {},
71+
"source": [
72+
"<div class=\"alert alert-block alert-info\">\n",
73+
"**Note:** This guide was created using version 0.0.31 of estimagic and version 2.0.0 of respy. Please note that the guide is not updated regularly so using newer versions of the packages may require adjustments to the code.\n",
74+
"</div>"
75+
]
76+
},
77+
{
78+
"cell_type": "markdown",
79+
"metadata": {},
80+
"source": [
6781
"### Configure MSM Inputs"
6882
]
6983
},
@@ -906,7 +920,7 @@
906920
" replace_nans=replace_nans,\n",
907921
" empirical_moments=empirical_moments,\n",
908922
" weighting_matrix=weighting_matrix,\n",
909-
" return_scalar=False,\n",
923+
" return_simulated_moments=True,\n",
910924
")"
911925
]
912926
},
@@ -928,8 +942,8 @@
928942
" fig, axes = plt.subplots(3, 2, figsize=(12, 10))\n",
929943
" axes = axes.ravel()\n",
930944
" for i, key in enumerate(params_dict):\n",
931-
" out = get_simulated_moments(params_dict[key])\n",
932-
" out[\"simulated_moments\"][moment_set].plot(ax=axes[i], title=key, ylim=[ymin, ymax])\n",
945+
" _, moments = get_simulated_moments(params_dict[key])\n",
946+
" moments[moment_set].plot(ax=axes[i], title=key, ylim=[ymin, ymax])\n",
933947
" plt.tight_layout()\n",
934948
"\n",
935949
" empirical_moments[moment_set].plot(ax=axes[4], title=\"Observed\", ylim=[ymin, ymax])\n",
@@ -1047,7 +1061,7 @@
10471061
"metadata": {},
10481062
"outputs": [],
10491063
"source": [
1050-
"out = get_simulated_moments(params_dict[\"(4) Final result\"])"
1064+
"_, simulated_moments = get_simulated_moments(params_dict[\"(4) Final result\"])"
10511065
]
10521066
},
10531067
{
@@ -1060,7 +1074,7 @@
10601074
"source": [
10611075
"diff = {}\n",
10621076
"diff[\"Choice Frequencies\"] = (\n",
1063-
" empirical_moments[\"Choice Frequencies\"] - out[\"simulated_moments\"][\"Choice Frequencies\"]\n",
1077+
" empirical_moments[\"Choice Frequencies\"] - simulated_moments[\"Choice Frequencies\"]\n",
10641078
")"
10651079
]
10661080
},
@@ -1078,7 +1092,7 @@
10781092
"outputs": [],
10791093
"source": [
10801094
"diff[\"Wage Distribution\"] = (\n",
1081-
" empirical_moments[\"Wage Distribution\"] - out[\"simulated_moments\"][\"Wage Distribution\"]\n",
1095+
" empirical_moments[\"Wage Distribution\"] - simulated_moments[\"Wage Distribution\"]\n",
10821096
") / empirical_moments[\"Wage Distribution\"]"
10831097
]
10841098
},
@@ -1296,7 +1310,7 @@
12961310
"metadata": {},
12971311
"outputs": [],
12981312
"source": [
1299-
"out = get_simulated_moments(rslt_constants[1])"
1313+
"_, simulated_moments = get_simulated_moments(rslt_constants[1])"
13001314
]
13011315
},
13021316
{
@@ -1311,10 +1325,10 @@
13111325
" title=\"Choices Empirical\", ax=axes[0, 0]\n",
13121326
" )\n",
13131327
" empirical_moments[\"Wage Distribution\"].plot(title=\"Wages Empirical\", ax=axes[0, 1])\n",
1314-
" out[\"simulated_moments\"][\"Choice Frequencies\"].plot(\n",
1328+
" simulated_moments[\"Choice Frequencies\"].plot(\n",
13151329
" title=\"Choices Simulated\", ax=axes[1, 0]\n",
13161330
" )\n",
1317-
" out[\"simulated_moments\"][\"Wage Distribution\"].plot(title=\"Wages Simulated\", ax=axes[1, 1])"
1331+
" simulated_moments[\"Wage Distribution\"].plot(title=\"Wages Simulated\", ax=axes[1, 1])"
13181332
]
13191333
},
13201334
{
@@ -1412,7 +1426,7 @@
14121426
"metadata": {},
14131427
"outputs": [],
14141428
"source": [
1415-
"out = get_simulated_moments(rslt_refined[1])"
1429+
"_, simulated_moments = get_simulated_moments(rslt_refined[1])"
14161430
]
14171431
},
14181432
{
@@ -1434,7 +1448,7 @@
14341448
}
14351449
],
14361450
"source": [
1437-
"plot_all_moments(empirical_moments, out[\"simulated_moments\"])"
1451+
"plot_all_moments(empirical_moments, simulated_moments)"
14381452
]
14391453
},
14401454
{
@@ -1491,7 +1505,7 @@
14911505
"name": "python",
14921506
"nbconvert_exporter": "python",
14931507
"pygments_lexer": "ipython3",
1494-
"version": "3.7.10"
1508+
"version": "3.8.3"
14951509
},
14961510
"toc": {
14971511
"base_numbering": 1,

0 commit comments

Comments
 (0)