 foreach age in 50 65 80 {\lbr}
  2.   foreach cause in cancer cvd other {\lbr}
  3.      standsurv if _n==1, at1(${\lbr}`cause'_leastdep_`age'_male{\rbr}) ///
>            at2(${\lbr}`cause'_mostdep_`age'_male{\rbr}) ///
>            atvars(LYL_`age'_`cause'_leastdep LYL_`age'_`cause'_mostdep) ///
>            contrast(difference) contrastvar(LYL_`cause'`age'_diff) ///
>            rmft timevar(tempt) ci
  4.   {\rbr}
  5. {\rbr}
{\smallskip}
 mata mata clear
 mata 
 function RMFT(at) {\lbr}
2.   return((at[1]:+at[2]:+at[3]))
3. {\rbr}
{\smallskip}
 end


