relRisk: Fit a Relative Risk Model for Binary data with Log Link

View source: R/relative-risk-regression.R

relRiskR Documentation

Fit a Relative Risk Model for Binary data with Log Link

Description

Fit a Relative Risk Model for Binary data with Log Link using the COPY method.

Usage

relRisk(
  formula,
  id,
  waves = NULL,
  data = parent.frame(),
  subset = NULL,
  contrasts = NULL,
  na.action = na.omit,
  corstr = "indep",
  ncopy = 1000,
  control = geese.control(),
  b = NULL,
  alpha = NULL
)

Arguments

formula

same as in geese

id

same as in geese

waves

same as in geese

data

same as in geese

subset

same as in geese

contrasts

same as in geese

na.action

same as in geese

corstr

same as in geese

ncopy

the number of copies of the original data in constructing weight.

control

same as in geese

b

initial values for regression coefficients as in geese but more difficult to obtain due to the log link.

alpha

same as in geese

Value

An object of class "geese" representing the fit.

Author(s)

Jun Yan jyan.stat@gmail.com

References

Lumley, T., Kornmal, R. and Ma, S. (2006). Relative risk regression in medical research: models, contrasts, estimators, and algorithms. UW Biostatistics Working Paper Series 293, University of Washington.

Examples


## this example was used in Yu and Yan (2010, techreport)
data(respiratory)
respiratory$treat <- relevel(respiratory$treat, ref = "P")
respiratory$sex <- relevel(respiratory$sex, ref = "M")
respiratory$center <- as.factor(respiratory$center)
## 1 will be the reference level

fit <- relRisk(outcome ~ treat + center + sex + age + baseline + visit,
               id = id, corstr = "ar1", data = respiratory, ncopy=10000)
summary(fit)
## fit <- relRisk(outcome ~ treat + center + sex + age + baseline + visit,
##               id = id, corstr = "ex", data = respiratory)
## summary(fit)
## fit <- relRisk(outcome ~ treat + center + sex + age + baseline + visit,
##                id = id, corstr = "indep", data = respiratory)
## summary(fit)


geepack documentation built on Sept. 23, 2024, 5:09 p.m.