.- help for ^smrby^ (STB-29: sg29.1) .- Tabulation of observed/expected ratios and exact confidence intervals --------------------------------------------------------------------- ^smrby^ obsvar expvar [^if^ exp] [^in^ range] [^,^ ^by(^byvar^)^ ^h^etero ^l^evel^(^#^)^ ^o^rdinal ^tot^al ^tr^end ] Description ----------- For each different value of the optional ^byvar^, ^smrby^ computes the ratio of the sum of the observed counts in ^obsvar^ over the sum of the expected counts in ^expvar^, together with a confidence interval based on assuming that ^obsvar^ is distributed Poisson with expected value ^expvar^. A one-sided confidence interval is provided if the observed count is zero. Significant ratios are marked: * p<.05, ** p<.01, *** p<.001. All p-value's and confidence intervals are unadjusted for the implicit multiple comparisons. p-values are twice the one-sided Poisson probabilities of observing a more extreme count. Options ------- ^by(^byvar^)^ specifies groups for which the observed/expected ratios are to be calculated separately. ^byvar^ is a numeric or string variable that is used to label the rows of the table. If ^byvar^ is not an integer, it is advisable to read and store it as a ^double^ rather than as a ^float^ to avoid unattractive display. If the ^by()^ option is not specified, ^smrby^ will treat each observation as a separate group. (See the ^total^ option.) ^hetero^ produces the chi-squared test for unequal SMRs (heterogeneity). ^level^ specifies the significance level in percent for the confidence interval. ^ordinal^ this option is only effective in conjunction with the ^trend^ option. ^total^ specifies that the total observed count together with its expectation, the ratio O/E and the confidence interval should be calculated and displayed in addition to the usual output. ^trend^ produces the score test for a linear trend in SMRs against the ^byvar^. If the ^ordinal^ option is also specified, then the test is carried out using the values 1,2,3... Examples -------- . ^smrby obs exp if icd<155 & icd>145, by(icd_f)^ Author ------ Peter Sasieni, Ph.D. Imperial Cancer Research Fund FAX 011-44-171-269-3429 Also see -------- STB: STB-29 sg29.1, STB-23 sg29 On-line: help for @smr@ (if installed)