*! version 1.0.0 PR 25Mar1999. STB-49 sg81.1 program define stfracp, eclass version 6 if "`1'"=="*" { local fpcmd mfracpol gettoken first 0 : 0 /* `first' is discarded */ } else { local fpcmd fracpoly } local first: word 1 of `0' if "`first'"=="" | substr("`first'",1,1)=="," { if "`e(cmd)'" != "cox" | "`e(fp_cmd2)'" != "`fpcmd'" { error 301 } `fpcmd' `0' exit } st_is 2 analysis local done0 0 tokenize `"`0'"', parse(" ,") while "`1'"!="" & !`done0' { if "`1'"==","|"`1'"=="if"|"`1'"=="in"|substr("`1'",1,1)=="[" { local 0 `*' local done0 1 } else { local varstuf `varstuf' `1' mac shift } } if !`done0' { local 0 } syntax [if] [in] [,CLuster(string) /* */ CMD ESTImate noHR Level(integer $S_level) Robust noSHow /* */ BRESlow EFRon EXACTM EXACTP * ] local id : char _dta[st_id] local w : char _dta[st_w] local wt : char _dta[st_wt] local t0 `"t0(_t0)"' local d `"dead(_d)"' tempvar touse st_smpl `touse' `"`if'"' `"`in'"' `"`cluster'"' markout `touse' if `"`wt'"'=="pweight" { local robust `"robust"' } if `"`robust'"'!="" & `"`cluster'"'=="" & `"`id'"'!="" { local cluster `"`id'"' } if `"`cluster'"'!="" { local cluster `"cluster(`cluster')"' } st_show `show' if `"`cmd'"'!="" { di _n in gr `"-> `fpcmd' cox _t `varstuf' `w' `if' `in',"' _c di in gr " `robust' `cluster' `t0' `hr' `d' `options' " _c di in gr " `breslow' `efron' `exactm' `exactp' " exit } * nocoef option removed di `fpcmd' cox _t `varstuf' `w' if `touse', `robust' `cluster' /* */ `t0' `d' `options' `breslow' `efron' `exactm' `exactp' est local cmd2 "stcox" global S_E_cmd2 "stcox" /* double save */ end