Updated some R code for Markov credit model