Description Usage Arguments Value Note Author(s) References See Also Examples
Function that estimates the Population Attributable Fraction
paf
with exponential relative risk function rr
given
by
rr(X, θ) = exp(X
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)
|
X |
Random sample ( |
thetahat |
Asymptotically consistent or Fisher consistent estimator ( **Optional** |
method |
Either |
weights |
Normalized survey |
Xvar |
Variance of exposure levels (for |
deriv.method.args |
|
deriv.method |
|
adjust |
Adjust bandwith parameter (for |
n |
Number of equally spaced points at which the density (for
|
ktype |
|
bw |
Smoothing bandwith parameter (for
|
check_exposure |
|
check_rr |
|
check_integrals |
|
paf Estimate of Population Attributable Fraction with exponential relative risk.
paf.exponential
is a wrapper for paf
with
exponential relative risk.
Rodrigo Zepeda-Tello rzepeda17@gmail.com
Dalia Camacho-García-Formentí daliaf172@gmail.com
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
.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.