# pif.combine: Combine point estimates of PIF from different subpopulations In pifpaf: Potential Impact Fraction and Population Attributable Fraction for Cross-Sectional Data

## Description

Function for fast-computing an overall `pif` from subpopulation `pif`s and `paf`s.

## Usage

 `1` ```pif.combine(pif_vector, paf_vector, proportions) ```

## Arguments

 `pif_vector` Vector containing `pif`s for each specific subpopulation. `paf_vector` Vector containing `paf`s 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 `pif`s both `pif`s and `paf`s are required.

## Author(s)

Rodrigo Zepeda-Tello [email protected]

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