Description Usage Arguments Details Value Author(s) See Also Examples
Function for fast-computing an overall paf
from subpopulation paf
s.
1 | paf.combine(paf_vector, proportions)
|
paf_vector |
Vector containing |
proportions |
Vector establishing the proportion of individuals in each subpopulation. |
The subpopulations considered should not contain common elements.
overall_paf An overall point-estimate of paf
combining all
subpopulations.
Rodrigo Zepeda-Tello rzepeda17@gmail.com
Dalia Camacho-GarcĂa-FormentĂ daliaf172@gmail.com
paf
for Population Attributable Fraction estimation,
pif
for Potential Impact Fraction estimation, and
pif.combine
for combining several PIF.
1 2 3 4 5 6 7 8 9 10 11 12 13 | #Example 1
#-------------
#Estimate PAF for each subpopulation
pafmen <- paf(X = data.frame(2.7), thetahat = 0.12,
rr = function(X, theta){X*theta + 1},
Xvar = 0.11, method = "approximate")
pafwomen <- paf(X = data.frame(3.1), thetahat = 0.12,
rr = function(X, theta){exp(X*theta/3)},
Xvar = 0.17, method = "approximate")
#Combine estimates
paf.combine(c(pafmen, pafwomen), c(0.45, 0.55))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.