bounds: Bounds for causal interactions

Description Usage Arguments Value Author(s) References See Also Examples

Description

The function estimates bounds for causal interaction.

Usage

1
2
3
bounds(data, response = "outcome", factor1 = "exposure1",
  factor2 = "exposure2", covariates = NULL, population.prevalence = NULL,
  monotonicity = FALSE, bootstrap, cc = FALSE)

Arguments

data

A string as file name for the input data, or an R data frame giving the data.

response

A string that tells the name of the response variable in the data. Default value is "response". The corresponding column of this variable needs to be coded as 0 and 1 numeric values.

factor1

A string that tells the name of the first exposure variable in the data. Default value is "exposure1". The corresponding column of this variable needs to be factors. See as.factor.

factor2

A string that tells the name of the second exposure variable in the data. Default value is "exposure2". The corresponding column of this variable needs to be factors. See as.factor.

covariates

A vector of strings that give the names of the covariates in the data.

population.prevalence

A numeric value that gives the population prevalence of response incidence. If NULL, no weighting for population prevalence.

monotonicity

Logical. If FALSE, then assumption-free bounds are returned. If TRUE, then bounds under the assumption of monotone exposure effects are returned.

bootstrap

Optional. The number of bootstrap replicates. If missing, then no estimated standard errors are returned.

cc

Logical. Specify TRUE if the response is from a case-control study, and population.prevalence is required.

Value

The function returns returns a 4 × 5 matrix. The upper two elements in first column contain the estimated bounds on the proportion of individuals that the causal interaction exists, named as lower and upper, respectively. The lower two elements in the first column contain the estimated bounds on the proportion of effects that is due to interaction, named as p.lower and p.upper, respectively, which are calculated when monotonicity = TRUE. If bootstrap is specified, then the second column contains the bootstrap standard errors for the estimates, and the third and fourth columns contain the lower and upper limits of the 95 The last column contains the p-values from Wald test.

Author(s)

Arvid Sjolander, Xia Shen

References

Sjolander A, Lee W, Kallberg H, Pawitan Y. (2014). Bounds on causal interactions for binary outcomes. Biometrics 70(3), 500-505.

See Also

bounds.suff

Examples

1
2
3
4
5
6
7
8
## Not run: 
data(ex1)
bounds(ex1, covariates = c('C1', 'C2'), bootstrap = 500)
bounds(ex1, covariates = c('C1', 'C2'), monotonicity = TRUE, bootstrap = 500)
bounds(ex1, covariates = c('C1', 'C2'), population.prevalence = 0.001,
       monotonicity = TRUE, bootstrap = 500)

## End(Not run)

bounds documentation built on May 2, 2019, 5:21 p.m.