SyntheticDID

Guide & worked example · Source

SyntheticDID(
    eta_omega=None,
    eta_lambda=1e-06,
    zeta_omega=None,
    zeta_lambda=None,
    omega_intercept=True,
    lambda_intercept=True,
    min_decrease=1e-08,
    maxiter=1000,
    sparsify=True,
    omega=None,
    lambda_weights=None,
    update_omega=None,
    update_lambda=None,
    device=None,
)

Synthetic difference-in-differences with two-way balancing weights.

Attributes

Name Description
device
eta_lambda
eta_omega
lambda_intercept
lambda_weights
maxiter
min_decrease
omega
omega_intercept
params
sparsify
update_lambda
update_omega
zeta_lambda
zeta_omega

Methods

Name Description
fit
predict
sparsify_weights
summary Print a summary of the model results.
to Move all model parameters to specified device.

fit

SyntheticDID.fit(Y, N0, T0)

predict

SyntheticDID.predict()

sparsify_weights

SyntheticDID.sparsify_weights(weights)

summary

SyntheticDID.summary()

Print a summary of the model results.

to

SyntheticDID.to(device)

Move all model parameters to specified device.

Parameters

Name Type Description Default
device torch.device or str Target device (‘cuda’, ‘cpu’, etc.) required

Returns

Name Type Description
BaseEstimator Self for method chaining