paf.combine: Combine point estimates of PAF from different subpopulations

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/paf_combine.R

Description

Function for fast-computing an overall paf from subpopulation pafs.

Usage

1
paf.combine(paf_vector, proportions)

Arguments

paf_vector

Vector containing pafs of each specific subpopulation.

proportions

Vector establishing the proportion of individuals in each subpopulation.

Details

The subpopulations considered should not contain common elements.

Value

overall_paf An overall point-estimate of paf combining all subpopulations.

Author(s)

Rodrigo Zepeda-Tello [email protected]

Dalia Camacho-Garc<c3><ad>a-Forment<c3><ad> [email protected]

See Also

paf for Population Attributable Fraction estimation, pif for Potential Impact Fraction estimation, and pif.combine for combining several PIF.

Examples

 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))  

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