Quick Start

Counterfactual Example

cf = model.counterfactual(replacement_cost=4.0)

print(f"replacement_cost={cf.params['replacement_cost']:.6f}")
print(f"P(replace | state=50)={cf.policy[50, 1]:.6f}")

Result

replacement_cost=4.000000
P(replace | state=50)=0.054908

This solves the fitted model again with a higher replacement cost and returns the new value function and policy.

Advanced API

Use econirl.estimation.ccp.CCPEstimator when you need direct control over panel objects, utility objects, transition tensors, CCP smoothing, NPL stopping rules, or diagnostic metadata.