boot {pARtial} | R Documentation |
boot computes replications of the (adjusted) attributable risk or partial attributable risks in order to obtain the empirical distribution of the estimated parameter. The computation of replications is either based on the nonparametric bootstrap, the bayesian bootstrap or the jackknife.
boot(D, x, C = NULL, param = c("AR","PAR"), model = NULL, fmla = fmla, type = c("boot","bayes","jackknife"), B = 500)
D |
a vector containing a dichotomous indicator variable for the disease status. |
x |
a matrix containing different exposure variables. Each column of x indicates the exposure status of one exposure variable,
which has to be dichotomous. Categorial risk factors have first to be transformed into dummy variables. |
C |
a matrix containing one or multiple confounding variables for adjusting the attributable risk. Every column of C must be dichotomous.
If C=NULL , replications of the crude attributable risk for the exposure in x are computed. This input parameter is only
valid if param="AR" . |
param |
defines, whether replications for the (adjusted) attributable risk (param="AR" )
or for partial attributable risks (param="PAR" ) are computed. |
model |
if model=TRUE the model based approach of estimating the (partial) attributable risk is used for the computation of replications. |
fmla |
if the model–based approach is used, fmla determines the logistic regression model. |
B |
Number of replications. |
type |
A character string indicating the resampling method: type="boot" computes replications based on nonparametric bootstrap,
type="jackknife" uses the jackknife. |
The nonparametric bootstrap (type="boot"
) is based on Efron's bootstrap. Samples are taken out of the underlying data set
and the attributable risk is repeatedly computed for each of those samples. Rubin's bayesian bootstrap is a weighted method of the bootstrap.
A weight vector is generated from a Dirichlet distribution. For each sampled weight vector, the attributable risk is computed with weighted observations.
The jackknife can be seen as an approximation to Efron's nonparametric bootstrap. Replications of the attributable risk are computed by leaving out every
singel observation once at a time. If the data set contains far more observations as the number of replications normally computed for a bayesian or nonparametric
bootstrap, the computation of a bootstrap is recommended. For the number of replications, B=500
is usually assumed to suffice.
If param="AR"
, a vector of length B
containing replications of the attributable risk is returned.
Else if param="PAR"
, a matrix with B
rows and ncol(x)
columns with replications of the partial attributable risks is returned.
The variables in D
and x
have to be dichotomous, but it has to be ensured that they are not defined as factors. D
has to be a
vector, whereas x
has to be a matrix. If the model–based approach is used, the colnames of x
have to be used in fmla
!
Note that the implemented estimates of the
attributable risk are only valid if the data has been obtained under a multinomial sampling model!
Andrea Lehnert-Batar
Basu S., Landis J.R. (1995) Model-based Estimation of Population Attributable Risk under Cross-sectional Sampling. American Journal of Epidemiology, 142,1338-1343.
Benichou J., Gail M.H. (1989) A Delta Method for Implicitly Defined Random Variables. The American Statistician, 43, 41-44.
Benichou J. (2001) A review of adjusted estimators of attributable risk. Statistical Methods in Medical Research, 10, 195-216.
Cox L A JR. (1985), A new measure of attributable risk for public health applications. Management Science, 31,800-813.
Efron B. (1979) Bootstrap methods: another look at the jackknife. Annals of Statistics, 7,1-26.
Eide G E, Gefeller O. (1995), Sequential and average attributable fractions as aids in the selection of preventive strategies. Journal of Clinical Epidemiology, 48,645-655.
Lehnert-Batar A., Pfahlberg A., Gefeller O. (2006) Confidence Intervals for Attributable Risk Estimates under Multinomial Sampling. Biometrical Journal, to appear.
Quenouille M. (1949) Approximation tests of correlation in time series. Journal of the Royal Statistical Society, Series B, 11, 18-44.
Rubin D.B. (1981) The Bayesian Bootstrap. The Annals of Statistics, 9, 130-134.
data(icu) attach(data.frame(icu)) ### Computation of nonparametric bootstrap replications for the ### ### adjusted AR of INF adjusted for SEX ### boot(D = STA,x = INF, C = SEX, param = "AR", type="boot") ### Computation of nonparametric bootstrap replications ### ### of partial attributable risks ### boot(D = STA,x = cbind(CAN,INF,TYP,LOC), param = "PAR", type="boot")