diff_diff.PowerResults
- class diff_diff.PowerResults[source]
Bases:
objectResults from analytical power analysis.
- __init__(power, mde, required_n, effect_size, alpha, alternative, n_treated, n_control, n_pre, n_post, sigma, rho=0.0, design='basic_did')
Methods
__init__(power, mde, required_n, ...[, rho, ...])Print the summary to stdout.
summary()Generate a formatted summary of power analysis results.
Convert results to a pandas DataFrame.
to_dict()Convert results to a dictionary.
Attributes
- summary()[source]
Generate a formatted summary of power analysis results.
- Returns:
Formatted summary table.
- Return type:
- to_dict()[source]
Convert results to a dictionary.
- Returns:
Dictionary containing all power analysis results.
- Return type:
Dict[str, Any]
- to_dataframe()[source]
Convert results to a pandas DataFrame.
- Returns:
DataFrame with power analysis results.
- Return type:
pd.DataFrame
- __init__(power, mde, required_n, effect_size, alpha, alternative, n_treated, n_control, n_pre, n_post, sigma, rho=0.0, design='basic_did')