Mark Christiansen(from the orphanage) Covers this in his AE studio technique books (6.5 -7. and now updated to cs4 page 252 in cs4 print of book”stabalizing a moving shot”)
Basically you track the motion of the shot (a stabalize track ) – creat null w 3D enabled- – select all ANCHOR POINT keyframes fromstabalized shot – copy those keys to null – apply smooth expression(premade in expressions menu) to null..you can change values but default can be decent .. – AND PARENT your camera to the NULL– and LASTLY BUY HIS BOOK it really really helps anyone from beginer to expert in differetn ways..
https://www.amazon.com/gp/product/0321592018?ie=UTF8&tag=afteeffescri-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0321592018
I Love this guy books. I bought the 6.5 techniques bak in the day and it really accelerated my ae knowledge. .and now i got he CS4 updated book with new chapetersand addtional info and new examples..
ALSO he metnions to try MOCHA TRAKER for after effects.. wich i ddint know is a stand alone and COMES with AE CS4!!!! its in the cs4 directory and it even has a shortcut to the mocha app in programfiles.. HAD AE cs4 since beta and just read this in his book!!