Assuming that your AdvanceTrac is similar to the one in a Lincoln LS...
C1998 - Module Calibration Not Complete Stability Assist (AdvanceTrac) Module
C1281 - Lateral Accelerometer Circuit Failure Stability Assist (AdvanceTrac) Module
This fits with your symptom. The lateral accelerometer tells the AdvanceTrac if the car is moving to the left or right. If what it says does not match with the angle of the steering, then the system assumes that the car is sliding and will apply the brakes to whichever wheels it thinks will best correct the issue. It will also probably reduce engine power.
You'll have to find and correct the yaw sensor problem before trying to run the calibration routine, I think.