Probably the biggest takeaway here is to keep praise public and criticism under the table. A lot of people struggle to take critical advice and feedback well, it's just a human nature thing. You wouldn't collar a mate on an evening out and tell him that he actually really does stink infront of everyone else and expect him to take it well. Coming down on someone's mistakes or shortcomings in a raid setting isn't much different. You simply do it quietly or you can expect bad things to happen.
The point at which you replace someone is much more subjective though. Personally I've got absolutely no time for repetitive inconsistency. Sure stuff happens, you get family/partner agro etc, one offs are no problem at all, but when it's every other raid day? I don't care if the reasons are legitimate or not. You're ruining and wasting 7 other people's evening so for the good of all, it's time to move on.
As far as skill goes? Some people take longer than others to learn and understand an encounter, so I like to be as leanient as the group's momentum will allow frankly. If someone's got a good attitude and at least understands that they are making a mistake whilst being willing to listen and be coached through it, then it's all good in my eyes.