`attribrisk(formula, data, weights, subset, na.action, varmethod = c("jackknife", "bootstrap", "none"), conf=.95, baseline, k=20, control, model = FALSE, x = FALSE, y = FALSE, ...)`

formula

an object of class 'formula'. A symbolic
description of the model to be fitted.

data

a data frame used for the formula.

weights

optional weights for the fitting
criterion.

subset

an optional vector specifying a subset of
observations to be used.

na.action

a missing-data filter function. This is applied to the model.frame
after any
subset argument has been used. Default is

`options()\$na.action`

.
varmethod

A string that specifies the resampling
technique used to estimate confidence intervals and
standard errors.

- bootstrap: indicates that the CI and standard error should be estimated using a bootstrap.
- jackknife: indicates that the CI and standard error should be estimated using a grouped jackknife.
- none: do not estimate standard error or CI.

k

the number of groups to use for the jackknife.
The parameter is ignored for bootstrap variance. Setting this
to 0 or to a value >= the sample size will leads to leaving out each
observation one at a time, i.e., the ordinary jackknife.
Optionally,

`k`

can be a vector with one element per observation
that directly specifies the grouping of the observation, the
jackknife estimate will leave out one group at a time. If the model
has strata then they will not be broken, either all or none of the
observations in a strata are left out of each jackknife subsample.conf

The confidence level for confidence intervals

control

a list of optional parameters, see

`attribrisk.control`

.baseline

Must be either NULL or a data frame containing values
for the exposure variable(s) of the formula, which specifies the
desired baseline value for each individual.

model

a logical value indicating whether model
frame should be included as a component of the returned
value.

x,y

logical values indicating whether the model
matrix and/or response used in the fitting process should be returned.

...

other arguments such as

`nboot`

,
normally passed to the `attribrisk.control`

rountine.-
an object of class "attribrisk" with the following
components:
- attribrisk
- attributable risk estimate
- var
- variance of the attributable risk
- fit
- results from the underlying coxph or glm fit
- boot
- results of the
`boot`

function, optional - boot.ci
- results of the
`boot.ci`

function, optional - call
- A copy of the call to the function

`attribrisk.fit`

, `attribrisk.control`

, and
`benichou`

```
data(benichou)
# Use the Benichou (1991) data to estimate attributable risk of oesophageal
# cancer due to alcohol greater than or equal to 80g/day
attribrisk(cases ~ expos(alcohol80), data=benichou)
```

Run the code above in your browser using DataLab