This just writes new values into X as if it were an output variable. Internal function used within estimate_m_rd.
estimate_m_rd
gibbsX(X, Y, R, p, M)