IBM Support

Does SPSS have a procedure designed to produce risk ratios and odds ratios for matched pair data, along with confidence intervals?

Troubleshooting


Problem

I have data from matched-pair studies where I need to compute risk ratios and odds ratios and confidence intervals. I know that SPSS CROSSTABS offers these for independent samples, but I need these for paired samples. Does SPSS have a procedure designed for such designs?

Resolving The Problem

SPSS does not currently offer a procedure designed for matched-pairs risk ratios or odds ratios. Standard formulas for these measures and their confidence intervals are simple and one can easily compute these in SPSS given the numbers of pairs in which one or both of the members have the outcome of interest. If a is the number of pairs where both members have the outcome, b is the number where the condition of interest (to be put into the numerator in the formulas), which we'll call the exposed condition, has the outcome and the unexposed condition does not, and c is the number of pairs in which the unexposed condition leads to the outcome while the exposed condition does not, then the estimates for relative risk (RR) and the odds ratio (OR), along with asymptotic 95% confidence intervals, can be computed using the following commands, with values inserted in place of the ellipses for a, b, and c (the values for b and c must be positive, but a can be 0):

DATA LIST LIST / a b c
BEGIN DATA
. . .
END DATA.
COMPUTE Risk=(a+b)/(a+c).
COMPUTE LCI_Risk=Risk*(EXP(-1.96*SQRT((b+c)/((a+b)*(a+c))))).
COMPUTE UCI_Risk=Risk*(EXP(1.96*SQRT((b+c)/((a+b)*(a+c))))).
COMPUTE Odds=b/c.
COMPUTE LCI_Odds=Odds*EXP(-1.96*SQRT((1/b)+(1/c))).
COMPUTE UCI_Odds=Odds*EXP(1.96*SQRT((1/b)+(1/c))).
EXECUTE.
FORMATS a b c (F8.0) Risk to UCI_Odds (F8.5).
LIST.

[{"Product":{"code":"SSLVMB","label":"IBM SPSS Statistics"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"Not Applicable","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Historical Number

74517

Document Information

Modified date:
16 April 2020

UID

swg21475119