Need-to-know commands for EMS 18-21:

Note: More detailed explanations and further help links can be found at my Stata Notes.

EMS 18
  • input command (such as the following for EMS Table 18.2)
clear
input gender area antibody freq
1 1 1 36
1 1 0 14
1 0 1 50
1 0 0 50
0 1 1 24
0 1 0 126
0 0 1 10
0 0 0 90
end
  • Mantel-Haenszel method: mhodds antibody area gender [weight=freq], compare(1,0) will generate the results in EMS 18.4. The first variable after the command mhodds is the outcome; the second variable is the risk factor (the variable of interest); the third variable is the stratifying variable. (Note that logistic regression logistic antibody area gender [weight=freq] will generate similar, but different, results.)
  • Mantel-Haenszel test of heterogeneity: cc antibody area [weight=freq], by(gender) generates the results in EMS 18.5. (Note that test of heterogeneity is equivalent to test of interaction effect between area and gender.)

EMS 19-20
  • Logistic regression: logistic or logit. For example, logistic mf area (or logit mf area, or) generates output in odds scale (EMS 19.2). logistic mf area, coef (or logit mf area) generates output in parameter scale (i.e. log(odds) scale). The first variable after the command logistic (or logit) is the outcome variable, then followed by input variable(s).
  • Analyze an input variable as categorical: xi: logistic mf i.agegrp. To analyze area and age group simultaneously, xi: logistic mf area i.agegrp generates the results in EMS 20.2.

EMS 21
  • Matched studies: mcci 184 54 14 63 will generate the McNemar's test result and OR estimate in EMS 21.2-3, but its CI calculations are based on formulae slightly different from those in EMS.

EMS 22
  • Rate estimate and its s.e., CI: cii 873 57, poisson will generate results in EMS 22.5-6, with numbers in count per child-year, not per 1000 child-years. In the latter scale, the CI will be from 49.45 to 84.59, slightly different from that in EMS 22.6, because the calculations are based on formulae slightly different from those in EMS.

EMS 23
  • Rate difference: iri 33 24 355 518 gives results in EMS 23.2.
Topic revision: r2 - 04 Apr 2007, ChunLi
 

This site is powered by FoswikiCopyright © 2013-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Vanderbilt Biostatistics Wiki? Send feedback