Error estimation in the method of quasi-optimal weights