.- help for ^stmh^ (STB-40: ssa10) .- Calculation of rate ratios using ^st^ data ------------------------------------------ ^stmh^ varname [varlist] [^if^ exp] [^in^ range] [, ^by(^varlist^)^ ^c^ompare^(^rule1^,^rule2^)^ ^fc^odes^(^rule^)^ ^nom^iss ^l^evel^(^#^)^] Description ----------- In its simplest use, ^stmh^ estimates the ratio of the rates of failure for two categories of the explanatory variable (the first argument). Categories to be compared may be defined, as ^recode^ rules, in the ^compare^ option. Alternatively the command may be used to carry out trend tests for a metric explanatory variable. In this latter case a one-step Newton approximation to the log-linear Poisson regression coefficient is also computed. The remaining variables before the comma are categorical variables which are to be controlled for using stratification. Strata are defined by cross-classification by all of these variables and the rate ratio estimate is combined over strata using the Mantel-Haenszel method. Using the ^by^ option, the variation of the rate ratio with further categorical variables may be explored. Upon completion, the macro ^S_1^ contains the overall Mantel-Haenszel estimate of the rate ratio, thus facilitating bootstrap and jackknife evaluation of confidence intervals. Options ------- ^by(^varlist^)^ specifies categorical variables by which the rate ratio is to be tabulated. A separate rate ratio produced for each category or combination of categories, and a test for unequal separate rate ratios is given. The same applies when the rate ratio for a unit increase in xvar is given in place of the rate ratio. ^compare(^rule1^,^rule2^)^ defines, the categories of the exposure variable to be compared. Categories are defined by the left-hand side of ^recode^ rules. The first rule defines the numerator categories and the second the denominator. When ^compare^ is absent and there are only two categories, the larger is compared to the smaller; when there are more than two categories an analysis for (log-linear) trend is carried out. ^fcodes()^ specifies, as the left-hand side of a recode rule, the codes for the failure indicator in the ^st^ data which will be considered as failure. All other codes are treated as censoring. ^nomiss^ specifies that only cases that have no missing values for any stratifying variables should be included. Otherwise missing values will define new strata in the analysis. ^level(^#^)^ gives the level for the confidence intervals (default 95). Examples -------- ^stmh smoke age, c(2,1) by(sex)^ - RR for smoking, controlled for age, by sex ^stmh smoke age sex, c(2,1)^ - RR for smoking, controlled for age and sex ^stmh ncigs age sex^ - Trend analysis for cigarettes/day ^stmh ncigs age sex, c(21/max,1/20)^ - Heavy smoking vs light smoking 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 @stmc@, @dymh@, @stlexis@