*! version 1.0.0 PR 31Mar98. STB-43 sg82 program define stfracp version 5.0 if "`1'"=="m" { local cmd mfracpol mac shift } else { local cmd fracpoly } if "`1'"=="" | substr("`1'",1,1)=="," { if "$S_E_cmd" != "cox" | "$S_E_fp" != "`cmd'" { error 301 } `cmd' `*' exit } st_is local varlist "req ex min(1)" local options "CLuster(string) Robust *" local if "opt" local in "opt" parse "`*'" local id : char _dta[st_id] local t : char _dta[st_t] local t0 : char _dta[st_t0] local d : char _dta[st_d] local w : char _dta[st_w] local wt : char _dta[st_wt] tempvar touse st_smpl `touse' "`if'" "`in'" "`cluster'" markout `touse' `varlist' if "`wt'"=="pweight" { local robust "robust" } if "`robust'"!="" & "`cluster'"=="" & "`id'"!="" { local cluster "`id'" } if "`cluster'"!="" { local cluster "cluster(`cluster')" } if "`t0'" != "" { local t0 "t0(`t0')" } if "`d'" != "" { local d "dead(`d')" } if "`w'"!="" { local wifin " `w'" } if "`if'"!="" { local wifin "`wifin' `if'" } if "`in'"!="" { local wifin "`wifin' `in'" } if "`robust'"!="" { local rct " `robust'" } if "`cluster'"!="" { local rct "`rct' `cluster'" } if "`t0'"!="" { local rct "`rct' `t0'" } di _n in gr "-> `cmd' cox `t' `varlist'`wifin', `d'`rct' `options'" `cmd' cox `t' `varlist' `w' if `touse', `d'`rct' `options' global S_E_cmd2 stcox end