Error estimates of the integral deferred correction method for stiff problems