How far into the program should a doctoral candidate transfer to a different school?
There really aren't "transfers" at the PhD level as there are with undergraduates. What might happen at best is that you:


Get some credit for coursework done, or for core-course requirements (like stats, etc.)
Rarely, a student can come in with their MA/MPhil and waive coursework and advance to candidacy.


But everything at this level is ad hoc. Sometime, students can switch programs -- especially if it's in the context of their advisor moving from University A to University B and taking their students with them, other times it's impossible.

It's all up to the university, the program, your advisor, and the alignment of the stars in heaven. 

Otherwise you apply as a new student and start off at zero. Most students who do this do it in their first or second year, it becomes much harder the more advanced you are.