mergeron¶
Variables, types, objects and functions used throughout the package.
Submodules¶
Package Contents¶
- mergeron.WORK_DIR[source]¶
If defined, the global variable WORK_DIR is used as a data store.
If the user does not define WORK_DIR, a subdirectory in the user’s home directory, named for this package, is created/reused.
-
mergeron.allclose(_a, _b, /, *, rtol=
1e-14, atol=1e-15, equal_nan=True)[source]¶ Redefine native numpy function with updated default tolerances.
-
mergeron.assert_allclose(_a, _b, /, *, rtol=
1e-14, atol=1e-15, equal_nan=True, err_msg='', verbose=False, strict=True)[source]¶ Redefine native numpy function with updated default tolerances, type-enforcing.
- mergeron.yaml_rt_mapper(_c, _n)[source]¶
Construct mapping from a mapping node with the RoundTripConstructor.
-
mergeron.yamelize_attrs(_typ, /, *, attr_map=
PKG_ATTRS_MAP)[source]¶ Add yaml representer, constructor for attrs-defined class.
Attributes with property, init=False are not serialized/deserialized to YAML by the functions defined here. These attributes can, of course, be dumped to stand-alone (YAML) representation, and deserialized from there.
- class mergeron.Enameled(*args, **kwds)[source]¶
Bases:
enum.EnumAdd YAML representer, constructor for enum.Enum.
- class mergeron.RECForm[source]¶
Bases:
str,EnameledFor derivation of recapture rate from market shares.
With \(\mathscr{N}\) a set of firms, each supplying a single differentiated product, and \(\mathscr{M} \subset \mathscr{N}\) a putative relevant product market, with \(d_{ij}\) denoting diversion ratio from good \(i\) to good \(j\), \(s_i\) denoting market shares, and \(\overline{r}\) the default market recapture rate, market recapture rates for the respective products may be specified as having one of the following forms:
-
FIXED =
'fixed'[source]¶ Given, \(\overline{r}\),
\[REC_i = \overline{r} {\ } \forall {\ } i \in \mathscr{M}\]
-
FIXED =