AR {pARccs}R Documentation

Estimating (adjusted) attributable risks from case-control data

Description

With the functions AR_wC and AR_woC the estimation of the attributable risks (AR) from case-control data is realized.

From AR_woC you get the ARs for the exposure factors of primary interest adjusted to the rest of the exposure factors, the resulting ARs for the exposure factors of primary interest from AR_wC are additionally adjusted to the given confounders.

Usage

AR_woC(D, E, model, bincomE, conf = NULL)

AR_wC (D, E, C = NULL, model, bincomE, conf = NULL)

Arguments

D a vector which holds the case-control state ("1" = case, "0"=control)
E a matrix of the exposure factor/s (all of them have to be dichotomous!)
C a matrix of the confounder/s (all of them have to be categorical!)
model a model formula or an object of class "glm"
bincomE a matrix which contains all binary combinations of the exposures in E
conf a vector which holds the corresponding number of column of the exposure factors which should act as an additional confounder; the default is NULL, which means no exposure factor acts an as additional confounder

Details

With AR_wC the (joint) attributable risk for the exposure factor(s) of primary interest, which are not mentioned in vector conf, is estimated. It is adjusted to the rest of exposure factor/s in E (these are defined by conf). If you want an additional adjustment to secondary confounders, use function AR_woC with indicating the confounder/s in C.

If conf=NULL the joint attributable risk of all given exposure factors is estimated (as the case may be with adjustment to the confounder/s).

For the adjusted estimation regression models are used, here it is a logistic regression model. Through this model the needed Odds Ratio (OR) is estimated. The argument model can be eighter of the form D~terms, where terms is a series of terms out of the exposure factors and confounders, or an object of class "glm". (In the process of model fitting with glm you have to choose family=binomial to get a logistic regression model.)
All given exposure factors and confounders have to be part of the argument model. The names of the variables (outcome, exposure factors, confounders) in the argument model have to be identical to the (col-)names of the entered data. Also the colnames of bincomE have to be identical to the colnames of E.

To get the matrix bincomE you may use the function bincombinations()
(use help(bincombinations, package=e1071) for further information).

Value

AR_woC returns a single value which is the (joint) attributable risk of one (or more) exposure factor(s) adjusted to the rest of the exposure factors.
AR_wC returns a single value which is the (joint) attributable risk of one (or more) exposure factor(s) adjusted to the rest of the exposure factors and to the given confounders.

Note

Also if there are only a single exposure factor/confounder you have to enter a matrix, so this will be a matrix with only one column.

It is also important that the given variables in D, E and C are not defined as factors.

Validity of the estimation can only be taken for granted for data with simple random sampling, stratified random sampling or frequency-matching of controls.

Here the (adjusted) attributable risk for only one defined (binary) combination of the exposure factors is estimated. To get the (adjusted) attributable risks for every possible (binary) combination of all given exposure factors use function AdjAR.

Author(s)

Christiane Raemsch

References

Levin, M. (1953) The occurrence of lung cancer in man Acta Unio Internationalis Contra Cancrum 9, 531-41

Bruzzi, P.; Green S.; Byard, D. et al. (1985) Estimating the population attributable risk for multiple risk factors using case-control data American Journal of Epidemiology 122, 904-14

Benichou, J. (1991) Methods of adjustment for estimating the attributable risk in case-control studies: a review Statistics in Medicine 10, 1753-73

See Also

AdjAR

Examples


##### use of function 'AR_woC':       #####
##### attributable risk for exposure2 #####
##### adjusted for exposure 1         #####

set.seed(2007)
dicho            <- c(0,1)
cc_state         <- sample(dicho, 100, replace=TRUE)
exposure1        <- sample(dicho, 100, replace=TRUE, prob=c(0.7, 0.3))
exposure2        <- sample(dicho, 100, replace=TRUE, prob=c(0.4, 0.6))
relation         <- as.formula(cc_state~exposure1+exposure2)
data_exp         <- cbind(exposure1, exposure2)
bincom           <- bincombinations(2)
colnames(bincom) <- colnames(data_exp)
AR_exposure2     <- AR_woC(cc_state, data_exp, relation, bincom, c(2))

##### use of function 'AR_wC':               #####
##### joint attributable risk for exposure1  #####
##### and exposure2 adjusted for confounder1 #####

set.seed(2008)
dicho            <- c(0,1)
cc_state         <- sample(dicho, 100, replace=TRUE)
exposure1        <- sample(dicho, 100, replace=TRUE, prob=c(0.7, 0.3))
exposure2        <- sample(dicho, 100, replace=TRUE, prob=c(0.4, 0.6))
cat_confounder   <- c(0,1,2,3)
confounder1      <- sample(cat_confounder, 100, replace=TRUE)
rel_mod          <- glm(cc_state~exposure1+exposure2+confounder1, 
                        family=binomial)
data_exp         <- cbind(exposure1, exposure2)
conf             <- matrix(confounder1, ncol=1)
colnames(conf)   <- c("confounder1")
bincom           <- bincombinations(2)
colnames(bincom) <- colnames(data_exp)
AR_exposure1_2   <- AR_wC(cc_state, data_exp, conf, rel_mod, bincom)


[Package pARccs version 0.1-1 Index]