epi.eff {Epi} | R Documentation |
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.
epi.eff(response, type = "metric", exposure, strata = NULL, control = NULL, fup = NULL, data = NULL)
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 |
epi.eff(), without arguments, produces a list of arguments
comp1 |
Effects of exposure |
comp2 |
Tests of significance |
Michael Hills
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)