A function to calculate attributable numbers and fractions derived from (c) Antonio Gasparrini 2015-2017. Modifications to produce daily values with confidence intervals.
an_attrdl(
x,
basis,
cases,
coef = NULL,
vcov = NULL,
model.link = NULL,
dir = "back",
tot = TRUE,
cen,
range = NULL,
nsim = 5000
)Attributable Fraction
Attributable Fraction lower confidence intervals
Attributable Fraction upper confidence intervals
Attributable Numbers
Attributable Numbers lower confidence intervals
Attributable Numbers upper confidence intervals
Simulation matrix of attributable numbers
AN EXPOSURE VECTOR OR (ONLY FOR dir="back") A MATRIX OF LAGGED EXPOSURES
THE CROSS-BASIS COMPUTED FROM x
THE CASES VECTOR OR (ONLY FOR dir="forw") THE MATRIX OF FUTURE CASES
COEF FOR basis IF model IS NOT PROVIDED
VCOV FOR basis IF model IS NOT PROVIDED
LINK FUNCTION IF model IS NOT PROVIDED
EITHER "back" OR "forw" FOR BACKWARD OR FORWARD PERSPECTIVES
IF TRUE, THE TOTAL ATTRIBUTABLE RISK IS COMPUTED
THE REFERENCE VALUE USED AS COUNTERFACTUAL SCENARIO
THE RANGE OF EXPOSURE. IF NULL, THE WHOLE RANGE IS USED
NUMBER OF SIMULATION SAMPLES