Modeling Loan Commitments and Liquidity Crisis: Theory and Estimation