Description Usage Arguments Details Value Note Author(s) See Also Examples
Function for fast-computing an overall pif
from
subpopulation pif
s and paf
s.
1 | pif.combine(pif_vector, paf_vector, proportions)
|
pif_vector |
Vector containing |
paf_vector |
Vector containing |
proportions |
Vector establishing the proportion of individuals in each subpopulation. |
The subpopulations considered should not contain common elements.
overall_pif An overall point-estimate of pif
combining all subpopulations.
To combine pif
s both pif
s and paf
s are required.
Rodrigo Zepeda-Tello rzepeda17@gmail.com
Dalia Camacho-GarcĂa-FormentĂ daliaf172@gmail.com
See paf
for Population Attributable Fraction estimation,
pif
for Population Impact Fraction estimation, and
paf.combine
for combining several PAF.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #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")
#Estimate PIF for each subpopulation
pifmen <- pif(X = data.frame(2.7), thetahat = 0.12, rr = function(X, theta){X*theta + 1},
cft = function(X){X/2}, Xvar = 0.11, method = "approximate")
pifwomen <- pif(X = data.frame(3.1), thetahat = 0.12, rr = function(X, theta){exp(X*theta/3)},
cft = function(X){X/2}, Xvar = 0.17, method = "approximate")
#Combine estimates
pif.combine(c(pifmen, pifwomen), 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.