Custom utility functions.
This package contains a collection of utility functions for empirical work in Python. It's in progress and the API may change often. In addition to custom utility methods, the package includes wrappers for fixest and did.
Example: Given a dataframe df with columns x, y, group_a, group_b
run a regression of y on x with group fixed effects, and double cluster:
from nostocalean import est
summary = est.reg("y ~ x | group_a + group_b", data=df, cluster="~group_a+group_b")
print(summary)Example: Given a dataframe df with columns y, first_treat, group, time
report event study (aggregated group-time) estimates:
from nostocalean import est
summary = est.es(y="y", d="first_treat", g="group", t="time", data=df)
print(summary)Nostocalean also includes several utility functions, including CES and HARA
Example: To sample a utility function, run:
from nostocalean import utility_functions
utility_functions.get_utility_function()