.- help for ^mhodds^ (STB-27: ssa8) .- Calculation of odds ratios -------------------------- ^mhodds^ fail xvar [varlist] [^if^ exp] [^in^ range] [fweight] [^,^ ^b^inomial^(^varname^)^ ^by(^varlist^)^ ^c^ompare^(^val1^,^val2^)^ ^l^evel^(^#^)^] Description ----------- ^mhodds^ estimates the ratio of the odds of failure for categories ^val1^ and ^val2^ of xvar. The optional ^varlist^ contains categorical variables which are to be controlled for using stratification. Strata are defined by cross-classification of these variables and the odds ratio estimate is combined over strata using the Mantel-Haenszel method. Using the ^by^ option, the variation of the combined odds ratio with further categorical variables can be explored. Matched case-control studies can be analysed by controlling for a categorical variable which takes a different value for each matched set. For individual records, the variable fail is coded 0/1 and the ^binomial^ option is not used. For frequency records the variable fail is coded 0/1, the ^binomial^ option is not used, and the frequencies are supplied using frequency weights. For records which contain the number of failures out of a number of subjects, the variable fail contains the number of failures and the variable containing the number of subjects is supplied by the ^binomial^ option. Options ------- ^binomial(^varname^)^ indicates the variable that contains the number of subjects for binomial frequency records. This option is not used for either individual or simple frequency records. ^by(^varlist^)^ specifies categorical variables by which the odds ratio is to be tabulated. A separate odds ratio is produced for each unique combination of categories, and a test for unequal separate odds ratios is performed. ^compare(^val1^,^val2^)^ specifies the levels 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 odds ratio for a unit increase in ^xvar^, controlled for specified confounding variables, is given. ^level(^#^)^ gives the level for the confidence intervals (default 95). Examples -------- . ^mhodds d smoke age, c(2,1) by(sex)^ -- Individual records Controlled for age, by sex . ^mhodds D smoke age, b(N) c(2,1) by(sex)^ -- Binomial frequency records Controlled for age, by sex . ^mhodds d smoke age sex [fweight=f], c(2,1)^ -- Simple frequency 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 ssa9 On-line: help for @tabodds@