{smcl} {hline} help for {hi:csmatch}{right:{hi:Peter Cummings}} {hline} {title:Matched cohort study risk ratio estimates} {p 8 35} {cmd:csmatch} {it:depvar expvar} [{cmd:if} {it:exp}] [{cmd:in} {it:range}] {cmd:,} {cmdab:pairm:ember}{cmd:(}{it:exp}{cmd:)} {cmdab:g:roup}{cmd:(}{it:varname}{cmd:)} [{cmdab:l:evel}{cmd:(.}{it:#}{cmd:)} {cmdab:personv:ar}{cmd:(}{it:varlist}{cmd:)} {cmdab:pairv:ar}{cmd:(}{it:varlist}{cmd:)} ] {p} {title:Description} {p} {cmd:csmatch} estimates the risk ratio for the outcome, depvar, given the exposure, expvar; depvar and expvar must be binary and coded as 0 or 1. {p} This method can be applied to matched-pair cohort data when pairs are matched on one or several variables. {title:Options} {p 0 4} {cmd:pairmember}{cmd:(}{it:exp}{cmd:)} is not optional; it requires an expression that designates the "pairmember" or something similar for each matched pair. The program assumes that the two members of each pair are in separate records and this variable is used by the program to create one record for each pair. The relative risk estimates will be the same regardless of the coding for this variable; the "order" of the pairs is arbitrary. For example, if two people are paired by being occupants in the same vehicle, say driver and passenger, they might be labeled by a variable "pass" where the driver is assigned a value of 0 and the passenger is assigned a value of 1. You would type "{cmd:pairmember}{cmd:(}{it:pass==0}{cmd:)}" to indicate which records are for drivers and which for passengers. But if you randomly sorted the pairs and assigned them values of 0 and 1 in random order, the relative risk estimates would be unchanged. {p 0 4} {cmd:group}{cmd:(}{it:varname}{cmd:)} is not optional; it specifies the identifier variable (numeric or string) for the matched pairs. The data must be organized so that there is one record for each person; i.e., two records for each pair. {p 0 4} {cmd:level}{cmd:(.}{it:#}{cmd:)} specifies the confidence level, as a fraction, for the estimates. Unlike many Stata commands, level must be a fraction, such as .95, not a per cent, such as 95. {p 0 4} {cmd:personvar}{cmd:(}{it:varlist}{cmd:)} specifies a list of potential confounding variables that are person, or individual specific. Examples might include age or sex. These must be numeric. {p 0 4} {cmd:pairvar}{cmd:(}{it:varlist}{cmd:)} specifies a list of variables that are the same for each member of a pair, but may differ between pairs. If you studied vehicle occupants paired in their cars, examples might include speed or crash angle. These must be numeric. {p 4 4} A total of only 6 confounding or effect modifying variables are allowed. Since each personvar level confounder is used twice, once for each member of the pair, you can have any of the following combinations:{p_end} {tab}1. 3 personvar level confounders and no pairvar effect modifiers {tab}2. 2 personvar level confounders and 2 pairvar level effect modifiers {tab}3. 1 personvar level confounder and 4 pairvar level effect modifiers {tab}4. 6 pairvar level confounders {p 4 4} (Since any number of levels is allowed within each confounding variable, you could get around these restrictions by combining two variables into one: for example, you could you have a variable which classifies occupants both by sex and category of age. However, a set of data would have to be very large to allow stratification by more than 6 person level variables or more than 3 pair level variables.) {p} {title:Saved results} {tab}Results saves in r() {tab}Scalars {tab}r(prct) count of matched pairs in the estimation sample {tab}r(rr) risk ratio estimate {tab}r(vlrr) variance ln risk ratio {p 8 8} When the results are stratified, all the above are saved for each stratum i. So, for example, the stratum 3 result for the risk ratio is r(rr3), and the stratum 3 count of pairs is stored in r(prct3). The total count of pairs is in r(prct). The overall estimates are stored without numbers, r(rr), r(vlrr). Adjusted estimates (summarized across the strata) have the prefix "a", such as r(arr) and r(vlarr). The crude risk ratio, based upon all available data, and the adjusted risk ratio are shown. These may differ either because of confounding, or because the adjusted estimate is based upon strata within which a risk ratio and variance can be estimated. If there are many strata, estimates may not be possible within some strata; thus the crude and adjusted estimates might differ just because records in some strata are not included in the analysis. To identify this situation, estimates are presented for crudenew, a crude risk ratio estimate which is generated only from records which contributed to the stratified estimates; these results are saved in r(rrn), r(vlrrn), and r(prctn). {p} {title:Remarks} {p} In a matched-pair cohort analysis, the crude risk ratio estimate is the same as the estimate adjusted for the matching variables. In other words, confounding by the matching variables is eliminated, so long as there is no imbalance due to loss of follow-up or missing data. Furthermore, the crude estimate is the same as the estimate based on the matched pairs, summarized by Mantel-Haenszel methods. This program therefore produces risk ratio estimates that are adjusted for the matching variables. The variance estimator was described by Greenland and Robins (1985), and Rothman (1986). Details and a worked example appear in Rothman and Greenland (1998). {p} In the output, E+ means exposed, E- means not exposed, O+ means the outcome occurred and O- means the outcome did not occur. Note that pairs in which neither had the outcome do not contribute to the analysis. {p} {title:Examples} {inp:. csmatch died seatbelt, pairmember(pass==0) group(vehnum)} {inp:. csmatch died driver, pairm(driver==1) g(vehnum) personv(agecat seatbelt) pairv(rollover)} {title:Author} {p} Peter Cummings. Affiliations: Dept of Epidemiology, School of Public Health & Community Medicine and Harborview Injury Prevention & Research Center (HIPRC), University of Washington, Seattle, WA, USA. Home and office address: 1524 Bear Creek Dr, Bishop CA 93514, USA. Email {browse "mailto:peterc@u.washington.edu":peterc@u.washington.edu} if you find problems in the program. {p} {title:References} {p 4 4} Cummings P, McKnight B, Weiss NS. Matched-pair cohort methods in traffic crash research. {it}Accid Anal Prev {sf}2003; 35:131-141. {p 4 4} Greenland S, Robins JM. Estimation of a common effect parameter from sparse follow-up data. {it}Biometrics {sf} 1985;41:55-68. {p 4 4} Lachin JM. {it}Biostatistical Methods: The Assessment of Relative Risks. {sf}New York: John Wiley & Sons, 2000: 186-187. {p 4 4} Nurminen N. Asymptotic efficiency of general noniterative estimation of common relative risk. {it}Biometrika {sf}1981; 68:525-530. {p 4 4} Rothman KJ. {it}Modern Epidemiology. {sf}1st ed. Boston: Little, Brown and Company, 1986: 276. {p 4 4} Rothman KJ, Greenland S. {it}Modern Epidemiology. {sf}2nd ed. Philadelphia: Lippincott-Raven, 1998: 283-285.