pif.combine: Combine point estimates of PIF from different subpopulations

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

View source: R/pif_combine.R

Description

Function for fast-computing an overall pif from subpopulation pifs and pafs.

Usage

1
pif.combine(pif_vector, paf_vector, proportions)

Arguments

pif_vector

Vector containing pifs for each specific subpopulation.

paf_vector

Vector containing pafs for each specific subpopulation.

proportions

Vector establishing the proportion of individuals in each subpopulation.

Details

The subpopulations considered should not contain common elements.

Value

overall_pif An overall point-estimate of pif combining all subpopulations.

Note

To combine pifs both pifs and pafs are required.

Author(s)

Rodrigo Zepeda-Tello [email protected]

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

See Also

See paf for Population Attributable Fraction estimation, pif for Population Impact Fraction estimation, and paf.combine for combining several PAF.

Examples

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

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