# `causalis.dgp.panel_data_scm.base`

## Module Contents

### Classes

`PanelSCMGeneratorConfig` |
`PanelSCMGenerator` | Low-level panel SCM generator supporting Gaussian, Gamma, and Poisson outcomes.

### API

class causalis.dgp.panel_data_scm.base.PanelSCMGeneratorConfig
  n_donors: int

    5

  n_pre_periods: int

    20

  n_post_periods: int

    10

  time_start: int

    1

  time_freq: str

    ‘M’

  calendar_start: str

    ‘2000-01’

  treated_unit: Hashable

    ‘treated’

  donor_prefix: str

    ‘donor_’

  random_state: Optional[int]

    42

  return_panel_data: bool

    True

  dirichlet_alpha: float

    1.0

  rho_common: float

    0.0

  rho_donor: float

    0.0

  n_latent_factors: int

    0

  latent_loading_std: float

    0.35

  rho_latent: float

    0.0

  rho_prefit_mismatch: float

    0.0

  outcome_distribution: Literal[gaussian, gamma, poisson]

    ‘gaussian’

  treatment_effect: float

    2.0

  treatment_effect_slope: float

    0.0

  donor_noise_std: float

    0.2

  treated_noise_std: float

    0.1

  common_factor_std: float

    0.15

  latent_factor_std: float

    0.2

  prefit_mismatch_std: float

    0.0

  treatment_effect_mode: Literal[additive, multiplicative]

    ‘additive’

  treatment_effect_rate: float

    0.12

  gamma_shape: float

    6.0

  donor_noise_std_log: float

    0.15

  common_factor_std_log: float

    0.1

  latent_factor_std_log: float

    0.1

  prefit_mismatch_std_log: float

    0.08

class causalis.dgp.panel_data_scm.base.PanelSCMGenerator(config: causalis.dgp.panel_data_scm.base.PanelSCMGeneratorConfig)

  Low-level panel SCM generator supporting Gaussian, Gamma, and Poisson outcomes.

  Initialization

  generate(*, return_panel_data: Optional[bool] = None) → Union[pandas.DataFrame, causalis.data_contracts.panel_data_scm.PanelDataSCM]