Reorder g_est and g(j) to match the column labels