epi.eff {Epi}R Documentation

Function to calculate effects

Description

The function calculates the effects of an exposure on a response, possibly stratified by a stratifying variable, and/or controlled for one of more confounding variables.

Usage

epi.eff(response, type = "metric", exposure, strata = NULL, control = NULL, fup = NULL, data = NULL)

Arguments

response The response variable - must be numeric
type The type of responsetype - must be one of "metric", "binary", "failure", or "count"
exposure The exposure variable can be numeric or a factor
strata The strata stratifying variable - must be a factor
control The control variable(s) - must take the form data.frame(variable names)
fup The fup variable contains the follow-up time for a failure response
data data refers to the data frame used

Details

epi.eff(), without arguments, produces a list of arguments

Value

comp1 Effects of exposure
comp2 Tests of significance

Author(s)

Michael Hills

Examples

data(births)
attach(births)
epi.eff(response=bweight,type="metric",exposure=hyp)
epi.eff(response=lowbw,type="binary",exposure=hyp)
sex <- factor(sex)
epi.eff(response=bweight,type="metric",exposure=hyp,strata=sex)
epi.eff(response=lowbw,type="binary",exposure=hyp,strata=sex)

[Package Epi version 0.7.0 Index]