if_bruzzi: Internal: Calculation of an impact fraction using the Bruzzi...

View source: R/impact_fraction.R

if_bruzziR Documentation

Internal: Calculation of an impact fraction using the Bruzzi approach

Description

Internal: Calculation of an impact fraction using the Bruzzi approach

Usage

if_bruzzi(data, ind, model, model_type, new_data, response, weight_vec)

Arguments

data

A dataframe containing variables used for fitting the model

ind

An indicator of which rows will be used from the dataset

model

Either a clogit or glm fitted model object. Non-linear effects should be specified via ns(x, df=y), where ns is the natural spline function from the splines library.

model_type

Either a "clogit", "glm" or "coxph" model object

new_data

A dataframe (of the same variables and size as data) representing an alternative distribution of risk factors

response

A string representing the name of the outcome variable in data

weight_vec

An optional vector of inverse sampling weights

Value

A numeric estimated impact fraction.

References

Bruzzi, P., Green, S.B., Byar, D.P., Brinton, L.A. and Schairer, C., 1985. Estimating the population attributable risk for multiple risk factors using case-control data. American journal of epidemiology, 122(5), pp.904-914


graphPAF documentation built on Feb. 16, 2023, 6:24 p.m.

Related to if_bruzzi in graphPAF...