paf.exponential: Population Attributable Fraction with Exponential Relative... In pifpaf: Potential Impact Fraction and Population Attributable Fraction for Cross-Sectional Data

Description

Function that estimates the Population Attributable Fraction `paf` with exponential relative risk function `rr` given by

rr(X, θ) = exp(X

Usage

 ```1 2 3 4 5``` ```paf.exponential(X, thetahat, method = "empirical", weights = rep(1/nrow(as.matrix(X)), nrow(as.matrix(X))), Xvar = var(X), deriv.method.args = list(), deriv.method = c("Richardson", "complex"), adjust = 1, n = 512, ktype = "gaussian", bw = "SJ", check_exposure = TRUE, check_rr = TRUE, check_integrals = TRUE) ```

Arguments

 `X` Random sample (`data.frame`) which includes exposure and covariates or sample `mean` if `"approximate"` method is selected. `thetahat` Asymptotically consistent or Fisher consistent estimator (`vector`) of `theta` for the Relative Risk function `rr`. **Optional** `method` Either `"empirical"` (default), `"kernel"` or `"approximate"`. For details on estimation methods see `pif`. `weights` Normalized survey `weights` for the sample `X`. `Xvar` Variance of exposure levels (for `"approximate"` method). `deriv.method.args` `method.args` for `hessian` (for `"approximate"` method). `deriv.method` `method` for `hessian`. Don't change this unless you know what you are doing (for `"approximate"` method). `adjust` Adjust bandwith parameter (for `"kernel"` method) from `density`. `n` Number of equally spaced points at which the density (for `"kernel"` method) is to be estimated (see `density`). `ktype` `kernel` type: `"gaussian"`, `"epanechnikov"`, `"rectangular"`, `"triangular"`, `"biweight"`, `"cosine"`, `"optcosine"` (for `"kernel"` method). Additional information on kernels in `density`. `bw` Smoothing bandwith parameter (for `"kernel"` method) from `density`. Default `"SJ"`. `check_exposure` `boolean` Check that exposure `X` is positive and numeric. `check_rr` `boolean` Check that Relative Risk function `rr` equals `1` when evaluated at `0`. `check_integrals` `boolean` Check that counterfactual `cft` and relative risk's `rr` expected values are well defined for this scenario.

Value

paf Estimate of Population Attributable Fraction with exponential relative risk.

Note

`paf.exponential` is a wrapper for `paf` with exponential relative risk.

Author(s)

Rodrigo Zepeda-Tello [email protected]

References

Vander Hoorn, S., Ezzati, M., Rodgers, A., Lopez, A. D., & Murray, C. J. (2004). Estimating attributable burden of disease from exposure and hazard data. Comparative quantification of health risks: global and regional burden of disease attributable to selected major risk factors. Geneva: World Health Organization, 2129-40.

See `paf` for Population Attributable Fraction (with arbitrary relative risk), and `pif` for Potential Impact Fraction estimation.

See `paf.linear` for PAF with ready-to-use linear relative risk function.

For more information on kernels see `density`.

Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23``` ```#Example 1: Univariate relative risk #---------------------------------------- set.seed(18427) X <- data.frame(Exposure = rnorm(100, 3, .5)) thetahat <- 0.12 paf.exponential(X, thetahat) #Exponential risk given exp(0.12*X) #This is the same as doing: paf(X, thetahat, rr = function(X, theta){exp(X*theta)}) #Same example with kernel method paf.exponential(X, thetahat, method = "kernel") #Same example with approximate method Xmean <- data.frame(mean(X[,"Exposure"])) Xvar <- var(X) paf.exponential(Xmean, thetahat, method = "approximate", Xvar = Xvar) #Example 2: Multivariate relative risk #---------------------------------------- X <- data.frame(Exposure = rnorm(100,2,.7), Covariate = rnorm(100,4,1)) theta <- c(0.3,0.1) paf.exponential(X,theta) #Exponential risk given exp(0.3*X1 + 0.1*X2) ```

pifpaf documentation built on Sept. 29, 2017, 1:03 a.m.