Skip to content

statspai.matrix_completion

matrix_completion

Matrix Completion for Causal Panel Data.

Estimates treatment effects in panel settings by completing the counterfactual matrix of untreated potential outcomes using nuclear-norm regularisation (low-rank matrix completion).

References

Athey, S., Bayati, M., Doudchenko, N., Imbens, G., & Khosravi, K. (2021). Matrix Completion Methods for Causal Panel Data Models. JASA, 116(536), 1716-1730. [@athey2021matrix]

MCPanel

Matrix Completion for Causal Panels.

Parameters:

Name Type Description Default
data DataFrame
required
y str
required
unit str
required
time str
required
treat str
required
lambda_reg float
None
max_rank int
None
max_iter int
1000
tol float
1e-05
n_bootstrap int
200
alpha float
0.05
random_state int
42

fit

fit() -> CausalResult

Run matrix completion and return treatment effect estimates.