.- help for ^sttody^ (STB-40: ssa10) .- Converting st data to dy data ----------------------------- ^sttody^ varname varname [^,^ ^fc^odes^(^codes^)^ ^sc^ale^(^#^)^ ^by(^varlist^)^] Description ----------- The two varnames are new variables to contain the event count, d, and the rate denominator, y. If there is no ^by^ option, one record is created for each unique value of the id variable declared in ^stset^. Thus, when there are multiple records with the same id, the size of the dataset is reduced. Any time-varying variables will take on their first recorded value in the reduced data set. The ^by^ option limits this collapsing down of multiple records into groups specified by a list of categorical variables. For example, all records for the same subject and which refer to the same age band could be aggregated to form the new record by using a ^by(^ageband^)^ option. If no id variable is set, each record is taken as referring to a unique subject. Options ------- ^fcodes( )^ specifies the codes to be treated as failures, all others to be treated as censoring. ^scale( )^specifies the units for the analysis time scale - that is, units for y, the rate denominator. ^by( )^ specifies the variables by which the data will be disaggregated within subject id. Examples -------- ^sttody d y, fcodes( 1 3 13) scale(365.25) by(ageband)^ Authors ------- David Clayton MRC Biostatistical Research Unit Cambridge email: david.clayton@@mrc-bsu.cam.ac.uk Michael Hills London School of Hygiene and Tropical Medicine (retired) email: mhills@@regress.demon.co.uk Also see -------- STB: STB-40 ssa10 On-line: help for @stset@, @stlexis@, @dyrate@, @dymh@