Update transition_estimation_w_gradient.Rscript