{smcl} {hline} help for {hi:dblpair}{right:{hi:Peter Cummings}} {hline} {title:Double-pair risk ratio estimates} {p 8 35} {cmdab:dblpair} {it:depvar expvar} [{cmd:if} {it:exp}] [{cmd:in} {it:range}] {cmd:,} {cmd:driver}{cmd:(}{it:exp}{cmd:)} {cmd:group}{cmd:(}{it:varname}{cmd:)} [{cmd:level}{cmd:(.}{it:#}{cmd:)} {cmd:oby}{cmd:(}{it:varlist}{cmd:)} {cmd:vby}{cmd:(}{it:varlist}{cmd:)} ] {p} {title:Description} {p} {cmd:dblpair} 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. The method has special application in traffic crash data where vehicle occupants are matched by being in the same vehicle. It can be used to separate the effects of seat position from other exposures. {title:Options} {p 0 4} {cmd:driver}{cmd:(}{it:exp}{cmd:)} is not optional; it requires an expression that designates the "driver" or something similar for each matched pair. For example, if two occupants in the same vehicle are 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:driver}{cmd:(}{it:pass==0}{cmd:)}" to indicate which records are for drivers and which for passengers. {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:oby}{cmd:(}{it:varlist}{cmd:)} specifies a list of potential confounding variables that are occupant or person specific. Examples might include age or sex. These must be numeric. {p 0 4} {cmd:vby}{cmd:(}{it:varlist}{cmd:)} specifies a list of potential confounding variables that are vehicle specific. That is, they are the same for each pair, but vary between pairs. Examples might include speed or crash angle. These must be numeric. {p 4 4} A total of only 6 confounding variables are allowed. Since each occupant level confounder is used twice, once for drivers and once for passengers, you can have any of the following combinations:{p_end} {tab}1. 3 occupant level confounders and no vehicle level confounders {tab}2. 2 occupant level confounders and 2 vehicle level confounders {tab}3. 1 occupant level confounder and 4 vehicle level confounders {tab}4. 6 vehicle 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 vehicle level variables or more than 3 occupant 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(drr) risk ratio for exposed drivers {tab}r(vdrr) variance of log driver risk ratio {tab}r(drru) upper confidence bound of driver risk ratio {tab}r(drrl) lower confidence bound of driver risk ratio {tab}r(prr) risk ratio for exposed passengers {tab}r(vprr) variance log passenger risk ratio {tab}r(prru) upper confidence bound of passenger risk ratio {tab}r(prrl) lower confidence bound of passenger risk ratio {tab}r(rr) risk ratio for all exposed {p 8 8} When confounders are used, all the above are saved for each stratum i. For example, the stratum 3 result for driver risk ratio is stored in r(drr3) and the stratum 3 count of pairs is stored in r(prct3). The total count of pairs is in r(prct). And the overall estimates are stored without numbers, such as r(drr), r(vdrr), and so on. Adjusted estimates (summarized across the strata) have the prefix "a", such as r(adrr) and r(vadrr). When no confounders are used, the results have no numbers, such as r(drr) or r(rr). {p} {title:Remarks} {p} This method is a modification of matched-pair cohort analytic methods. It has the feature of allowing the analyst to separate the effects of seat position from the exposure of interest. The method was first introduced by Leonard Evans (1986). I have modified his method to use a delta-method variance estimator for matched-pair cohort data. Users should be aware that estimates may be biased if the effects of seat position are modified by a confounding variable that is not controlled for in the analysis, even though the pairs have been matched on that variable. Users should also be aware that that are more flexible methods of doing this type of analysis (see Cummings et al (2003), below). {p} Adjusted estimates are created by pooling the stratum specific estimates of the log risk ratio, using weights equal to the inverse of the variance of each log risk ratio. {p} No confidence bounds are presented for the overall risk ratio or overall adjusted risk ratio estimates. This is because the driver and passenger risk ratio estimates are derived from the same counts; i.e., they are not independent. For those who want confidence limits for rr and arr, bootstrap methods can be used. {p} {title:Examples} {inp:. dblpair died seatbelt, driver(pass==0) group(vehnum)} {inp:. dblpair died sex, driver(driver==1) group(vehnum) oby(agecat seatbelt) vby(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. Modelling risk ratios from matched cohort data: an estimating equation approach. {it}Appl Stat {sf}1994; 43:223-232. {p 4 4} Evans L. Double pair comparison - a new method to determine how occupant characteristics affect fatality risk in traffic crashes. {it}Accid Anal Prev {sf}1986; 18: 217-227. {p 4 4} Evans L. The effectiveness of safety belts in preventing fatalities. {it}Accid Anal Prev {sf}1986; 18:229-241. {p 4 4} Rothman KJ, Greenland S. {it}Modern Epidemiology. {sf}2nd ed. Philadelphia: Lippincott-Raven, 1998: 283-285.