diff_diff.SimulationMDEResults#

class diff_diff.SimulationMDEResults[source]#

Bases: object

Results from simulation-based minimum detectable effect search.

mde#

Minimum detectable effect (smallest effect achieving target power).

Type:

float

power_at_mde#

Power achieved at the MDE.

Type:

float

target_power#

Target power used in the search.

Type:

float

alpha#

Significance level.

Type:

float

n_units#

Sample size used.

Type:

int

n_simulations_per_step#

Number of simulations per bisection step.

Type:

int

n_steps#

Number of bisection steps performed.

Type:

int

search_path#

Diagnostic trace of {effect_size, power} at each step.

Type:

list of dict

estimator_name#

Name of the estimator used.

Type:

str

effective_n_units#

Effective sample size when it differs from the requested n_units (e.g., due to DDD grid rounding). None when no rounding occurred.

Type:

int or None

Methods

__init__(mde, power_at_mde, target_power, ...)

summary()

Generate a formatted summary.

to_dataframe()

Convert results to a single-row DataFrame.

to_dict()

Convert results to a dictionary.

Attributes

__init__(mde, power_at_mde, target_power, alpha, n_units, n_simulations_per_step, n_steps, search_path, estimator_name, effective_n_units=None, survey_config=None)#
Parameters:
Return type:

None

classmethod __new__(*args, **kwargs)#