.- help for ^mhrate^ (STB-27: ssa7) .- Calculation of rate ratios -------------------------- ^mhrate^ fail xvar [varlist] [^if^ exp] [^in^ range] ^e^xposure^(^fup^)^ [^,^ ^by(^varlist^)^ ^c^ompare^(^val1^,^val2^)^ ^l^evel^(^#^)^] Description ----------- ^mhrate^ estimates the ratio of the rates of failure for categories ^val1^ and ^val2^ of the explanatory variable, ^xvar^. The failure variable indicates failure (1) or censoring (0) after a time which is in the follow-up variable supplied in ^exposure^. Alternatively, ^mhrate^ may be used with records where the failure variable contains the total number of failures for each combination of explanatory variables, and the follow-up variable contains the corresponding person-years observation. The optional ^varlist^ contains 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 odds ratio with further categorical variables may be explored. Options ------- ^exposure(^varname^)^ specifies the variable containing the person-years of observation time (expected numbers with SMRs). ^by(^varlist^)^ specifies categorical variables by which the rate ratio is to be tabulated. A separate rate ratio is produced for each unique combination of categories, and a test for unequal separate rate ratios is performed. The same approach applies when the rate ratio for a unit increase in ^xvar^ is reported in place of the rate ratio. ^compare(^val1^,^val2^)^ specifies the categories of xvar to be compared. ^val1^ defines the numerator and ^val2^ the denominator. When ^compare^ is absent and there are only two categories, the second is compared to the first; when there are more than two categories the rate ratio for a unit increase in ^xvar^, controlled for specified confounding variables, is given. ^level(^#^)^ specifies the level for the confidence intervals (default 95). Examples -------- . ^mhrate d smoke age, c(2,1) e(y) by(sex)^ -- Individual records Controlled for age, by sex . ^mhrate D smoke age, c(2,1) e(Y) by(sex)^ -- Poisson frequency records Controlled for age, by sex . ^mhrate d smoke age sex, c(2,1) e(y)^ -- Individual records Controlled for age and sex Authors ------- David Clayton, MRC Biostatistical Research Unit, Cambridge david.clayton@@mrc-bsu.cam.ac.uk Michael Hills, London School of Hygiene and Tropical Medicine, London mhills@@lshtm.ac.uk Also see -------- STB: STB-27 ssa7 On-line: help for @lexis@ and @tabrate@