Getting a survival function that is properly adjusted for covariates is tricky. This webpage documents how you could do this using a Stata macro, stmp_standsurv.
Paul C. Lambert. Standardized survival functions. 2017-08-06.
An earlier version of this page was published on new.pmean.com.