Endogenous treatment occurs when the treatment variable is correlated with the error term in a regression model. IV analysis can be used to estimate the causal effect of endogenous treatment, just as it is used to estimate the causal effect of an endogenous independent variable.