There are so many units, the combinations are too numerous...
The balance also greatly depends on the experience, weapon and armor values a unit has.
Caverly vs Spears.
All spears and pikes defeat cavalry in a frontal engagement.
Only some cavalry can really hit spears but almost always at terrible losses. So. Never attack spears with caverly unless the enemy unit is wavering, fleeing or turning its rear to you while frontaly engaged.
Any phalanx unit is slow so it is an ideal target for missile cavalry. Be ware that an advancing line of phalanxes can still trap missile cavalry, which means lot of casualties, annihilation or rout.