A survival model of pretrial failure