Factors associated with compliance in treatment of tuberculosis