matchTab: Matched tabulation

Description Usage Arguments Details Author(s) See Also Examples

View source: R/epiDisplay.R

Description

Tabulation of outcome vs exposure from a matched case control study

Usage

1
matchTab (case, exposed, strata, decimal)

Arguments

case

Outcome variables where 0 = control and 1 = case

exposed

Exposure variable where 0 = non-exposed and 1 = exposed

strata

Identification number for each matched set

decimal

Number of digits displayed after the decimal point

Details

Tabulation for an unmatched case control study is based on individual records classified by outcome and exposure variables.

Matched tabulation is tallying based on each matched set. The simplest form is McNemar's table where only one case is matched with one control. 'matchTab' can handle 1:m matching where m can vary from 1 to m. A MLE method is then used to compute the conditional odds ratio.

Author(s)

Virasakdi Chongsuvivatwong <[email protected]>

See Also

'table', 'cc' and 'clogit'

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
.data <- infert
## Not run:

# matchTab(case, induced, stratum)
# Tabulation successful but OR not computed
# because 'induced' is not binary

## End(Not run)
attach(.data)
ia <- induced > 0  # any induced abortion
matchTab(case, ia, stratum)

# See also
clogit(case ~ ia + strata(stratum), data=infert)
detach(.data)
rm(list=ls())

Example output

Loading required package: foreign
Loading required package: survival
Loading required package: MASS
Loading required package: nnet

Exposure status: ia = TRUE 
 
Total number of match sets in the tabulation = 83 
 
Number of controls = 1 
                    No. of controls exposed
No. of cases exposed 0 1
                   0 1 0
                   1 0 0

Number of controls = 2 
                    No. of controls exposed
No. of cases exposed  0  1  2
                   0 20 19  7
                   1 12 12 12

Odds ratio by Mantel-Haenszel method = 1.091 
 
Odds ratio by maximum likelihood estimate (MLE) method = 1.094 
 95%CI= 0.609 , 1.966 
 
Call:
clogit(case ~ ia + strata(stratum), data = infert)

         coef exp(coef) se(coef)   z    p
iaTRUE 0.0897    1.0939   0.2991 0.3 0.76

Likelihood ratio test=0.09  on 1 df, p=0.764
n= 248, number of events= 83 

epiDisplay documentation built on May 11, 2018, 1:04 a.m.