risk.ratio.approximate.confidence: Approximate Confidence intervals for the Risk Ratio Integral In pifpaf: Potential Impact Fraction and Population Attributable Fraction for Cross-Sectional Data

Description

Function that approximates the confidence interval for the integral

\int RR(x;θ)f(x)dx

where f(x) is the density function of the exposure X, RR(x;θ) the relative risk of the exposure with associated parameter θ. In particular this is an approximation when only mean and variance of exposure known

Usage

 1 2 3 4 risk.ratio.approximate.confidence(X, Xvar, thetahat, rr, thetavar, nsim = 1000, confidence = 95, deriv.method.args = list(), deriv.method = c("Richardson", "complex"), check_thetas = TRUE, force.min = FALSE)

Arguments

 X Mean value of exposure levels from a cross-sectional random sample. Xvar Variance of exposure levels. thetahat Estimator (vector or matrix) of theta for the Relative Risk function. rr Function for Relative Risk which uses parameter theta. The order of the parameters shound be rr(X, theta). thetavar Estimator of variance of thetahat **Optional** nsim Number of simulations confidence Confidence level % (default: 95) deriv.method.args method.args for hessian. deriv.method method for hessian. Don't change this unless you know what you are doing. check_thetas Checks that theta parameters are correctly inputed. force.min Boolean indicating whether to force the rr to have a minimum value of 1 instead of 0 (not recommended).

Note

When a sample of the exposure X is available the method risk.ratio.confidence should be prefered.

The force.min option forces the relative risk rr to have a minimum of 1 and thus an rr < 1 is NOT possible. This is only for when absolute certainty is had that rr > 1 and should be used under careful consideration. The confidence interval to acheive such an rr is based on the paper by Do Le Minh and Y. .s. Sherif

Author(s)

Rodrigo Zepeda-Tello rzepeda17@gmail.com

References

Sherif, Y. .s. (1989). The lower confidence limit for the mean of positive random variables. Microelectronics Reliability, 29(2), 151-152.